Repository: libcloud Updated Branches: refs/heads/trunk 59de189c4 -> 6be9fc24c
support s3 sa-east-1 region Closes #562 Signed-off-by: Tomaz Muraus <to...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6be9fc24 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6be9fc24 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6be9fc24 Branch: refs/heads/trunk Commit: 6be9fc24cd3f2b8e100b162911b3081bf7d89eaf Parents: 59de189 Author: Marcos Vinicius Costa Butamante <mvcbustaman...@gmail.com> Authored: Mon Aug 17 15:01:25 2015 -0300 Committer: Tomaz Muraus <to...@apache.org> Committed: Mon Aug 24 23:53:26 2015 +0200 ---------------------------------------------------------------------- CHANGES.rst | 7 +++++++ libcloud/storage/drivers/s3.py | 11 +++++++++++ libcloud/storage/providers.py | 2 ++ libcloud/storage/types.py | 1 + 4 files changed, 21 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/6be9fc24/CHANGES.rst ---------------------------------------------------------------------- diff --git a/CHANGES.rst b/CHANGES.rst index dc1c025..1510cfe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -17,6 +17,13 @@ Compute (GITHUB-561) [ZuluPro] +Storage +~~~~~~~ + +- Add support for ``sa-east-1`` region to the Amazon S3 driver. + (GITHUB-562) + [Iuri de Silvio] + Changes with Apache Libcloud 0.18.0 ----------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/6be9fc24/libcloud/storage/drivers/s3.py ---------------------------------------------------------------------- diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py index eca2910..7a3fa7c 100644 --- a/libcloud/storage/drivers/s3.py +++ b/libcloud/storage/drivers/s3.py @@ -55,6 +55,7 @@ S3_US_WEST_OREGON_HOST = 's3-us-west-2.amazonaws.com' S3_EU_WEST_HOST = 's3-eu-west-1.amazonaws.com' S3_AP_SOUTHEAST_HOST = 's3-ap-southeast-1.amazonaws.com' S3_AP_NORTHEAST_HOST = 's3-ap-northeast-1.amazonaws.com' +S3_SA_EAST_HOST = 's3-sa-east-1.amazonaws.com' API_VERSION = '2006-03-01' NAMESPACE = 'http://s3.amazonaws.com/doc/%s/' % (API_VERSION) @@ -979,3 +980,13 @@ class S3APNEStorageDriver(S3StorageDriver): name = 'Amazon S3 (ap-northeast-1)' connectionCls = S3APNEConnection ex_location_name = 'ap-northeast-1' + + +class S3SAEastConnection(S3Connection): + host = S3_SA_EAST_HOST + + +class S3SAEastStorageDriver(S3StorageDriver): + name = 'Amazon S3 (sa-east-1)' + connectionCls = S3SAEastConnection + ex_location_name = 'sa-east-1' http://git-wip-us.apache.org/repos/asf/libcloud/blob/6be9fc24/libcloud/storage/providers.py ---------------------------------------------------------------------- diff --git a/libcloud/storage/providers.py b/libcloud/storage/providers.py index 1ae4e44..cff34c8 100644 --- a/libcloud/storage/providers.py +++ b/libcloud/storage/providers.py @@ -36,6 +36,8 @@ DRIVERS = { ('libcloud.storage.drivers.s3', 'S3APSEStorageDriver'), Provider.S3_AP_NORTHEAST: ('libcloud.storage.drivers.s3', 'S3APNEStorageDriver'), + Provider.S3_SA_EAST: + ('libcloud.storage.drivers.s3', 'S3SAEastStorageDriver'), Provider.NINEFOLD: ('libcloud.storage.drivers.ninefold', 'NinefoldStorageDriver'), Provider.GOOGLE_STORAGE: http://git-wip-us.apache.org/repos/asf/libcloud/blob/6be9fc24/libcloud/storage/types.py ---------------------------------------------------------------------- diff --git a/libcloud/storage/types.py b/libcloud/storage/types.py index 4ba714b..53d5973 100644 --- a/libcloud/storage/types.py +++ b/libcloud/storage/types.py @@ -50,6 +50,7 @@ class Provider(object): S3_EU_WEST = 's3_eu_west' S3_AP_SOUTHEAST = 's3_ap_southeast' S3_AP_NORTHEAST = 's3_ap_northeast' + S3_SA_EAST = 's3_sa_east' NINEFOLD = 'ninefold' GOOGLE_STORAGE = 'google_storage' S3_US_WEST_OREGON = 's3_us_west_oregon'