diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java index e35bf7e54c..f0ef03532d 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java @@ -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. 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) diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java index f15be10a7a..4fb9392068 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java @@ -229,4 +229,17 @@ public class InstanceType { * */ public static final String HS1_8XLARGE = "hs1.8xlarge"; + + /** + * GPU Instance Double Extra Large + * + */ + public static final String G2_2XLARGE = "g2.2xlarge"; + } diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java index bfeec2a39c..06fcf8560c 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java @@ -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> sizes = Suppliers.> ofInstance(ImmutableSet . 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) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java index 8f9a001f5a..e49fff4d94 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java @@ -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. 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()));