Skip to content

Commit

Permalink
Update method name
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
  • Loading branch information
alinabuzachis committed May 4, 2022
1 parent 44308cc commit f4e36ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/rds_instance_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def get_snapshot(snapshot_id):
return response['DBSnapshots'][0]


def snapshot_to_facts(snapshot):
def fetch_tags(snapshot):
snapshot["Tags"] = get_tags(client, module, snapshot["DBSnapshotArn"])

return camel_dict_to_snake_dict(snapshot, ignore_list=["Tags"])
Expand Down Expand Up @@ -260,7 +260,7 @@ def ensure_snapshot_present():
if module.check_mode:
return dict(changed=changed)

return dict(changed=changed, **snapshot_to_facts(get_snapshot(snapshot_name)))
return dict(changed=changed, **fetch_tags(get_snapshot(snapshot_name)))

existing_tags = get_tags(client, module, snapshot["DBSnapshotArn"])
changed |= ensure_tags(client, module, snapshot["DBSnapshotArn"], existing_tags,
Expand All @@ -269,7 +269,7 @@ def ensure_snapshot_present():
if module.check_mode:
return dict(changed=changed)

return dict(changed=changed, **snapshot_to_facts(get_snapshot(snapshot_name)))
return dict(changed=changed, **fetch_tags(get_snapshot(snapshot_name)))


def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
- assert:
that:
- _result_instance_snapshot.changed
- "'allocated_storage' in _result_instance_snapshot"
- "'availability_zone' in _result_instance_snapshot"
- "'instance_create_time' in _result_instance_snapshot"
- "'db_instance_identifier' in _result_instance_snapshot"
Expand Down Expand Up @@ -113,7 +112,6 @@
- assert:
that:
- _result_instance_snapshot.changed
- "'allocated_storage' in _result_instance_snapshot"
- "'availability_zone' in _result_instance_snapshot"
- "'instance_create_time' in _result_instance_snapshot"
- "'db_instance_identifier' in _result_instance_snapshot"
Expand Down Expand Up @@ -188,7 +186,6 @@
- assert:
that:
- _result_instance_snapshot.changed
- "'allocated_storage' in _result_instance_snapshot"
- "'availability_zone' in _result_instance_snapshot"
- "'instance_create_time' in _result_instance_snapshot"
- "'db_instance_identifier' in _result_instance_snapshot"
Expand Down Expand Up @@ -249,7 +246,6 @@
- assert:
that:
- _result_instance_snapshot.changed
- "'allocated_storage' in _result_instance_snapshot"
- "'availability_zone' in _result_instance_snapshot"
- "'instance_create_time' in _result_instance_snapshot"
- "'db_instance_identifier' in _result_instance_snapshot"
Expand Down Expand Up @@ -295,7 +291,6 @@
- assert:
that:
- _result_instance_snapshot.changed
- "'allocated_storage' in _result_instance_snapshot"
- "'availability_zone' in _result_instance_snapshot"
- "'instance_create_time' in _result_instance_snapshot"
- "'db_instance_identifier' in _result_instance_snapshot"
Expand Down

0 comments on commit f4e36ba

Please sign in to comment.