JCLOUDS-1262: Add the Ohio region to AWS

This commit is contained in:
Ignasi Barrera 2017-03-29 09:17:41 +02:00
parent 73875884b5
commit fcc8310d90
5 changed files with 21 additions and 9 deletions

View File

@ -71,10 +71,15 @@ public class Region {
public static final String US_STANDARD = "us-standard"; public static final String US_STANDARD = "us-standard";
/** /**
* * US-East-1 (N. Virginia)
*/ */
public static final String US_EAST_1 = "us-east-1"; public static final String US_EAST_1 = "us-east-1";
/**
* US-East-2 (Ohio)
*/
public static final String US_EAST_2 = "us-east-2";
/** /**
* US-West (Northern California) <h3>S3</h3> Uses Amazon S3 servers in Northern California * US-West (Northern California) <h3>S3</h3> Uses Amazon S3 servers in Northern California
* <p/> * <p/>
@ -136,10 +141,10 @@ public class Region {
*/ */
public static final String CN_NORTH_1 = "cn-north-1"; public static final String CN_NORTH_1 = "cn-north-1";
public static final Set<String> DEFAULT_S3 = ImmutableSet.of(US_STANDARD, US_WEST_1, US_WEST_2, CA_CENTRAL_1, EU_WEST_1, EU_WEST_2, EU_CENTRAL_1, SA_EAST_1, public static final Set<String> DEFAULT_S3 = ImmutableSet.of(US_STANDARD, US_EAST_2, US_WEST_1, US_WEST_2, CA_CENTRAL_1, EU_WEST_1, EU_WEST_2, EU_CENTRAL_1, SA_EAST_1,
AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1); AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1);
public static final Set<String> DEFAULT_REGIONS = ImmutableSet.of(US_EAST_1, US_WEST_1, US_WEST_2, CA_CENTRAL_1, SA_EAST_1, public static final Set<String> DEFAULT_REGIONS = ImmutableSet.of(US_EAST_1, US_EAST_2, US_WEST_1, US_WEST_2, CA_CENTRAL_1, SA_EAST_1,
EU_WEST_1, EU_WEST_2, EU_CENTRAL_1, AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1); EU_WEST_1, EU_WEST_2, EU_CENTRAL_1, AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1);
public static Properties regionPropertiesS3() { public static Properties regionPropertiesS3() {
@ -147,7 +152,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,CA,BR-SP,IE,GB-LND,DE-HE,SG,AU-NSW,IN-MH,JP-13,KR-11,CN-11"); properties.setProperty(PROPERTY_ISO3166_CODES, "US,US_OH,US-CA,US-OR,CA,BR-SP,IE,GB-LND,DE-HE,SG,AU-NSW,IN-MH,JP-13,KR-11,CN-11");
properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + ISO3166_CODES, "US"); properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + ISO3166_CODES, "US");
return properties; return properties;
} }
@ -155,8 +160,9 @@ 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,CA,BR-SP,IE,GB-LND,DE-HE,SG,AU-NSW,IN-MH,JP-13,KR-11,CN-11"); properties.setProperty(PROPERTY_ISO3166_CODES, "US-VA,US_OH,US-CA,US-OR,CA,BR-SP,IE,GB-LND,DE-HE,SG,AU-NSW,IN-MH,JP-13,KR-11,CN-11");
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_EAST_2 + "." + ISO3166_CODES, "US-OH");
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 + "." + CA_CENTRAL_1 + "." + ISO3166_CODES, "CA"); properties.setProperty(PROPERTY_REGION + "." + CA_CENTRAL_1 + "." + ISO3166_CODES, "CA");

View File

@ -86,7 +86,7 @@ public class AWSEC2ProviderMetadata extends BaseProviderMetadata {
.console(URI.create("https://console.aws.amazon.com/ec2/home")) .console(URI.create("https://console.aws.amazon.com/ec2/home"))
.defaultProperties(AWSEC2ProviderMetadata.defaultProperties()) .defaultProperties(AWSEC2ProviderMetadata.defaultProperties())
.linkedServices("aws-ec2", "aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb") .linkedServices("aws-ec2", "aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb")
.iso3166Codes("US-VA", "US-CA", "US-OR", "CA", "BR-SP", "IE", "GB-LND", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-11"); .iso3166Codes("US-VA", "US_OH", "US-CA", "US-OR", "CA", "BR-SP", "IE", "GB-LND", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-11");
} }
@Override @Override

