Comment 3 for bug 1845032

Revision history for this message
Freddy (fwieffering) wrote : Re: redfish bug fixes

> "removed trailing slashes from redfish power driver. This caused errors for some manufacturers implementations that we use", but does it cause communication with other BMC's from different manufactures fail? What is the Redfish specification, say?

We are using MaaS with three hardware vendors - dell, cisco, and hpe. The trailing slash has occasionally caused issues with cisco BMCs. Removing the trailing slash has not caused problems for the three manufacturers we use. I do not see specification in the redfish DMTF on whether a trailing slash should be included http://redfish.dmtf.org/schemas/DSP0266_1.0.html

>"catch json parsing errors and return a sensible error message if it fails to parse", who's parsing errors? MAAS parsing the JSON result or the BMC failing to parse the JSON body of the request?

In the redfish.py cb_json_decode method json.loads() of the response body is called. The change is to catch ValueErrors resulting from invalid json returned by a BMC, and raise a PowerActionError. We have occasionally encountered invalid json returned by redfish requests to the BMC and this just adds error handling for it.