|
Post by scotbusi on Aug 29, 2024 12:59:47 GMT
Hello, Tring to do a PATCH for a BIOS attribute but cannot get the curl payload correct. I have not seen this implementation of the attributes before. Is this even a supported method? See below. I tried the below but returns a malformed. curl -u supportuser:support@eviden -k -H "X-Auth-Token: $token" -X PATCH 141.112.43.234/redfish/v1/Systems/system/Bios/Settings -d '{ "Attributes": {"PchSetup-\gt;PchSata_0": "0x01" } }' curl -u supportuser:support@eviden -k -H "X-Auth-Token: $token" -X PATCH 141.112.44.222/redfish/v1/Systems/system/Bios/Settings -d '{ "Attributes": { "PchSetup->PchSata_0": "0x01" }}' redfish { "@redfish.Settings": { "@odata.type": "#Settings.v1_3_0.Settings", "SettingsObject": { "@odata.id": "/redfish/v1/Systems/system/Bios/Settings" } }, "@odata.id": "/redfish/v1/Systems/system/Bios", "@odata.type": "#Bios.v1_1_0.Bios", "Actions": { "#Bios.ChangePassword": { "target": "/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword" }, "#Bios.ResetBios": { "target": "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios" } }, "AttributeRegistry": "BiosAttributeRegistry", "Attributes": { "PchSetup-\gt;DciDbcMode": "0x04", "PchSetup-\gt;DciEn": "0x02", "PchSetup-\gt;DciUsb3TypecUfpDbg": "0x02", "PchSetup-\gt;PchSata_0": "0x01", "PchSetup-\gt;PchSata_1": "0x01", "PchSetup-\gt;PchSata_2": "0x01", "PchSetup-\gt;SataInterfaceMode_0": "0x00",
|
|
|
Post by mraineri on Aug 29, 2024 13:17:09 GMT
That's invalid JSON. The \ character in the attribute property names is causing an escape, but "\g" is not defined as anything in the JSON RFC. I'm very surprised you got that as a response; I would expect a JSON serializer would prevent something like that, but perhaps the vendor is building the JSON output manually.
Unfortunately you'll need to raise this with your vendor for support.
|
|
|
Post by scotbusi on Aug 29, 2024 15:52:13 GMT
One of my team members was able to get this in Ansible "PchSetup->PchSata_0" Any reason this would work in ansible and not in the payload with a curl statement?
|
|
|
Post by mraineri on Aug 29, 2024 19:46:07 GMT
I noticed two things just now: you're specifying an X-Auth-Token when you already are using Basic auth (-u will add Basic auth headers) and you're not specifying the Content-Type.
Can you run the following and send the full output from curl? I'd like to see how the HTTP request is formed and what the service is returning.
curl -u supportuser:support@eviden -k -H "Content-Type: application/json" -X PATCH 141.112.44.222/redfish/v1/Systems/system/Bios/Settings -d '{ "Attributes": { "PchSetup->PchSata_0": "0x01" }}' -vvv
|
|