openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
165 stars 135 forks source link

Unable to modify specific entry from staticnameservers on BMC #93

Closed prkatti1 closed 1 year ago

prkatti1 commented 5 years ago

Unable to keep old value when we try to modify any of the staticnameserver entry from BMC. It is modifying all entries.

curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -D patch.txt -d '{"StaticNameServers": ["{}","3.3.3.7"]}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0

curl -k -H "X-Auth-Token: $bmc_token" -X GET https://$bmc/redfish/v1/Managers/bmc/EthernetInterfaces/eth0

"{}",
"3.3.3.7"

], "SpeedMbps": 0, "StaticNameServers": [ "null", "3.3.3.7" ],

prkatti1 commented 5 years ago

@edtanous @ratagupt Pls take a look.

ratagupt commented 5 years ago

@prkatti1 : As discussed before, we would not be having the above method to delete the values from the list. If the list is of simple object(like string), we would ask the user to send the complete list.

@edtanous : Can you also suggest?

prkatti1 commented 5 years ago

If I want to delete 1 entry from list of 10, why I need to pass remaining 9 entries? And to modify 1 entry why I need to remember and pass 10 entries? Is there any limit for max number of dns servers that can be configured? @edtanous

edtanous commented 1 year ago

Is this still an issue? I believe it was discussed in other forums, but I don't recall the conclusion.

edtanous commented 1 year ago

No response from submitter about if this is still an issue. Bug is nearly 4 years old at this point and code has changed significantly, I suspect this was fixed long ago.