diff --git a/distami/__init__.py b/distami/__init__.py index 081f2d0..f642b0e 100644 --- a/distami/__init__.py +++ b/distami/__init__.py @@ -13,4 +13,4 @@ # limitations under the License. __author__ = 'Peter Sankauskas' -__version__ = '1.0.7' +__version__ = '1.0.8' diff --git a/distami/cli.py b/distami/cli.py index a1f0e26..a87fe73 100644 --- a/distami/cli.py +++ b/distami/cli.py @@ -51,8 +51,9 @@ def copy(param_array): ami_cp.make_snapshot_public() if args.accounts: - ami_cp.share_ami_with_accounts(args.accounts) - ami_cp.share_snapshot_with_accounts(args.accounts) + account_ids = args.accounts.split(',') + ami_cp.share_ami_with_accounts(account_ids) + ami_cp.share_snapshot_with_accounts(account_ids) def run(): diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 1fa4f7c..5f565e5 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -16,8 +16,11 @@ 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', 'eu-central-1'] + all_public_regions = ['ap-south-1', 'ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'ap-northeast-2', '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') + print 'regions: ', regions, ', all_public_regions: ', all_public_regions self.assertItemsEqual(regions, all_public_regions)