Closed VladoPortos closed 3 years ago
Bit more digging and I managed to get it working.
Instead calling : /redfish/v1/Managers/1/LicenseService/1/
You need to call: /redfish/v1/Managers/1/LicenseService/
This is how I got to it ( if there is another way let me know )
for instance in resource_instances:
if '#Manager.' in instance['@odata.type']:
manager_uri = instance['@odata.id']
mager_data = _redfishobj.get(manager_uri)
ilo_lic_uri = mager_data.obj['Oem']['Hpe']['Links']['LicenseService']['@odata.id']
And than when I do post it works.
Thanks. Script Updated.
Hi, In your example to set ilo license you look for uri containing #HpeiLOLicense. and trying to do POST operation on it.
And later on:
resp = _redfishobj.post(ilo_lic_uri, {'LicenseKey' : ilo_key})
However this uri does not support POST operations:
{'@odata.id': '/redfish/v1/Managers/1/LicenseService/1/', '@odata.type': '#HpeiLOLicense.v2_3_0.HpeiLOLicense', 'ETag': 'W/"69DF09CB"', 'HttpMethods': ['GET', 'HEAD', 'DELETE']}
So it will fail with not allowed operation.