add g2.2xlarge EC2 instance size (JCLOUDS-364)

This commit is contained in:
jolly 2013-11-05 16:34:25 -08:00 committed by Nikolay Sokolov
parent 4e0ee79400
commit df8fdb7c41
4 changed files with 30 additions and 1 deletions

View File

@ -368,6 +368,19 @@ public class EC2HardwareBuilder extends HardwareBuilder {
.virtualizationType(VirtualizationType.HVM);
}
/**
* @see InstanceType#G2_2XLARGE
*/
public static EC2HardwareBuilder g2_2xlarge() {
return new EC2HardwareBuilder(InstanceType.G2_2XLARGE)
.ram(15*1024)
.processors(ImmutableList.of(new Processor(8.0, 3.25)))
.volumes(
ImmutableList.<Volume> of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(60.0f,
"/dev/sdb", false, false)))
.virtualizationType(VirtualizationType.HVM);
}
public static EC2HardwareBuilder hi1_4xlarge() {
return new EC2HardwareBuilder(InstanceType.HI1_4XLARGE)
.ram(60 * 1024 + 512)

View File

@ -229,4 +229,17 @@ public class InstanceType {
* </ul>
*/
public static final String HS1_8XLARGE = "hs1.8xlarge";
/**
* GPU Instance Double Extra Large
* <ul>
* <li>15 GiB of memory</li>
* <li>26 EC2 Compute Units (8 virtual cores*), 1xNVIDIA GRID GPU (Kepler GK104)</li>
* <li>60 GB instance storage</li>
* <li>64-bit platform</li>
* <li>I/O Performance: High</li>
* </ul>
*/
public static final String G2_2XLARGE = "g2.2xlarge";
}

View File

@ -23,6 +23,7 @@ import static org.easymock.EasyMock.replay;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_medium;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.g2_2xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge;
@ -222,7 +223,7 @@ public class EC2TemplateBuilderTest {
Supplier<Set<? extends Hardware>> sizes = Suppliers.<Set<? extends Hardware>> ofInstance(ImmutableSet
.<Hardware> of(t1_micro().build(), c1_medium().build(), c1_xlarge().build(), m1_large().build(),
m1_small().build(), m1_xlarge().build(), m2_xlarge().build(), m2_2xlarge().build(),
m2_4xlarge().build(), CC1_4XLARGE));
m2_4xlarge().build(),g2_2xlarge().build(),CC1_4XLARGE));
return new EC2TemplateBuilderImpl(locations, images, sizes, Suppliers.ofInstance(location), optionsProvider,
templateBuilderProvider, imageCache) {

View File

@ -21,6 +21,7 @@ import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc2_8xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cg1_4xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.g2_2xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.hi1_4xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.hs1_8xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large;
@ -68,6 +69,7 @@ public class AWSEC2HardwareSupplier extends EC2HardwareSupplier {
sizes.add(cc2_8xlarge().supportsImageIds(ccAmis).build());
sizes.add(hi1_4xlarge().supportsImageIds(ccAmis).build());
sizes.add(hs1_8xlarge().supportsImageIds(ccAmis).build());
sizes.add(g2_2xlarge().supportsImageIds(ccAmis).build());
sizes.addAll(ImmutableSet.<Hardware> of(t1_micro().build(), c1_medium().build(), c1_xlarge().build(), m1_large()
.build(), m1_small().build(), m1_medium().build(), m1_xlarge().build(), m2_xlarge().build(),
m2_2xlarge().build(), m2_4xlarge().build(), m3_xlarge().build(), m3_2xlarge().build()));