mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
xcc_redfish_command: fix messages showing dict keys (#11144)
* xcc_redfish_command: fix messages showing dict keys * add changelog frag * Update plugins/modules/xcc_redfish_command.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/xcc_redfish_command.py Co-authored-by: Felix Fontein <felix@fontein.de> * Apply suggestions from code review * Update plugins/modules/xcc_redfish_command.py --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
6bf0780d23
commit
5617d57c8c
2 changed files with 4 additions and 2 deletions
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- xcc_redfish_command - fix templating of dictionary keys as list (https://github.com/ansible-collections/community.general/pull/11144).
|
||||
|
|
@ -556,7 +556,7 @@ class XCCRedfishUtils(RedfishUtils):
|
|||
data = response["data"]
|
||||
for key in request_body.keys():
|
||||
if key not in data:
|
||||
return {"ret": False, "msg": f"Key {key} not found. Supported key list: {data.keys()}"}
|
||||
return {"ret": False, "msg": f"Key {key} not found. Supported key list: {list(data)}"}
|
||||
|
||||
# perform patch
|
||||
response = self.patch_request(self.root_uri + resource_uri, request_body)
|
||||
|
|
@ -735,7 +735,7 @@ def main():
|
|||
|
||||
# Check that Category is valid
|
||||
if category not in CATEGORY_COMMANDS_ALL:
|
||||
module.fail_json(msg=f"Invalid Category '{category}'. Valid Categories = {CATEGORY_COMMANDS_ALL.keys()}")
|
||||
module.fail_json(msg=f"Invalid Category '{category}'. Valid Categories = {list(CATEGORY_COMMANDS_ALL.keys())}")
|
||||
|
||||
# Check that all commands are valid
|
||||
for cmd in command_list:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue