From db786f3b202d96aa51b6efe3c4591624280b8013 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Tue, 13 Nov 2012 08:46:01 -0800 Subject: [PATCH] Issue 1123: add new Asia Pacific (Sydney) Region [ap-southeast-2] --- .../main/java/org/jclouds/aws/domain/Region.java | 16 +++++++++++----- .../jclouds/aws/elb/AWSELBProviderMetadata.java | 5 ++++- .../jclouds/aws/iam/AWSIAMProviderMetadata.java | 2 +- .../jclouds/aws/rds/AWSRDSProviderMetadata.java | 7 +++++-- .../AWSCloudWatchProviderMetadata.java | 4 +++- .../jclouds/aws/ec2/AWSEC2ProviderMetadata.java | 2 +- .../compute/AWSEC2TemplateBuilderLiveTest.java | 2 +- .../jclouds/aws/s3/AWSS3ProviderMetadata.java | 5 ++++- .../AWSS3ServiceIntegrationLiveTest.java | 2 +- .../jclouds/aws/sqs/AWSSQSProviderMetadata.java | 7 +++++-- 10 files changed, 36 insertions(+), 16 deletions(-) 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 be1843812f..90dfa25ebe 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 @@ -93,6 +93,11 @@ public class Region { */ public static final String SA_EAST_1 = "sa-east-1"; + /** + * Asia Pacific (Sydney) + */ + public static final String AP_SOUTHEAST_2 = "ap-southeast-2"; + /** * Region in Singapore, launched April 28, 2010. This region improves latency for Asia-based * users @@ -104,18 +109,18 @@ public class Region { */ public static final String AP_NORTHEAST_1 = "ap-northeast-1"; - public static Set DEFAULT_S3 = ImmutableSet.of(US_STANDARD, US_WEST_1, US_WEST_2, EU_WEST_1, SA_EAST_1, AP_SOUTHEAST_1, - AP_NORTHEAST_1); + public static Set DEFAULT_S3 = ImmutableSet.of(US_STANDARD, US_WEST_1, US_WEST_2, EU_WEST_1, SA_EAST_1, + AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_NORTHEAST_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); + AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_NORTHEAST_1); public static Properties regionPropertiesS3() { 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,BR-SP,IE,SG,JP-13"); + properties.setProperty(PROPERTY_ISO3166_CODES, "US,US-CA,US-OR,BR-SP,IE,SG,AU-NSW,JP-13"); properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + ISO3166_CODES, "US"); properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + "." + ISO3166_CODES, "IE"); return properties; @@ -124,13 +129,14 @@ 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,BR-SP,IE,SG,JP-13"); + properties.setProperty(PROPERTY_ISO3166_CODES, "US-VA,US-CA,US-OR,BR-SP,IE,SG,AU-NSW,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_SOUTHEAST_2 + "." + ISO3166_CODES, "AU-NSW"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ISO3166_CODES, "JP-13"); return properties; } diff --git a/labs/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java b/labs/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java index c59d004974..3143a4cf1d 100644 --- a/labs/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java +++ b/labs/aws-elb/src/main/java/org/jclouds/aws/elb/AWSELBProviderMetadata.java @@ -20,6 +20,7 @@ package org.jclouds.aws.elb; 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.AP_SOUTHEAST_2; 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; @@ -79,6 +80,8 @@ public class AWSELBProviderMetadata extends BaseProviderMetadata { "https://elasticloadbalancing.eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint", "https://elasticloadbalancing.ap-southeast-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_2 + ".endpoint", + "https://elasticloadbalancing.ap-southeast-2.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + ".endpoint", "https://elasticloadbalancing.ap-northeast-1.amazonaws.com"); properties.setProperty(PROPERTY_ZONECLIENT_ENDPOINT, "https://ec2.us-east-1.amazonaws.com"); @@ -94,7 +97,7 @@ public class AWSELBProviderMetadata extends BaseProviderMetadata { .homepage(URI.create("http://aws.amazon.com/elasticloadbalancing")) .console(URI.create("https://console.aws.amazon.com/ec2/home")) .linkedServices("aws-ec2","aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb") - .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "JP-13") + .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "AU-NSW", "JP-13") .apiMetadata(new ELBApiMetadata()) .defaultProperties(AWSELBProviderMetadata.defaultProperties()); } diff --git a/labs/aws-iam/src/main/java/org/jclouds/aws/iam/AWSIAMProviderMetadata.java b/labs/aws-iam/src/main/java/org/jclouds/aws/iam/AWSIAMProviderMetadata.java index 349990532f..43dd6a516a 100644 --- a/labs/aws-iam/src/main/java/org/jclouds/aws/iam/AWSIAMProviderMetadata.java +++ b/labs/aws-iam/src/main/java/org/jclouds/aws/iam/AWSIAMProviderMetadata.java @@ -67,7 +67,7 @@ public class AWSIAMProviderMetadata extends BaseProviderMetadata { .homepage(URI.create("http://aws.amazon.com/iam")) .console(URI.create("https://console.aws.amazon.com/iam/home")) .linkedServices("aws-ec2","aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb") - .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "JP-13") + .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "AU-NSW", "JP-13") .apiMetadata(new IAMApiMetadata()) .defaultProperties(AWSIAMProviderMetadata.defaultProperties()); } diff --git a/labs/aws-rds/src/main/java/org/jclouds/aws/rds/AWSRDSProviderMetadata.java b/labs/aws-rds/src/main/java/org/jclouds/aws/rds/AWSRDSProviderMetadata.java index b1359a53ee..84f86d534a 100644 --- a/labs/aws-rds/src/main/java/org/jclouds/aws/rds/AWSRDSProviderMetadata.java +++ b/labs/aws-rds/src/main/java/org/jclouds/aws/rds/AWSRDSProviderMetadata.java @@ -20,6 +20,7 @@ package org.jclouds.aws.rds; 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.AP_SOUTHEAST_2; 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; @@ -32,9 +33,9 @@ import java.net.URI; import java.util.Properties; import org.jclouds.aws.domain.Region; -import org.jclouds.rds.RDSApiMetadata; import org.jclouds.providers.ProviderMetadata; import org.jclouds.providers.internal.BaseProviderMetadata; +import org.jclouds.rds.RDSApiMetadata; /** * Implementation of @ link org.jclouds.types.ProviderMetadata} for Amazon's Elastic Load Balancing @@ -79,6 +80,8 @@ public class AWSRDSProviderMetadata extends BaseProviderMetadata { "https://rds.eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint", "https://rds.ap-southeast-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_2 + ".endpoint", + "https://rds.ap-southeast-2.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + ".endpoint", "https://rds.ap-northeast-1.amazonaws.com"); properties.setProperty(PROPERTY_ZONECLIENT_ENDPOINT, "https://ec2.us-east-1.amazonaws.com"); @@ -94,7 +97,7 @@ public class AWSRDSProviderMetadata extends BaseProviderMetadata { .homepage(URI.create("http://aws.amazon.com/rds")) .console(URI.create("https://console.aws.amazon.com/ec2/home")) .linkedServices("aws-ec2", "aws-rds", "aws-elb", "aws-iam","aws-cloudwatch", "aws-s3", "aws-simpledb") - .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "JP-13") + .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "AU-NSW", "JP-13") .apiMetadata(new RDSApiMetadata()) .defaultProperties(AWSRDSProviderMetadata.defaultProperties()); } 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 ed9bf7ee3a..ab0d7f85d8 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 @@ -71,6 +71,8 @@ public class AWSCloudWatchProviderMetadata extends BaseProviderMetadata { "https://monitoring.eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + Region.AP_SOUTHEAST_1 + ".endpoint", "https://monitoring.ap-southeast-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + Region.AP_SOUTHEAST_2 + ".endpoint", + "https://monitoring.ap-southeast-2.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + Region.AP_NORTHEAST_1 + ".endpoint", "https://monitoring.ap-northeast-1.amazonaws.com"); return properties; @@ -85,7 +87,7 @@ public class AWSCloudWatchProviderMetadata extends BaseProviderMetadata { .homepage(URI.create("http://aws.amazon.com/cloudwatch")) .console(URI.create("https://console.aws.amazon.com/cloudwatch/home")) .linkedServices("aws-ec2","aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb") - .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "JP-13") + .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "AU-NSW", "JP-13") .apiMetadata( new CloudWatchApiMetadata().toBuilder() .version("2010-08-01").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 ad92026330..03f82f9dc7 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 @@ -89,7 +89,7 @@ public class AWSEC2ProviderMetadata extends BaseProviderMetadata { .console(URI.create("https://console.aws.amazon.com/ec2/home")) .defaultProperties(AWSEC2ProviderMetadata.defaultProperties()) .linkedServices("aws-ec2","aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb") - .iso3166Codes("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); + .iso3166Codes("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "AU-NSW", "JP-13"); } @Override 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 39e1ae9193..0a78eb7dec 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 @@ -377,7 +377,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest { @Override protected Set getIso3166Codes() { - return ImmutableSet. of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); + return ImmutableSet. of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "AU-NSW", "JP-13"); } } 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 f4b821d30b..f015e05b00 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 @@ -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.AP_SOUTHEAST_2; 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_STANDARD; @@ -75,6 +76,8 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata { properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + "." + ENDPOINT, "https://s3-eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ENDPOINT, "https://s3-ap-southeast-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_2 + "." + ENDPOINT, + "https://s3-ap-southeast-2.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ENDPOINT, "https://s3-ap-northeast-1.amazonaws.com"); return properties; @@ -89,7 +92,7 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata { .homepage(URI.create("http://aws.amazon.com/s3")) .console(URI.create("https://console.aws.amazon.com/s3/home")) .linkedServices("aws-ec2","aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb") - .iso3166Codes("US", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13") + .iso3166Codes("US", "US-CA", "US-OR", "BR-SP", "IE", "SG", "AU-NSW", "JP-13") .defaultProperties(AWSS3ProviderMetadata.defaultProperties()); } 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 caadb04705..e106a462ab 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 @@ -36,7 +36,7 @@ public class AWSS3ServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTes @Override protected Set getIso3166Codes() { - return ImmutableSet. of("US", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13"); + return ImmutableSet. of("US", "US-CA", "US-OR", "BR-SP", "IE", "SG", "AU-NSW", "JP-13"); } } diff --git a/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java b/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java index 5b85c987ea..e53d6aeb63 100644 --- a/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java +++ b/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java @@ -20,6 +20,7 @@ package org.jclouds.aws.sqs; 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.AP_SOUTHEAST_2; 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; @@ -31,9 +32,9 @@ import java.net.URI; import java.util.Properties; import org.jclouds.aws.domain.Region; -import org.jclouds.sqs.SQSApiMetadata; import org.jclouds.providers.ProviderMetadata; import org.jclouds.providers.internal.BaseProviderMetadata; +import org.jclouds.sqs.SQSApiMetadata; /** * Implementation of @ link org.jclouds.types.ProviderMetadata} for Amazon's Simple Queue Service @@ -78,6 +79,8 @@ public class AWSSQSProviderMetadata extends BaseProviderMetadata { "https://sqs.eu-west-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint", "https://sqs.ap-southeast-1.amazonaws.com"); + properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_2 + ".endpoint", + "https://sqs.ap-southeast-2.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + ".endpoint", "https://sqs.ap-northeast-1.amazonaws.com"); return properties; @@ -92,7 +95,7 @@ public class AWSSQSProviderMetadata extends BaseProviderMetadata { .homepage(URI.create("http://aws.amazon.com/sqs")) .console(URI.create("https://console.aws.amazon.com/ec2/home")) .linkedServices("aws-ec2", "aws-rds", "aws-sqs", "aws-elb", "aws-iam","aws-cloudwatch", "aws-s3", "aws-simpledb") - .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "JP-13") + .iso3166Codes("US-VA", "US-CA", "BR-SP", "US-OR", "IE", "SG", "AU-NSW", "JP-13") .apiMetadata(new SQSApiMetadata()) .defaultProperties(AWSSQSProviderMetadata.defaultProperties()); }