Follow up to Attempt using Redfish settings resource to get URI
This is a follow up to commit 1ddf9d7059
improving the way of obtaining the ETag and fixing a typo in a comment.
Story: 2009871
Task: 44575
Change-Id: I12cb371c31ff71339a381795c86dc3bf735588d4
This commit is contained in:
parent
1ddf9d7059
commit
ce52b0345f
@ -280,14 +280,13 @@ class System(base.ResourceBase):
|
||||
etag = self._get_etag()
|
||||
path = self.path
|
||||
|
||||
# NOTE(janders): checking if @RedFish.Settings are available; if so
|
||||
# NOTE(janders): checking if @Redfish.Settings are available; if so
|
||||
# using the URI from the SettingsObject. Also ensuring the ETag URI
|
||||
# matches in this case (the one above would not be valid for new URI).
|
||||
if self._settings and self._settings.resource_uri:
|
||||
path = self._settings.resource_uri
|
||||
resp = self._conn.get(path)
|
||||
if resp:
|
||||
etag = resp.headers['ETag']
|
||||
etag = resp.headers.get('ETag')
|
||||
|
||||
# TODO(lucasagomes): Check the return code and response body ?
|
||||
# Probably we should call refresh() as well.
|
||||
|
Loading…
Reference in New Issue
Block a user