From 801c9f28bfb277ae7d996dd1818fd5dd3fe038b6 Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Wed, 23 Apr 2014 11:30:08 -0700 Subject: [PATCH 1/8] Adding China region to tests --- tests/unit/test_utils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 165bfdd..5881b58 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -14,13 +14,10 @@ import unittest -from distami import utils +from distami import utils class UtilTests(unittest.TestCase): def test_get_regions_to_copy_to(self): - all_public_regions = ['ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'eu-west-1'] + all_public_regions = ['ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'eu-west-1', 'cn-north-1'] regions = utils.get_regions_to_copy_to('not-a-real-region') self.assertItemsEqual(regions, all_public_regions) - - - \ No newline at end of file From a43f41d819bad4611d3f2d81fc12b17d9696ad22 Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Fri, 24 Oct 2014 15:37:49 -0700 Subject: [PATCH 2/8] Removing China from the list of regions since not many have access to it. --- distami/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distami/utils.py b/distami/utils.py index 99fd3ea..32ca587 100644 --- a/distami/utils.py +++ b/distami/utils.py @@ -76,6 +76,9 @@ def get_regions_to_copy_to(source_region): # Filter out GovCloud if region.name == 'us-gov-west-1': continue + # Filter out China + if region.name == 'cn-north-1' + continue regions.append(region.name) return regions From 8e024024ff78bfbac01d3533a17d6720c67c373c Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Fri, 24 Oct 2014 15:38:07 -0700 Subject: [PATCH 3/8] Bump version to 1.0.6 --- distami/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distami/__init__.py b/distami/__init__.py index 08bd158..5f91b73 100644 --- a/distami/__init__.py +++ b/distami/__init__.py @@ -13,4 +13,4 @@ # limitations under the License. __author__ = 'Peter Sankauskas' -__version__ = '1.0.5' +__version__ = '1.0.6' From 77d695cb2070529d2870710bdd01a9f4a06e1b8b Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Fri, 24 Oct 2014 15:41:00 -0700 Subject: [PATCH 4/8] Fix syntax of China filter --- distami/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distami/utils.py b/distami/utils.py index 32ca587..14b5641 100644 --- a/distami/utils.py +++ b/distami/utils.py @@ -77,7 +77,7 @@ def get_regions_to_copy_to(source_region): if region.name == 'us-gov-west-1': continue # Filter out China - if region.name == 'cn-north-1' + if region.name == 'cn-north-1': continue regions.append(region.name) From 3149db0ec1581a63d770bed09e784fbb448b99ff Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Fri, 24 Oct 2014 15:43:43 -0700 Subject: [PATCH 5/8] Fixing China region tests --- tests/unit/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 5881b58..5ff810c 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -18,6 +18,6 @@ class UtilTests(unittest.TestCase): def test_get_regions_to_copy_to(self): - all_public_regions = ['ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'eu-west-1', 'cn-north-1'] + all_public_regions = ['ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'eu-west-1'] regions = utils.get_regions_to_copy_to('not-a-real-region') self.assertItemsEqual(regions, all_public_regions) From 9cc839266405b501e4db74e11c5cf175e9be9dee Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Fri, 24 Oct 2014 15:43:57 -0700 Subject: [PATCH 6/8] Version bump --- distami/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distami/__init__.py b/distami/__init__.py index 5f91b73..081f2d0 100644 --- a/distami/__init__.py +++ b/distami/__init__.py @@ -13,4 +13,4 @@ # limitations under the License. __author__ = 'Peter Sankauskas' -__version__ = '1.0.6' +__version__ = '1.0.7' From e93392e47fde4740182ed10e67e97e91bc8cfa21 Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Fri, 24 Oct 2014 15:49:12 -0700 Subject: [PATCH 7/8] Adding Frankfurt --- tests/unit/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 5ff810c..1fa4f7c 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -18,6 +18,6 @@ class UtilTests(unittest.TestCase): def test_get_regions_to_copy_to(self): - all_public_regions = ['ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'eu-west-1'] + all_public_regions = ['ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'eu-west-1', 'eu-central-1'] regions = utils.get_regions_to_copy_to('not-a-real-region') self.assertItemsEqual(regions, all_public_regions) From 80a7831c560a3bfaef2ea7ca3bf3b3e46227821d Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Tue, 28 Oct 2014 21:50:07 -0700 Subject: [PATCH 8/8] Adding Pypi badges --- README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.rst b/README.rst index 03b6879..9f38068 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,14 @@ DistAMI :target: https://travis-ci.org/Answers4AWS/distami :alt: Build Status +.. image:: https://pypip.in/d/distami/badge.png + :target: https://pypi.python.org/pypi/distami + :alt: PyPI Downloads + +.. image:: https://pypip.in/v/distami/badge.png + :target: https://pypi.python.org/pypi/distami + :alt: PyPI Version + Distributes an AMI by copying it to one, many, or all AWS regions, and by optionally making the AMIs and Snapshots public or shared with specific AWS Accounts. Usage