mirror of https://github.com/apache/jclouds.git
JCLOUDS-1217/JCLOUDS-1258: Add Canada, London and China regions to AWS
This commit is contained in:
parent
2633fcc1ab
commit
73875884b5
|
@ -46,6 +46,11 @@ public class Region {
|
|||
*/
|
||||
public static final String EU_WEST_1 = "eu-west-1";
|
||||
|
||||
/**
|
||||
* EU (London)
|
||||
*/
|
||||
public static final String EU_WEST_2 = "eu-west-2";
|
||||
|
||||
/**
|
||||
* EU (Frankfurt)
|
||||
*/
|
||||
|
@ -82,12 +87,17 @@ public class Region {
|
|||
* and DELETES.
|
||||
*/
|
||||
public static final String US_WEST_1 = "us-west-1";
|
||||
|
||||
|
||||
/**
|
||||
* US-West-2 (Oregon)
|
||||
*/
|
||||
public static final String US_WEST_2 = "us-west-2";
|
||||
|
||||
|
||||
/**
|
||||
* CA-CENTRAL-1 (Canada)
|
||||
*/
|
||||
public static final String CA_CENTRAL_1 = "ca-central-1";
|
||||
|
||||
/**
|
||||
* SA-EAST-1 (Sao Paolo)
|
||||
*
|
||||
|
@ -115,24 +125,29 @@ public class Region {
|
|||
* Region in Tokyo, launched March 2, 2011. This region improves latency for Asia-based users
|
||||
*/
|
||||
public static final String AP_NORTHEAST_1 = "ap-northeast-1";
|
||||
|
||||
|
||||
/**
|
||||
* Region in Seoul, launched January 6, 2016. This region improves latency for Asia-based users
|
||||
*/
|
||||
public static final String AP_NORTHEAST_2 = "ap-northeast-2";
|
||||
|
||||
public static final Set<String> DEFAULT_S3 = ImmutableSet.of(US_STANDARD, US_WEST_1, US_WEST_2, EU_WEST_1, EU_CENTRAL_1, SA_EAST_1,
|
||||
AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2);
|
||||
/**
|
||||
* Region in Beijing, launched early 2014. This region improves latency for China users
|
||||
*/
|
||||
public static final String CN_NORTH_1 = "cn-north-1";
|
||||
|
||||
public static final Set<String> DEFAULT_REGIONS = ImmutableSet.of(US_EAST_1, US_WEST_1, US_WEST_2, SA_EAST_1,
|
||||
EU_WEST_1, EU_CENTRAL_1, AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2);
|
||||
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,
|
||||
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,
|
||||
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() {
|
||||
|
||||
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,DE-HE,SG,AU-NSW,IN-MH,JP-13,KR-11");
|
||||
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_REGION + "." + US_STANDARD + "." + ISO3166_CODES, "US");
|
||||
return properties;
|
||||
}
|
||||
|
@ -140,18 +155,21 @@ 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,DE-HE,SG,AU-NSW,IN-MH,JP-13,KR-11");
|
||||
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_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 + "." + CA_CENTRAL_1 + "." + ISO3166_CODES, "CA");
|
||||
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_2 + "." + ISO3166_CODES, "GB-LND");
|
||||
properties.setProperty(PROPERTY_REGION + "." + EU_CENTRAL_1 + "." + ISO3166_CODES, "DE-HE");
|
||||
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_SOUTH_1 + "." + ISO3166_CODES, "IN-MH");
|
||||
properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ISO3166_CODES, "JP-13");
|
||||
properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_2 + "." + ISO3166_CODES, "KR-11");
|
||||
properties.setProperty(PROPERTY_REGION + "." + CN_NORTH_1 + "." + ISO3166_CODES, "CN-11");
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,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", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11");
|
||||
.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");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,12 +22,15 @@ 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_2;
|
||||
import static org.jclouds.aws.domain.Region.AP_SOUTH_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_WEST_1;
|
||||
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.US_STANDARD;
|
||||
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.CA_CENTRAL_1;
|
||||
import static org.jclouds.location.reference.LocationConstants.ENDPOINT;
|
||||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;
|
||||
|
||||
|
@ -71,10 +74,12 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata {
|
|||
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 + "." + CA_CENTRAL_1 + "." + ENDPOINT, "https://s3-ca-central-1.amazonaws.com");
|
||||
properties.setProperty(PROPERTY_REGION + "." + SA_EAST_1 + "." + ENDPOINT, "https://s3-sa-east-1.amazonaws.com");
|
||||
properties.setProperty(PROPERTY_REGION + "." + EU_CENTRAL_1 + "." + ENDPOINT,
|
||||
"https://s3-eu-central-1.amazonaws.com");
|
||||
properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + "." + ENDPOINT, "https://s3-eu-west-1.amazonaws.com");
|
||||
properties.setProperty(PROPERTY_REGION + "." + EU_WEST_2 + "." + ENDPOINT, "https://s3-eu-west-2.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,
|
||||
|
@ -85,6 +90,8 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata {
|
|||
"https://s3-ap-northeast-1.amazonaws.com");
|
||||
properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_2 + "." + ENDPOINT,
|
||||
"https://s3-ap-northeast-2.amazonaws.com");
|
||||
properties.setProperty(PROPERTY_REGION + "." + CN_NORTH_1 + "." + ENDPOINT,
|
||||
"https://s3.cn-north-1.amazonaws.com.cn");
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
@ -97,7 +104,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", "DE-HE", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11")
|
||||
.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")
|
||||
.defaultProperties(AWSS3ProviderMetadata.defaultProperties());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue