Skip to content

Commit

Permalink
Merge pull request #23 from DMTF/System-ETag
Browse files Browse the repository at this point in the history
Added usage of ETags when issuing PATCH to a System resource
  • Loading branch information
mraineri authored Oct 31, 2019
2 parents 9c1d581 + 857b979 commit 52ab717
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion redfish_utilities/systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def set_system_boot( context, system_id = None, ov_target = None, ov_enabled = N
payload["Boot"]["BootNext"] = ov_boot_next

# Update the system
response = context.patch( system.dict["@odata.id"], body = payload )
headers = None
etag = system.getheader( "ETag" )
if etag is not None:
headers = { "If-Match": etag }
response = context.patch( system.dict["@odata.id"], body = payload, headers = headers )
verify_response( response )
return response

Expand Down

0 comments on commit 52ab717

Please sign in to comment.