View File

@ -353,7 +353,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
@Override @Override
protected Set<String> getIso3166Codes() { protected Set<String> getIso3166Codes() {
return ImmutableSet.of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11"); return ImmutableSet.of("US-VA", "US-OH", "US-CA", "US-OR", "CA", "BR-SP", "IE", "GB-LND", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-11");
} }
} }

View File

@ -22,15 +22,16 @@ import static org.jclouds.aws.domain.Region.AP_NORTHEAST_2;
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.AP_SOUTHEAST_2; import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_2;
import static org.jclouds.aws.domain.Region.AP_SOUTH_1; import static org.jclouds.aws.domain.Region.AP_SOUTH_1;
import static org.jclouds.aws.domain.Region.CA_CENTRAL_1;
import static org.jclouds.aws.domain.Region.CN_NORTH_1; import static org.jclouds.aws.domain.Region.CN_NORTH_1;
import static org.jclouds.aws.domain.Region.EU_CENTRAL_1; import static org.jclouds.aws.domain.Region.EU_CENTRAL_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.EU_WEST_2; import static org.jclouds.aws.domain.Region.EU_WEST_2;
import static org.jclouds.aws.domain.Region.SA_EAST_1; import static org.jclouds.aws.domain.Region.SA_EAST_1;
import static org.jclouds.aws.domain.Region.US_EAST_2;
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;
import static org.jclouds.aws.domain.Region.CA_CENTRAL_1;
import static org.jclouds.location.reference.LocationConstants.ENDPOINT; import static org.jclouds.location.reference.LocationConstants.ENDPOINT;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;
@ -72,6 +73,7 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata {
properties.putAll(Region.regionPropertiesS3()); properties.putAll(Region.regionPropertiesS3());
properties.setProperty(PROPERTY_ENDPOINT, "https://s3.amazonaws.com"); properties.setProperty(PROPERTY_ENDPOINT, "https://s3.amazonaws.com");
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_EAST_2 + "." + ENDPOINT, "https://s3-us-east-2.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 + "." + CA_CENTRAL_1 + "." + ENDPOINT, "https://s3-ca-central-1.amazonaws.com"); properties.setProperty(PROPERTY_REGION + "." + CA_CENTRAL_1 + "." + ENDPOINT, "https://s3-ca-central-1.amazonaws.com");
@ -104,7 +106,7 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata {
.homepage(URI.create("http://aws.amazon.com/s3")) .homepage(URI.create("http://aws.amazon.com/s3"))
.console(URI.create("https://console.aws.amazon.com/s3/home")) .console(URI.create("https://console.aws.amazon.com/s3/home"))
.linkedServices("aws-ec2", "aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb") .linkedServices("aws-ec2", "aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb")
.iso3166Codes("US", "US-CA", "US-OR", "CA", "BR-SP", "IE", "GB-LND", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-11") .iso3166Codes("US", "US_OH", "US-CA", "US-OR", "CA", "BR-SP", "IE", "GB-LND", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-11")
.defaultProperties(AWSS3ProviderMetadata.defaultProperties()); .defaultProperties(AWSS3ProviderMetadata.defaultProperties());
} }

View File

@ -35,7 +35,10 @@ public class AWSS3ServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTes
return ImmutableSet.<String> of( return ImmutableSet.<String> of(
"AU-NSW", "AU-NSW",
"BR-SP", "BR-SP",
"CA",
"CN-11",
"DE-HE", "DE-HE",
"GB-LND",
"IE", "IE",
"IN-MH", "IN-MH",
"JP-13", "JP-13",
@ -43,6 +46,7 @@ public class AWSS3ServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTes
"SG", "SG",
"US", "US",
"US-CA", "US-CA",
"US-OH",
"US-OR"); "US-OR");
} }