From bd552b3eaf8c4fa9e138e5033bbba21dead8f993 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Wed, 14 Dec 2011 22:42:08 -0800 Subject: [PATCH] southeast asia --- .../ec2/compute/TestCanRecreateGroupLiveTest.java | 2 +- .../main/java/org/jclouds/aws/domain/Region.java | 15 +++++++++++---- .../AWSCloudWatchPropertiesBuilder.java | 2 ++ .../cloudwatch/AWSCloudWatchProviderMetadata.java | 2 +- .../jclouds/aws/ec2/AWSEC2ProviderMetadata.java | 2 +- .../ec2/compute/AWSEC2ComputeServiceLiveTest.java | 2 +- .../compute/AWSEC2TemplateBuilderLiveTest.java | 2 +- .../ec2/services/SpotInstanceClientLiveTest.java | 4 ++-- .../jclouds/aws/s3/AWSS3PropertiesBuilder.java | 2 ++ .../org/jclouds/aws/s3/AWSS3ProviderMetadata.java | 2 +- .../AWSS3ServiceIntegrationLiveTest.java | 2 +- .../jclouds/aws/elb/AWSELBPropertiesBuilder.java | 6 ++++++ .../jclouds/aws/elb/AWSELBProviderMetadata.java | 2 +- .../simpledb/AWSSimpleDBPropertiesBuilder.java | 8 +++++++- .../aws/simpledb/AWSSimpleDBProviderMetadata.java | 2 +- 15 files changed, 39 insertions(+), 16 deletions(-) diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java index b82ef10ae0..c6e6eeae59 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateGroupLiveTest.java @@ -90,7 +90,7 @@ public class TestCanRecreateGroupLiveTest { context.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); try { - Template template = context.getComputeService().templateBuilder().locationId("us-west-2").build(); + Template template = context.getComputeService().templateBuilder().build(); context.getComputeService().createNodesInGroup(tag, 1, template); context.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); context.getComputeService().createNodesInGroup(tag, 1, template); diff --git a/common/aws/src/main/java/org/jclouds/aws/domain/Region.java b/common/aws/src/main/java/org/jclouds/aws/domain/Region.java index 64821a304e..e7ca0fd228 100644 --- a/common/aws/src/main/java/org/jclouds/aws/domain/Region.java +++ b/common/aws/src/main/java/org/jclouds/aws/domain/Region.java @@ -89,6 +89,12 @@ public class Region { */ public static final String US_WEST_2 = "us-west-2"; + /** + * SA-EAST-1 (Sao Paolo) + * + */ + public static final String SA_EAST_1 = "sa-east-1"; + /** * Region in Singapore, launched April 28, 2010. This region improves latency for Asia-based * users @@ -100,10 +106,10 @@ public class Region { */ public static final String AP_NORTHEAST_1 = "ap-northeast-1"; - public static Set DEFAULT_S3 = ImmutableSet.of(EU, US_STANDARD, US_WEST_1, US_WEST_2, AP_SOUTHEAST_1, + public static Set DEFAULT_S3 = ImmutableSet.of(EU, US_STANDARD, US_WEST_1, US_WEST_2, SA_EAST_1, AP_SOUTHEAST_1, AP_NORTHEAST_1); - public static Set DEFAULT_REGIONS = ImmutableSet.of(US_EAST_1, US_WEST_1, US_WEST_2, EU_WEST_1, + public static Set DEFAULT_REGIONS = ImmutableSet.of(US_EAST_1, US_WEST_1, US_WEST_2, SA_EAST_1, EU_WEST_1, AP_SOUTHEAST_1, AP_NORTHEAST_1); public static Properties regionPropertiesS3() { @@ -111,7 +117,7 @@ public class Region { Properties properties = regionProperties(); properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_S3)); // note that due to US_STANDARD the codes include US instead of US-VA - properties.setProperty(PROPERTY_ISO3166_CODES, "US,US-CA,US-OR,IE,SG,JP-13"); + properties.setProperty(PROPERTY_ISO3166_CODES, "US,US-CA,US-OR,BR-SP,IE,SG,JP-13"); properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + ISO3166_CODES, "US"); properties.setProperty(PROPERTY_REGION + "." + EU + "." + ISO3166_CODES, "IE"); return properties; @@ -120,10 +126,11 @@ public class Region { public static Properties regionProperties() { Properties properties = new Properties(); properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_REGIONS)); - properties.setProperty(PROPERTY_ISO3166_CODES, "US-VA,US-CA,US-OR,IE,SG,JP-13"); + properties.setProperty(PROPERTY_ISO3166_CODES, "US-VA,US-CA,US-OR,BR-SP,IE,SG,JP-13"); properties.setProperty(PROPERTY_REGION + "." + US_EAST_1 + "." + ISO3166_CODES, "US-VA"); properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + "." + ISO3166_CODES, "US-CA"); properties.setProperty(PROPERTY_REGION + "." + US_WEST_2 + "." + ISO3166_CODES, "US-OR"); + properties.setProperty(PROPERTY_REGION + "." + SA_EAST_1 + "." + ISO3166_CODES, "BR-SP"); properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + "." + ISO3166_CODES, "IE"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ISO3166_CODES, "SG"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ISO3166_CODES, "JP-13"); diff --git a/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchPropertiesBuilder.java b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchPropertiesBuilder.java index 1c8653987c..a3e988789f 100644 --- a/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchPropertiesBuilder.java +++ b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchPropertiesBuilder.java @@ -51,6 +51,8 @@ public class AWSCloudWatchPropertiesBuilder extends CloudWatchPropertiesBuilder "https://monitoring.us-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + Region.US_WEST_2 + ".endpoint", "https://monitoring.us-west-2.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + Region.SA_EAST_1 + ".endpoint", + "https://monitoring.sa-east-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + Region.EU_WEST_1 + ".endpoint", "https://monitoring.eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + Region.AP_SOUTHEAST_1 + ".endpoint", diff --git a/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java index ed273b97af..d07c5b6e6d 100644 --- a/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java +++ b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java @@ -110,6 +110,6 @@ public class AWSCloudWatchProviderMetadata extends BaseProviderMetadata { */ @Override public Set getIso3166Codes() { - return ImmutableSet.of("US-VA", "US-CA", "US-OR", "IE", "SG", "JP-13"); + return ImmutableSet.of("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "JP-13"); } } 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 3da0f1dd10..af2712f634 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 @@ -110,7 +110,7 @@ public class AWSEC2ProviderMetadata extends BaseProviderMetadata { */ @Override public Set getIso3166Codes() { - return ImmutableSet.of("US-VA", "US-CA", "US-OR", "IE", "SG", "JP-13"); + return ImmutableSet.of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); } } \ No newline at end of file diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java index 6b4044e4c1..094abc7a4e 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceLiveTest.java @@ -79,7 +79,7 @@ public class AWSEC2ComputeServiceLiveTest extends EC2ComputeServiceLiveTest { @Test(dependsOnMethods = "testCompareSizes") public void testExtendedOptionsAndLogin() throws Exception { // note that this is sensitive to regions that quickly fill spot requests - String region = "us-west-2"; + String region = "sa-east-1"; AWSSecurityGroupClient securityGroupClient = AWSEC2Client.class.cast(context.getProviderSpecificContext().getApi()) .getSecurityGroupServices(); diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java index 5d07030e51..088e588fe7 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java @@ -314,7 +314,7 @@ public class AWSEC2TemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest { @Override protected Set getIso3166Codes() { - return ImmutableSet. of("US-VA", "US-CA", "IE", "SG", "JP-13"); + return ImmutableSet. of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); } } diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java index fdbf33484b..d1c56b281f 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/services/SpotInstanceClientLiveTest.java @@ -164,10 +164,10 @@ public class SpotInstanceClientLiveTest { start = System.currentTimeMillis(); requests = client.getSpotInstanceServices().requestSpotInstancesInRegion( - "us-west-2", + "sa-east-1", 0.09f, 1, - LaunchSpecification.builder().imageId("ami-951945d0").instanceType(InstanceType.M1_SMALL).build(), + LaunchSpecification.builder().imageId("ami-3e3be423").instanceType(InstanceType.M1_SMALL).build(), launchGroup(launchGroup).availabilityZoneGroup(launchGroup).validFrom( new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(2))).validUntil( new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(SPOT_DELAY_SECONDS)))); diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3PropertiesBuilder.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3PropertiesBuilder.java index 9523c8ecda..37f07d74d6 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3PropertiesBuilder.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3PropertiesBuilder.java @@ -21,6 +21,7 @@ package org.jclouds.aws.s3; import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.aws.domain.Region.AP_NORTHEAST_1; import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_1; +import static org.jclouds.aws.domain.Region.SA_EAST_1; import static org.jclouds.aws.domain.Region.US_STANDARD; import static org.jclouds.aws.domain.Region.US_WEST_1; import static org.jclouds.aws.domain.Region.US_WEST_2; @@ -46,6 +47,7 @@ public class AWSS3PropertiesBuilder extends org.jclouds.s3.S3PropertiesBuilder { properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + ENDPOINT, "https://s3.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + "." + ENDPOINT, "https://s3-us-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + US_WEST_2 + "." + ENDPOINT, "https://s3-us-west-2.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + SA_EAST_1 + "." + ENDPOINT, "https://s3-sa-east-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + "EU" + "." + ENDPOINT, "https://s3-eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ENDPOINT, "https://s3-ap-southeast-1.amazonaws.com"); diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java index 56e3433e03..b5083fcd99 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java @@ -111,7 +111,7 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata { */ @Override public Set getIso3166Codes() { - return ImmutableSet.of("US", "US-CA", "US-OR", "IE", "SG", "JP-13"); + return ImmutableSet.of("US", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); } } \ No newline at end of file diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ServiceIntegrationLiveTest.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ServiceIntegrationLiveTest.java index 94c4d7b93b..9736063dd3 100644 --- a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ServiceIntegrationLiveTest.java +++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ServiceIntegrationLiveTest.java @@ -32,7 +32,7 @@ import com.google.common.collect.ImmutableSet; public class AWSS3ServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTest { @Override protected Set getIso3166Codes() { - return ImmutableSet. of("US", "US-CA", "IE", "SG", "JP-13"); + return ImmutableSet. of("US", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); } } diff --git a/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBPropertiesBuilder.java b/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBPropertiesBuilder.java index cb04282a04..759565c7ff 100644 --- a/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBPropertiesBuilder.java +++ b/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBPropertiesBuilder.java @@ -23,8 +23,10 @@ import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.aws.domain.Region.AP_NORTHEAST_1; import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_1; import static org.jclouds.aws.domain.Region.EU_WEST_1; +import static org.jclouds.aws.domain.Region.SA_EAST_1; import static org.jclouds.aws.domain.Region.US_EAST_1; import static org.jclouds.aws.domain.Region.US_WEST_1; +import static org.jclouds.aws.domain.Region.US_WEST_2; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_ZONECLIENT_ENDPOINT; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION; @@ -53,6 +55,10 @@ public class AWSELBPropertiesBuilder extends ELBPropertiesBuilder { "https://elasticloadbalancing.us-east-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + ".endpoint", "https://elasticloadbalancing.us-west-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + US_WEST_2 + ".endpoint", + "https://elasticloadbalancing.us-west-2.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + SA_EAST_1 + ".endpoint", + "https://elasticloadbalancing.sa-east-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + ".endpoint", "https://elasticloadbalancing.eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint", diff --git a/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java b/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java index 0d05733574..c916065c8d 100644 --- a/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java +++ b/sandbox-providers/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java @@ -110,6 +110,6 @@ public class AWSELBProviderMetadata extends BaseProviderMetadata { */ @Override public Set getIso3166Codes() { - return ImmutableSet.of("US-VA", "US-CA", "IE", "SG", "JP-13"); + return ImmutableSet.of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); } } \ No newline at end of file diff --git a/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBPropertiesBuilder.java b/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBPropertiesBuilder.java index 4a01eceeaf..6d032262e6 100644 --- a/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBPropertiesBuilder.java +++ b/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBPropertiesBuilder.java @@ -22,8 +22,10 @@ import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.aws.domain.Region.AP_NORTHEAST_1; import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_1; import static org.jclouds.aws.domain.Region.EU_WEST_1; +import static org.jclouds.aws.domain.Region.SA_EAST_1; import static org.jclouds.aws.domain.Region.US_EAST_1; import static org.jclouds.aws.domain.Region.US_WEST_1; +import static org.jclouds.aws.domain.Region.US_WEST_2; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION; @@ -48,12 +50,16 @@ public class AWSSimpleDBPropertiesBuilder extends org.jclouds.simpledb.SimpleDBP properties.setProperty(PROPERTY_REGION + "." + US_EAST_1 + ".endpoint", "https://sdb.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + ".endpoint", "https://sdb.us-west-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + US_WEST_2 + ".endpoint", + "https://sdb.us-west-2.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + SA_EAST_1 + ".endpoint", + "https://sdb.sa-east-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + ".endpoint", "https://sdb.eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint", "https://sdb.ap-southeast-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + ".endpoint", - "https://sdb.ap-northeast-1.amazonaws.com"); + "https://sdb.ap-northeast-1.amazonaws.com"); return properties; } diff --git a/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBProviderMetadata.java b/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBProviderMetadata.java index 87e734027b..a8b2dfc959 100644 --- a/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBProviderMetadata.java +++ b/sandbox-providers/aws-simpledb/src/main/java/org/jclouds/aws/simpledb/AWSSimpleDBProviderMetadata.java @@ -110,6 +110,6 @@ public class AWSSimpleDBProviderMetadata extends BaseProviderMetadata { */ @Override public Set getIso3166Codes() { - return ImmutableSet.of("US-VA", "US-CA", "IE", "SG", "JP-13"); + return ImmutableSet.of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); } } \ No newline at end of file