Comment 2 for bug 1842486

Revision history for this message
Chris Newcomer (cnewcomer) wrote : Re: [2.6] Redfish controller iDRAC returns 406 error

After reviewing the code in [2], it would appear that the proper headers are not being sent to the Redfish API, according to [1]:

GET_HEADERS = {'accept': 'application/json', 'OData-Version': '4.0'}
POST_HEADERS = {'content-type': 'application/json', 'accept': 'application/json', 'OData-Version': '4.0'}
PATCH_HEADERS = {'content-type': 'application/json', 'accept': 'application/json', 'OData-Version': '4.0'}
DELETE_HEADERS = {'accept': 'application/json', 'OData-Version': '4.0'}

Not sure the OData ones are needed, those are mostly for compliance, but others are definitely needed or it will fail in some hardware.

[1] https://github.com/ansible/ansible/pull/55193
[2] https://git.launchpad.net/maas/tree/src/provisioningserver/drivers/power/redfish.py#n57