Skip to content

Commit

Permalink
[PR #8613/ca8ecb1d backport][stable-9] redfish_utils: fix language ch…
Browse files Browse the repository at this point in the history
…eck (#8617)

redfish_utils: fix language check (#8613)

* redfish_utils: fix language check

* add fragment file

* typo

* improve words

* improve words based on suggestion

---------

Co-authored-by: Mike Koreneff <[email protected]>
(cherry picked from commit ca8ecb1)

Co-authored-by: Mike Koreneff <[email protected]>
  • Loading branch information
patchback[bot] and mkoreneff authored Jul 12, 2024
1 parent 78a02b8 commit 92dcf1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/8613-redfish_utils-language.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- redfish_utils module utils - do not fail when language is not exactly "en" (https://github.com/ansible-collections/community.general/pull/8613).
2 changes: 1 addition & 1 deletion plugins/module_utils/redfish_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3833,7 +3833,7 @@ def check_location_uri(self, resp_data, resp_uri):
vendor = self._get_vendor()['Vendor']
rsp_uri = ""
for loc in resp_data['Location']:
if loc['Language'] == "en":
if loc['Language'].startswith("en"):
rsp_uri = loc['Uri']
if vendor == 'HPE':
# WORKAROUND
Expand Down

0 comments on commit 92dcf1e

Please sign in to comment.