LEFT | RIGHT |
1 // Copyright 2013 Canonical Ltd. | 1 // Copyright 2013 Canonical Ltd. |
2 // Licensed under the AGPLv3, see LICENCE file for details. | 2 // Licensed under the AGPLv3, see LICENCE file for details. |
3 | 3 |
4 package ec2 | 4 package ec2 |
5 | 5 |
6 import ( | 6 import ( |
7 "launchpad.net/goamz/aws" | 7 "launchpad.net/goamz/aws" |
8 "launchpad.net/juju-core/environs/instances" | 8 "launchpad.net/juju-core/environs/instances" |
9 ) | 9 ) |
10 | 10 |
11 // Type of virtualisation used. | 11 // Type of virtualisation used. |
12 var ( | 12 var ( |
13 paravirtual = "pv" | 13 paravirtual = "pv" |
14 hvm = "hvm" | 14 hvm = "hvm" |
15 ) | 15 ) |
16 | 16 |
17 // all instance types can run amd64 images, and some can also run i386 ones. | 17 // all instance types can run amd64 images, and some can also run i386 ones. |
18 var ( | 18 var ( |
19 amd64 = []string{"amd64"} | 19 amd64 = []string{"amd64"} |
20 both = []string{"amd64", "i386"} | 20 both = []string{"amd64", "i386"} |
21 ) | 21 ) |
22 | 22 |
23 // allRegions is defined here to allow tests to override the content. | 23 // allRegions is defined here to allow tests to override the content. |
24 var allRegions = aws.Regions | 24 var allRegions = aws.Regions |
| 25 |
| 26 // TODO(bug 1212688): the RootDisk defaults to 8G currently until the |
| 27 // referenced bug is fixed, at which point RootDisk can be set to nil and the |
| 28 // specified constraint can be passed through via block device mapping to |
| 29 // request an appropriate resize of the root disk. |
25 | 30 |
26 // allInstanceTypes holds the relevant attributes of every known | 31 // allInstanceTypes holds the relevant attributes of every known |
27 // instance type. | 32 // instance type. |
28 var allInstanceTypes = []instances.InstanceType{ | 33 var allInstanceTypes = []instances.InstanceType{ |
29 { // First generation. | 34 { // First generation. |
30 Name: "m1.small", | 35 Name: "m1.small", |
31 Arches: both, | 36 Arches: both, |
32 CpuCores: 1, | 37 CpuCores: 1, |
33 CpuPower: instances.CpuPower(100), | 38 CpuPower: instances.CpuPower(100), |
34 Mem: 1740, | 39 Mem: 1740, |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 "m2.xlarge": 410, | 309 "m2.xlarge": 410, |
305 "m2.2xlarge": 820, | 310 "m2.2xlarge": 820, |
306 "m2.4xlarge": 1640, | 311 "m2.4xlarge": 1640, |
307 "c1.medium": 145, | 312 "c1.medium": 145, |
308 "c1.xlarge": 580, | 313 "c1.xlarge": 580, |
309 "cc2.8xlarge": 2400, | 314 "cc2.8xlarge": 2400, |
310 "cr1.8xlarge": 3500, | 315 "cr1.8xlarge": 3500, |
311 "hi1.4xlarge": 3100, | 316 "hi1.4xlarge": 3100, |
312 }, | 317 }, |
313 } | 318 } |
LEFT | RIGHT |