libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [1/3] libcloud git commit: Add support for S3 ap-southeast2 region
Date Mon, 14 Nov 2016 04:09:01 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk ae98ebc5c -> 54050a418


Add support for S3 ap-southeast2 region


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5585a26d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5585a26d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5585a26d

Branch: refs/heads/trunk
Commit: 5585a26d11f1683db577d064daf599709cb5c5eb
Parents: ae98ebc
Author: Mark Gregson <mark.gregson@linkdigital.com.au>
Authored: Mon Jul 11 11:55:09 2016 +1000
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Mon Nov 14 15:07:56 2016 +1100

----------------------------------------------------------------------
 libcloud/storage/drivers/s3.py | 12 ++++++++++++
 libcloud/storage/providers.py  |  2 ++
 libcloud/storage/types.py      |  2 ++
 3 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5585a26d/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index 5b237a5..7bab956 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -56,10 +56,12 @@ S3_US_WEST_OREGON_HOST = 's3-us-west-2.amazonaws.com'
 S3_CN_NORTH_HOST = 's3.cn-north-1.amazonaws.com.cn'
 S3_EU_WEST_HOST = 's3-eu-west-1.amazonaws.com'
 S3_AP_SOUTHEAST_HOST = 's3-ap-southeast-1.amazonaws.com'
+S3_AP_SOUTHEAST2_HOST = 's3-ap-southeast-2.amazonaws.com'
 S3_AP_NORTHEAST1_HOST = 's3-ap-northeast-1.amazonaws.com'
 S3_AP_NORTHEAST2_HOST = 's3-ap-northeast-2.amazonaws.com'
 S3_AP_NORTHEAST_HOST = S3_AP_NORTHEAST1_HOST
 S3_SA_EAST_HOST = 's3-sa-east-1.amazonaws.com'
+S3_SA_SOUTHEAST2_HOST = 's3-sa-east-2.amazonaws.com'
 
 API_VERSION = '2006-03-01'
 NAMESPACE = 'http://s3.amazonaws.com/doc/%s/' % (API_VERSION)
@@ -986,6 +988,16 @@ class S3APSEStorageDriver(S3StorageDriver):
     ex_location_name = 'ap-southeast-1'
 
 
+class S3APSE2Connection(S3Connection):
+     host = S3_AP_SOUTHEAST2_HOST
+
+
+class S3APSE2StorageDriver(S3StorageDriver):
+     name = 'Amazon S3 (ap-southeast-2)'
+     connectionCls = S3APSE2Connection
+     ex_location_name = 'ap-southeast-2'
+
+
 class S3APNE1Connection(S3Connection):
     host = S3_AP_NORTHEAST1_HOST
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5585a26d/libcloud/storage/providers.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/providers.py b/libcloud/storage/providers.py
index 1fc82eb..f15ad12 100644
--- a/libcloud/storage/providers.py
+++ b/libcloud/storage/providers.py
@@ -37,6 +37,8 @@ DRIVERS = {
     ('libcloud.storage.drivers.s3', 'S3EUWestStorageDriver'),
     Provider.S3_AP_SOUTHEAST:
     ('libcloud.storage.drivers.s3', 'S3APSEStorageDriver'),
+    Provider.S3_AP_SOUTHEAST2:
+    ('libcloud.storage.drivers.s3', 'S3APSE2StorageDriver'),
     Provider.S3_AP_NORTHEAST:
     ('libcloud.storage.drivers.s3', 'S3APNE1StorageDriver'),
     Provider.S3_AP_NORTHEAST1:

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5585a26d/libcloud/storage/types.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/types.py b/libcloud/storage/types.py
index 2a2723f..df20c3f 100644
--- a/libcloud/storage/types.py
+++ b/libcloud/storage/types.py
@@ -48,6 +48,7 @@ class Provider(object):
     :cvar S3: Amazon S3 US
     :cvar S3_AP_NORTHEAST_HOST: Amazon S3 Asia South East (Tokyo)
     :cvar S3_AP_SOUTHEAST_HOST: Amazon S3 Asia South East (Singapore)
+    :cvar S3_AP_SOUTHEAST2_HOST: Amazon S3 Asia South East 2 (Sydney)
     :cvar S3_CN_NORTH: Amazon S3 CN North (Beijing)
     :cvar S3_EU_WEST: Amazon S3 EU West (Ireland)
     :cvar S3_US_WEST: Amazon S3 US West (Northern California)
@@ -72,6 +73,7 @@ class Provider(object):
     S3_AP_NORTHEAST1 = 's3_ap_northeast_1'
     S3_AP_NORTHEAST2 = 's3_ap_northeast_2'
     S3_AP_SOUTHEAST = 's3_ap_southeast'
+    S3_AP_SOUTHEAST2 = 's3_ap_southeast2'
     S3_CN_NORTH = 's3_cn_north'
     S3_EU_WEST = 's3_eu_west'
     S3_SA_EAST = 's3_sa_east'


Mime
View raw message