Issue 780:add new sa-east-1 region

This commit is contained in:
Adrian Cole 2011-12-14 22:42:08 -08:00
parent c22f5afd32
commit 40d2abbac5
15 changed files with 39 additions and 16 deletions

View File

@ -90,7 +90,7 @@ public class TestCanRecreateGroupLiveTest {
context.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); context.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag));
try { 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().createNodesInGroup(tag, 1, template);
context.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag)); context.getComputeService().destroyNodesMatching(NodePredicates.inGroup(tag));
context.getComputeService().createNodesInGroup(tag, 1, template); context.getComputeService().createNodesInGroup(tag, 1, template);

View File

@ -89,6 +89,12 @@ public class Region {
*/ */
public static final String US_WEST_2 = "us-west-2"; 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 * Region in Singapore, launched April 28, 2010. This region improves latency for Asia-based
* users * users
@ -100,10 +106,10 @@ public class Region {
*/ */
public static final String AP_NORTHEAST_1 = "ap-northeast-1"; public static final String AP_NORTHEAST_1 = "ap-northeast-1";
public static Set<String> DEFAULT_S3 = ImmutableSet.of(EU, US_STANDARD, US_WEST_1, US_WEST_2, AP_SOUTHEAST_1, public static Set<String> DEFAULT_S3 = ImmutableSet.of(EU, US_STANDARD, US_WEST_1, US_WEST_2, SA_EAST_1, AP_SOUTHEAST_1,
AP_NORTHEAST_1); AP_NORTHEAST_1);
public static Set<String> DEFAULT_REGIONS = ImmutableSet.of(US_EAST_1, US_WEST_1, US_WEST_2, EU_WEST_1, public static Set<String> 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_NORTHEAST_1);
public static Properties regionPropertiesS3() { public static Properties regionPropertiesS3() {
@ -111,7 +117,7 @@ public class Region {
Properties properties = regionProperties(); Properties properties = regionProperties();
properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_S3)); properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_S3));
// note that due to US_STANDARD the codes include US instead of US-VA // 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 + "." + US_STANDARD + "." + ISO3166_CODES, "US");
properties.setProperty(PROPERTY_REGION + "." + EU + "." + ISO3166_CODES, "IE"); properties.setProperty(PROPERTY_REGION + "." + EU + "." + ISO3166_CODES, "IE");
return properties; return properties;
@ -120,10 +126,11 @@ public class Region {
public static Properties regionProperties() { public static Properties regionProperties() {
Properties properties = new Properties(); Properties properties = new Properties();
properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_REGIONS)); 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_EAST_1 + "." + ISO3166_CODES, "US-VA");
properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + "." + ISO3166_CODES, "US-CA"); 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 + "." + 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 + "." + EU_WEST_1 + "." + ISO3166_CODES, "IE");
properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ISO3166_CODES, "SG"); properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ISO3166_CODES, "SG");
properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ISO3166_CODES, "JP-13"); properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ISO3166_CODES, "JP-13");

View File

@ -51,6 +51,8 @@ public class AWSCloudWatchPropertiesBuilder extends CloudWatchPropertiesBuilder
"https://monitoring.us-west-1.amazonaws.com"); "https://monitoring.us-west-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + Region.US_WEST_2 + ".endpoint", properties.setProperty(PROPERTY_REGION + "." + Region.US_WEST_2 + ".endpoint",
"https://monitoring.us-west-2.amazonaws.com"); "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", properties.setProperty(PROPERTY_REGION + "." + Region.EU_WEST_1 + ".endpoint",
"https://monitoring.eu-west-1.amazonaws.com"); "https://monitoring.eu-west-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + Region.AP_SOUTHEAST_1 + ".endpoint", properties.setProperty(PROPERTY_REGION + "." + Region.AP_SOUTHEAST_1 + ".endpoint",

View File

@ -110,6 +110,6 @@ public class AWSCloudWatchProviderMetadata extends BaseProviderMetadata {
*/ */
@Override @Override
public Set<String> getIso3166Codes() { public Set<String> 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");
} }
} }

View File

@ -110,7 +110,7 @@ public class AWSEC2ProviderMetadata extends BaseProviderMetadata {
*/ */
@Override @Override
public Set<String> getIso3166Codes() { public Set<String> 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");
} }
} }

View File

