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
pull/57591/merge
Mike Garrett 5 years ago committed by René Moser
parent 00691f43c5
commit 4bf051b8bb

@ -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…
Cancel
Save