redfish: fix a problem with Chassis/Power URI (#56185)
Fixes #56137 - problem with Chassis/Power URI and GetChassisPower command - assemble URI from data in Chassis resource
This commit is contained in:
parent
00691f43c5
commit
4bf051b8bb
2 changed files with 3 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Redfish - Instead of building the Power URI from assumptions about URI structure, assemble from @odata.id information in the Chassis resource (https://github.com/ansible/ansible/issues/56137).
|
|
@ -1195,8 +1195,7 @@ class RedfishUtils(object):
|
|||
result['ret'] = True
|
||||
data = response['data']
|
||||
if key in data:
|
||||
response = self.get_request(self.root_uri + chassis_uri +
|
||||
"/" + key)
|
||||
response = self.get_request(self.root_uri + data[key]['@odata.id'])
|
||||
data = response['data']
|
||||
if 'PowerControl' in data:
|
||||
if len(data['PowerControl']) > 0:
|
||||
|
|
Loading…
Reference in a new issue