From 1a77b194e51c6e4a8303bebb4e7d1f7e23e09495 Mon Sep 17 00:00:00 2001 From: Richard Downer Date: Wed, 25 Apr 2012 19:37:19 +0300 Subject: [PATCH] EC2 Windows AMIs have a separate owner (which changed recently) - add this owner ID to the default set. Update WindowsClientLiveTest to use the default set and verify it passes. --- .../org/jclouds/ec2/services/WindowsClientLiveTest.java | 9 +-------- .../java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java index 5248538188..942d4b2d66 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java @@ -69,13 +69,6 @@ public class WindowsClientLiveTest extends BaseComputeServiceContextLiveTest { private static final String DEFAULT_INSTANCE = "i-TODO"; private static final String DEFAULT_BUCKET = "TODO"; - @Override - protected Properties setupProperties() { - Properties overrides = super.setupProperties(); - overrides.put(EC2Constants.PROPERTY_EC2_AMI_OWNERS, "206029621532"); /* Amazon Owner ID */ - return overrides; - } - @Override @BeforeClass(groups = { "integration", "live" }) public void setupContext() { @@ -124,7 +117,7 @@ public class WindowsClientLiveTest extends BaseComputeServiceContextLiveTest { Template template = computeService.templateBuilder() .osFamily(OsFamily.WINDOWS) .os64Bit(true) - .imageNameMatches("Windows-2008R2-SP1-English-Base-") + .imageNameMatches("Windows_Server-2008-R2_SP1-English-64Bit-Base-") .hardwareId(InstanceType.M1_LARGE) .options(TemplateOptions.Builder.inboundPorts(3389)) .build(); diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java index a75ea1eec4..77be4f1d7f 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java @@ -65,9 +65,9 @@ public class AWSEC2ProviderMetadata extends BaseProviderMetadata { // from stopping->stopped state on an ec2 micro properties.setProperty(TIMEOUT_NODE_SUSPENDED, 120 * 1000 + ""); properties.putAll(Region.regionProperties()); - // amazon, alestic, canonical, and rightscale + // Amazon Linux, Amazon Windows, alestic, canonical, and rightscale properties.setProperty(PROPERTY_EC2_AMI_QUERY, - "owner-id=137112412989,063491364108,099720109477,411009282317;state=available;image-type=machine"); + "owner-id=137112412989,801119661308,063491364108,099720109477,411009282317;state=available;image-type=machine"); // amis that work with the cluster instances properties.setProperty(PROPERTY_EC2_CC_REGIONS, Region.US_EAST_1); properties