@ -79,7 +79,7 @@ public class AWSEC2ComputeServiceLiveTest extends EC2ComputeServiceLiveTest {
@Test(dependsOnMethods = "testCompareSizes") @Test(dependsOnMethods = "testCompareSizes")
public void testExtendedOptionsAndLogin() throws Exception { public void testExtendedOptionsAndLogin() throws Exception {
// note that this is sensitive to regions that quickly fill spot requests // 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()) AWSSecurityGroupClient securityGroupClient = AWSEC2Client.class.cast(context.getProviderSpecificContext().getApi())
.getSecurityGroupServices(); .getSecurityGroupServices();

View File

@ -364,7 +364,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
@Override @Override
protected Set<String> getIso3166Codes() { protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-VA", "US-CA", "US-OR", "IE", "SG", "JP-13"); return ImmutableSet.<String> of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13");
} }
} }

View File

@ -164,10 +164,10 @@ public class SpotInstanceClientLiveTest {
start = System.currentTimeMillis(); start = System.currentTimeMillis();
requests = client.getSpotInstanceServices().requestSpotInstancesInRegion( requests = client.getSpotInstanceServices().requestSpotInstancesInRegion(
"us-west-2", "sa-east-1",
0.09f, 0.09f,
1, 1,
LaunchSpecification.builder().imageId("ami-38fe7308").instanceType(InstanceType.M1_SMALL).build(), LaunchSpecification.builder().imageId("ami-3e3be423").instanceType(InstanceType.M1_SMALL).build(),
launchGroup(launchGroup).availabilityZoneGroup(launchGroup).validFrom( launchGroup(launchGroup).availabilityZoneGroup(launchGroup).validFrom(
new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(2))).validUntil( new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(2))).validUntil(
new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(SPOT_DELAY_SECONDS)))); new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(SPOT_DELAY_SECONDS))));

View File

@ -21,6 +21,7 @@ package org.jclouds.aws.s3;
import static org.jclouds.Constants.PROPERTY_ENDPOINT; 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_NORTHEAST_1;
import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_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_STANDARD;
import static org.jclouds.aws.domain.Region.US_WEST_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.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_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_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 + "." + 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 + "." + "EU" + "." + ENDPOINT, "https://s3-eu-west-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ENDPOINT, properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ENDPOINT,
"https://s3-ap-southeast-1.amazonaws.com"); "https://s3-ap-southeast-1.amazonaws.com");

View File

@ -111,7 +111,7 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata {
*/ */
@Override @Override
public Set<String> getIso3166Codes() { public Set<String> 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");
} }
} }

View File

@ -32,7 +32,7 @@ import com.google.common.collect.ImmutableSet;
public class AWSS3ServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTest { public class AWSS3ServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTest {
@Override @Override
protected Set<String> getIso3166Codes() { protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US", "US-CA", "IE", "SG", "JP-13"); return ImmutableSet.<String> of("US", "US-CA", "US-OR", "BR-SP", "IE", "SG", "JP-13");
} }
} }

View File

@ -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_NORTHEAST_1;
import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_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.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_EAST_1;
import static org.jclouds.aws.domain.Region.US_WEST_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_AUTH_TAG;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_ZONECLIENT_ENDPOINT; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_ZONECLIENT_ENDPOINT;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION; 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"); "https://elasticloadbalancing.us-east-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + ".endpoint", properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + ".endpoint",
"https://elasticloadbalancing.us-west-1.amazonaws.com"); "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", properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + ".endpoint",
"https://elasticloadbalancing.eu-west-1.amazonaws.com"); "https://elasticloadbalancing.eu-west-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint", properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint",

View File

@ -110,6 +110,6 @@ public class AWSELBProviderMetadata extends BaseProviderMetadata {
*/ */
@Override @Override
public Set<String> getIso3166Codes() { public Set<String> 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");
} }
} }

View File

@ -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_NORTHEAST_1;
import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_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.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_EAST_1;
import static org.jclouds.aws.domain.Region.US_WEST_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_AUTH_TAG;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION; 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_EAST_1 + ".endpoint", "https://sdb.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + ".endpoint", properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + ".endpoint",
"https://sdb.us-west-1.amazonaws.com"); "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", properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + ".endpoint",
"https://sdb.eu-west-1.amazonaws.com"); "https://sdb.eu-west-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint", properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + ".endpoint",
"https://sdb.ap-southeast-1.amazonaws.com"); "https://sdb.ap-southeast-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + ".endpoint", properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + ".endpoint",
"https://sdb.ap-northeast-1.amazonaws.com"); "https://sdb.ap-northeast-1.amazonaws.com");
return properties; return properties;
} }

View File

@ -110,6 +110,6 @@ public class AWSSimpleDBProviderMetadata extends BaseProviderMetadata {
*/ */
@Override @Override
public Set<String> getIso3166Codes() { public Set<String> 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");
} }
} }