From 54e43e9ecf9ab6882ba5f9c7cc2ab3813b4f8258 Mon Sep 17 00:00:00 2001 From: Michael Scott Williamson Date: Fri, 2 Dec 2016 10:57:52 -0600 Subject: [PATCH 1/2] Updated AWS region - added us-east-2 (Ohio). Whitespace cleanup. --- glacier/GlacierWrapper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/glacier/GlacierWrapper.py b/glacier/GlacierWrapper.py index a2cb57b..0b8fbe3 100755 --- a/glacier/GlacierWrapper.py +++ b/glacier/GlacierWrapper.py @@ -2,7 +2,7 @@ """ .. module:: GlacierWrapper :platform: Unix, Windows - :synopsis: Wrapper for accessing Amazon Glacier, with Amazon SimpleDB + :synopsis: Wrapper for accessing Amazon Glacier, with Amazon SimpleDB support and other features. """ @@ -113,12 +113,13 @@ class GlacierWrapper(object): MAX_VAULT_NAME_LENGTH = 255 MAX_VAULT_DESCRIPTION_LENGTH = 1024 MAX_PARTS = 10000 - AVAILABLE_REGIONS = ('us-east-1', 'us-west-2', 'us-west-1', + AVAILABLE_REGIONS = ('us-east-1', 'us-east-2', 'us-west-2', 'us-west-1', 'eu-west-1', 'eu-central-1', 'sa-east-1', 'ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2') AVAILABLE_REGIONS_MESSAGE = """\ Invalid region. Available regions for Amazon Glacier are: us-east-1 (US - Virginia) +us-east-2 (US - Ohio) us-west-1 (US - N. California) us-west-2 (US - Oregon) eu-west-1 (EU - Ireland) @@ -1854,7 +1855,7 @@ def sns_subscribe(self, protocol, endpoint, topic, sns_options, vault_names=None if vault_names: vaults = vault_names.split(",") self._init_events_for_vaults(vaults, topic_arn) - + topic_arns = [topic_arn] if len(topic_arns): @@ -1876,7 +1877,7 @@ def sns_subscribe(self, protocol, endpoint, topic, sns_options, vault_names=None @sns_connect def sns_list_topics(self, sns_options): topics = self.sns_conn.get_all_topics()['ListTopicsResponse']['ListTopicsResult']['Topics'] - + results = [] for topic in topics: results += [{"Topic":topic['TopicArn'].split(":")[-1], "Topic ARN":topic['TopicArn']}] From f02aca6251c5d074863e83fa4c0ae1e9e7f5ae23 Mon Sep 17 00:00:00 2001 From: Michael Scott Williamson Date: Fri, 2 Dec 2016 11:04:38 -0600 Subject: [PATCH 2/2] Updated AWS Regions - Added ap-south-1 (Mumbai). --- glacier/GlacierWrapper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glacier/GlacierWrapper.py b/glacier/GlacierWrapper.py index 0b8fbe3..b06902f 100755 --- a/glacier/GlacierWrapper.py +++ b/glacier/GlacierWrapper.py @@ -115,7 +115,7 @@ class GlacierWrapper(object): MAX_PARTS = 10000 AVAILABLE_REGIONS = ('us-east-1', 'us-east-2', 'us-west-2', 'us-west-1', 'eu-west-1', 'eu-central-1', 'sa-east-1', - 'ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2') + 'ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'ap-south-1') AVAILABLE_REGIONS_MESSAGE = """\ Invalid region. Available regions for Amazon Glacier are: us-east-1 (US - Virginia) @@ -127,7 +127,8 @@ class GlacierWrapper(object): sa-east-1 (South America - Sao Paulo) ap-northeast-1 (Asia-Pacific - Tokyo) ap-southeast-1 (Asia Pacific (Singapore) -ap-southeast-2 (Asia-Pacific - Sydney)\ +ap-southeast-2 (Asia-Pacific - Sydney) +ap-south-1 (Asia-Pacific - Mumbai)\ """ def setuplogging(self, logfile, loglevel, logtostdout):