This is an automated email from the ASF dual-hosted git repository.

gaul pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/jclouds.git


The following commit(s) were added to refs/heads/2.2.x by this push:
     new f876800  JCLOUDS-1541: Add Middle East (Bahrain) region to the AWS EC2 
and S3 providers list
f876800 is described below

commit f8768003708d78fcb599373523599f2bed63cf27
Author: ikky888 <[email protected]>
AuthorDate: Sat Apr 4 09:48:01 2020 +0800

    JCLOUDS-1541: Add Middle East (Bahrain) region to the AWS EC2 and S3 
providers list
---
 apis/sts/src/main/java/org/jclouds/aws/domain/Region.java | 15 +++++++++++----
 .../java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java  |  2 +-
 .../aws/ec2/compute/AWSEC2TemplateBuilderLiveTest.java    |  2 +-
 .../java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java    |  4 +++-
 .../integration/AWSS3ServiceIntegrationLiveTest.java      |  1 +
 5 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/apis/sts/src/main/java/org/jclouds/aws/domain/Region.java 
b/apis/sts/src/main/java/org/jclouds/aws/domain/Region.java
index c68895d..5d6694d 100644
--- a/apis/sts/src/main/java/org/jclouds/aws/domain/Region.java
+++ b/apis/sts/src/main/java/org/jclouds/aws/domain/Region.java
@@ -159,16 +159,22 @@ public class Region {
     * Region in Ningxia, launched  Dec 12, 2017. This region improves latency 
for China users
     */
    public static final String CN_NORTHWEST_1 = "cn-northwest-1";
+   
+   /**
+    * ME (Bahrain)
+    */
+   public static final String ME_SOUTH_1 = "me-south-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_WEST_3, EU_CENTRAL_1, 
EU_NORTH_1, SA_EAST_1, AP_SOUTHEAST_1,
          AP_SOUTHEAST_2,
-         AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1, 
CN_NORTHWEST_1);
+         AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1, 
CN_NORTHWEST_1, ME_SOUTH_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_WEST_3, 
EU_CENTRAL_1, EU_NORTH_1, AP_SOUTHEAST_1,
          AP_SOUTHEAST_2,
-         AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1, 
CN_NORTHWEST_1);
+         AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1, 
CN_NORTHWEST_1, ME_SOUTH_1);
 
    public static Properties regionPropertiesS3() {
 
@@ -177,7 +183,7 @@ public class Region {
       // note that due to US_STANDARD the codes include US instead of US-VA
       properties.setProperty(PROPERTY_ISO3166_CODES, 
"US,US-OH,US-CA,US-OR,CA,BR-SP,IE,GB-LND,FR-IDF,DE-HE,SE-AB,SG,"
             + "AU-NSW,"
-            + "IN-MH,JP-13,KR-11,CN-BJ,CN-NX");
+            + "IN-MH,JP-13,KR-11,CN-BJ,CN-NX,BH");
       properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + 
ISO3166_CODES, "US");
       return properties;
    }
@@ -186,7 +192,7 @@ public class Region {
       Properties properties = new Properties();
       properties.setProperty(PROPERTY_REGIONS, 
Joiner.on(',').join(DEFAULT_REGIONS));
       properties.setProperty(PROPERTY_ISO3166_CODES, 
"US-VA,US-OH,US-CA,US-OR,CA,BR-SP,IE,GB-LND,FR-IDF,DE-HE,SG,"
-            + "AU-NSW,IN-MH,JP-13,KR-11,CN-BJ,CN-NX");
+            + "AU-NSW,IN-MH,JP-13,KR-11,CN-BJ,CN-NX,BH");
       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");
@@ -205,6 +211,7 @@ public class Region {
       properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_2 + "." + 
ISO3166_CODES, "KR-11");
       properties.setProperty(PROPERTY_REGION + "." + CN_NORTH_1 + "." + 
ISO3166_CODES, "CN-BJ");
       properties.setProperty(PROPERTY_REGION + "." + CN_NORTHWEST_1 + "." + 
ISO3166_CODES, "CN-NX");
+      properties.setProperty(PROPERTY_REGION + "." + ME_SOUTH_1 + "." + 
ISO3166_CODES, "BH");
       return properties;
    }
 }
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 a060b05..f9ca134 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
@@ -87,7 +87,7 @@ public class AWSEC2ProviderMetadata extends 
BaseProviderMetadata {
          .defaultProperties(AWSEC2ProviderMetadata.defaultProperties())
          .linkedServices("aws-ec2", "aws-elb", "aws-cloudwatch", "aws-s3", 
"aws-simpledb")
                .iso3166Codes("US-VA", "US-OH", "US-CA", "US-OR", "CA", 
"BR-SP", "IE", "GB-LND", "FR-IDF", "DE-HE",
-                     "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", 
"CN-NX");
+                     "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", 
"CN-NX", "BH");
       }
 
       @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 5085cd9..0f7f3ed 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
@@ -354,7 +354,7 @@ public class AWSEC2TemplateBuilderLiveTest extends 
EC2TemplateBuilderLiveTest {
    @Override
    protected Set<String> getIso3166Codes() {
       return ImmutableSet.of("US-VA", "US-OH", "US-CA", "US-OR", "CA", 
"BR-SP", "IE", "GB-LND", "FR-IDF", "DE-HE",
-            "SE-AB", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", 
"CN-NX");
+            "SE-AB", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", 
"CN-NX", "BH");
    }
 
 }
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 96cfc10..e6adc8d 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
@@ -30,6 +30,7 @@ import static org.jclouds.aws.domain.Region.EU_NORTH_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_3;
+import static org.jclouds.aws.domain.Region.ME_SOUTH_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;
@@ -80,6 +81,7 @@ public class AWSS3ProviderMetadata extends 
BaseProviderMetadata {
       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 + "." + ME_SOUTH_1 + "." + 
ENDPOINT, "https://s3.me-south-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";);
@@ -115,7 +117,7 @@ public class AWSS3ProviderMetadata extends 
BaseProviderMetadata {
          .linkedServices("aws-ec2", "aws-elb", "aws-cloudwatch", "aws-s3", 
"aws-simpledb")
                .iso3166Codes("US", "US-OH", "US-CA", "US-OR", "CA", "BR-SP", 
"IE", "GB-LND", "FR-IDF", "DE-HE", "SE"
                            + "-AB", "SG",
-                     "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", "CN-NX")
+                     "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", "CN-NX", 
"BH")
          .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 e8a22aa..c8eab12 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
@@ -34,6 +34,7 @@ public class AWSS3ServiceIntegrationLiveTest extends 
S3ServiceIntegrationLiveTes
    protected Set<String> getIso3166Codes() {
       return ImmutableSet.<String> of(
             "AU-NSW",
+            "BH",
             "BR-SP",
             "CA",
             "CN-BJ",

Reply via email to