Fixed RDS cleanup argument bug

parent ae75469f
Pipeline #2100 passed with stages
in 1 minute and 59 seconds
......@@ -214,7 +214,8 @@ Delete all EBS volumes that are not attached to an instance (stopped or not):
--not-dry-run \
--region eu-west-1 \
--role-arns "arn:aws:iam::876521782800:role/OlinDataAssumedAdministrator" \
rds --tags "akinaka-made"
rds \
--tags "akinaka-made"
## RDS
......
......@@ -69,7 +69,7 @@ def rds(ctx, search_tags):
region = ctx.obj.get('region')
not_dry_run = ctx.obj.get('not_dry_run')
role_arns = ctx.obj.get('role_arns')
role_arns = role_arns.split(" ")
role_arns = role_arns
try:
snapshots = cleanup_snapshots.CleanupSnapshots(region, role_arns, search_tags, not_dry_run)
......
......@@ -12,8 +12,8 @@ class CleanupSnapshots():
def __init__(self, region, role_arns, search_tags, not_dry_run):
self.region = region
self.role_arns = role_arns
self.search_tags = search_tags
self.role_arns = role_arns.split(",")
self.search_tags = search_tags.split(",")
self.not_dry_run = not_dry_run
def list_tagged_snapshots(self, role_arn, search_tags):
......
......@@ -42,7 +42,11 @@ def rds(ctx, source_role_arn, target_role_arn, snapshot_style, source_instance_n
rds_copy.copy_instance()
logging.info("Will now delete useless snapshots")
snapshots = cleanup_snapshots.CleanupSnapshots(region, [source_role_arn], ["akinaka-made"], True)
snapshots = cleanup_snapshots.CleanupSnapshots(region,
"{},{}".format(source_role_arn,target_role_arn),
["akinaka-made"],
True
)
snapshots.cleanup()
exit(0)
......
......@@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="akinaka",
python_requires='>=3.3.0',
version="0.2.25",
version="0.2.26",
author="Afraz",
author_email="afraz@olindata.com",
description="OlinData's aws cli Extras",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment