From 65ebdce7f4e4acde15e9ffd20190dfc33bbe03ba Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Wed, 4 May 2022 12:07:21 +0200 Subject: [PATCH] Update method name Signed-off-by: Alina Buzachis --- plugins/modules/rds_instance_snapshot.py | 8 ++++---- .../targets/rds_instance_snapshot/tasks/main.yml | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/plugins/modules/rds_instance_snapshot.py b/plugins/modules/rds_instance_snapshot.py index d015c80aea6..2fa30f92d09 100644 --- a/plugins/modules/rds_instance_snapshot.py +++ b/plugins/modules/rds_instance_snapshot.py @@ -12,7 +12,7 @@ --- module: rds_instance_snapshot version_added: 1.0.0 -short_description: Manage Amazon RDS instance snapshots. +short_description: Manage Amazon RDS instance snapshots description: - Creates or deletes RDS snapshots. options: @@ -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"]) @@ -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, @@ -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(): diff --git a/tests/integration/targets/rds_instance_snapshot/tasks/main.yml b/tests/integration/targets/rds_instance_snapshot/tasks/main.yml index 74be5a807cb..f26cdae9df5 100644 --- a/tests/integration/targets/rds_instance_snapshot/tasks/main.yml +++ b/tests/integration/targets/rds_instance_snapshot/tasks/main.yml @@ -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" @@ -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" @@ -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" @@ -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" @@ -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"