diff options
author | Potin Lai <potin.lai@quantatw.com> | 2023-02-14 09:28:58 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-05-10 20:06:50 +0300 |
commit | cddbf3df0ea0b78521b62f30f2ce764c6619018a (patch) | |
tree | 10e7ec2048e78f965a49d0be9cb2d775c0e30513 /http/http_connection.hpp | |
parent | 662aa6e361f8705cfd91261080324ff0e74778e4 (diff) | |
download | bmcweb-cddbf3df0ea0b78521b62f30f2ce764c6619018a.tar.xz |
managers: fix bug of searching dbus object path
Notice a bug of patching existed object if the object name contains
space or underscore.
Normally dbus replace space with underscore for object path.
Replacing all spaces in input name with underscore to find the correct
dbus object path.
Tested results:
- Add new object
Input JSON
```
{
"Oem": {
"OpenBmc": {
"Fan": {
"StepwiseControllers": {
"Test_1": {
"Direction": "Floor",
"Inputs": [
"MB_U402_THERM_LOCAL"
],
"NegativeHysteresis": 0.0,
"PositiveHysteresis": 0.0,
"Steps": [
{
"Output": 0.0,
"Target": 48.0
},
{
"Output": 40.0,
"Target": 52.0
}
],
"Zones": [
{
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone0"
}
]
}
}
}
}
}
}
```
Check result from /redfish/v1/Managers/bmc
```
"Test_1": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/StepwiseControllers/Test_1",
"@odata.type": "#OemManager.StepwiseController",
"Direction": "Floor",
"Inputs": [
"MB U402 THERM LOCAL"
],
"NegativeHysteresis": 0.0,
"PositiveHysteresis": 0.0,
"Steps": [
{
"Output": 0.0,
"Target": 48.0
},
{
"Output": 40.0,
"Target": 52.0
}
],
"Zones": [
{
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone0"
}
]
}
```
- Patching existed object successful
Input JSON
```
{
"Oem": {
"OpenBmc": {
"Fan": {
"StepwiseControllers": {
"Test_1": {
"NegativeHysteresis": 0.0,
"PositiveHysteresis": 5.0,
}
}
}
}
}
}
```
Check result from /redfish/v1/Managers/bmc
```
"Test_1": {
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/StepwiseControllers/Test_1",
"@odata.type": "#OemManager.StepwiseController",
"Direction": "Floor",
"Inputs": [
"MB U402 THERM LOCAL"
],
"NegativeHysteresis": 0.0,
"PositiveHysteresis": 5.0,
"Steps": [
{
"Output": 0.0,
"Target": 48.0
},
{
"Output": 40.0,
"Target": 52.0
}
],
"Zones": [
{
"@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone0"
}
]
}
```
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I12c78e52801bd0814ba2d928cf020e0a04214c39
Diffstat (limited to 'http/http_connection.hpp')
0 files changed, 0 insertions, 0 deletions