forked from ansible-collections/amazon.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor rds snapshot modules (ansible-collections#2138)
SUMMARY Move shared functionality from rds snapshot modules into rds module_utils. Second PR for ansible-collections#2003 / https://issues.redhat.com/browse/ACA-1343. COMPONENT NAME rds_cluster_snapshot rds_instance_snapshot rds_instance rds_snapshot_info module_utils/rds.py ADDITIONAL INFORMATION Detailed summary of all the changes: module_utils/rds.py: Add describe_db_cluster_snapshots() function Add get_snapshot() function to retrieve a single db instance or cluster snapshot using internal describe_db_snapshots() and describe_db_cluster_snapshots() Add format_rds_client_method_parameters() to validate and format parameters for boto3 rds client methods Update internal collection imports to use full collection path Add unit tests for new functions rds_instance module: Replace get_final_snapshot() function with calls to get_snapshot() from module_utils/rds.py Replace parameter formatting logic in get_parameters() with call to format_rds_client_method_parameters() from module_utils/rds.py Remove unit tests for deleted get_final_snapshot() function rds_instance_snapshot module: Replace get_snapshot() function with calls to get_snapshot() from module_utils/rds.py Replace get_parameters() function with call to format_rds_client_method_parameters() from module_utils/rds.py Remove global variables Add type hinting to all functions rds_cluster_snapshot module: Replace get_parameters() function with call to format_rds_client_method_parameters() from module_utils/rds.py Remove global variables Add type hinting to all functions rds_snapshot_info module: Refactor internal common_snapshot_info() function to use describe_db_snapshots() and describe_db_cluster_snapshots() functions from module_utils/rds.py Rename some variables to ensure consistent variable naming Add type hinting to all functions Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell Reviewed-by: Helen Bailey <[email protected]> Reviewed-by: Bikouo Aubin
- Loading branch information
Showing
8 changed files
with
404 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
minor_changes: | ||
- module_utils/rds.py - Add shared functionality from rds snapshot modules (https://github.com/ansible-collections/amazon.aws/pull/2138). | ||
- rds_cluster_snapshot - Refactor shared boto3 client functionality, add type hinting and function docstrings (https://github.com/ansible-collections/amazon.aws/pull/2138). | ||
- rds_instance - Remove shared functioanlity added to module_utils/rds.py (https://github.com/ansible-collections/amazon.aws/pull/2138). | ||
- rds_instance_info - Refactor shared boto3 client functionality, add type hinting and function docstrings (https://github.com/ansible-collections/amazon.aws/pull/2138). | ||
- rds_instance_snapshot - Refactor shared boto3 client functionality, add type hinting and function docstrings (https://github.com/ansible-collections/amazon.aws/pull/2138). | ||
- rds_snapshot_info - Refactor shared boto3 client functionality, add type hinting and function docstrings (https://github.com/ansible-collections/amazon.aws/pull/2138). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.