Skip to content

Commit

Permalink
Merge pull request #9 from amrathesh/settings-patch
Browse files Browse the repository at this point in the history
Added support to check for @Redfish.Settings object in Redfish URIs
  • Loading branch information
edhay authored Jan 10, 2024
2 parents c072360 + b245064 commit 0036d14
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/redfish_plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ def patch(self, *args, **kwargs):
if etag is not None:
headers = {"If-Match": etag}

# Check if @Redfish.Settings member present
if "@Redfish.Settings" in response.dict:
# update args with URI found in SettingObject if found else continue
try:
tmp_args = list(args)
tmp_args[0] = response.dict['@Redfish.Settings']['SettingsObject']['@odata.id']
args = tuple(tmp_args)
except KeyError:
pass

quiet = 0
if MTLS_ENABLED == "True":
return self.rest_request(
Expand Down

0 comments on commit 0036d14

Please sign in to comment.