Skip to content

Commit

Permalink
backup_selection_info - ensure result is returned as snake_case rathe…
Browse files Browse the repository at this point in the history
…r than CamelCase

Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed May 9, 2023
1 parent 6bfdbda commit 5418a74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/backup_selection-return_snake_case.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- "backup_selection_info.yml ensure result is returned as snake_case rather than CamelCase."
3 changes: 2 additions & 1 deletion plugins/modules/backup_selection_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry
from ansible_collections.amazon.aws.plugins.module_utils.backup import get_selection_details
from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict


def main():
Expand All @@ -133,7 +134,7 @@ def main():
result["backup_selections"] = get_selection_details(
module, client, module.params.get("backup_plan_name"), module.params.get("backup_selection_names")
)
module.exit_json(**result)
module.exit_json(**camel_dict_to_snake_dict(result))


if __name__ == "__main__":
Expand Down

0 comments on commit 5418a74

Please sign in to comment.