Skip to content
Commit 2138483c authored by George Liu's avatar George Liu
Browse files

Add the GetSubTree and GetSubTreePaths method to dbus_utility



There are currently many files that use the GetSubTree and
GetSubTreePaths methods. Since they are a general method, they are
defined in the dbus_utility.hpp file and will be further refactored
in subsequent patches.

Also, Updated the doPath method of NetworkProtocol synchronously.

Tested: Built bmcweb successfully and Validator passes
1. doGet NetworkProtocol
curl -k -H "X-Auth-Token: $token"
https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol
{
  "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol",
  "IPMI": {
    "Port": 623,
    "ProtocolEnabled": true
  },
  ...
}

2. change the ProtocolEnabled property to false
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json"
-X PATCH -d '{"IPMI": {"ProtocolEnabled" :false}}'
https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol

3. doGet NetworkProtocol again
curl -k -H "X-Auth-Token: $token"
https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol
{
  "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol",
  "IPMI": {
    "Port": null,
    "ProtocolEnabled": false
  },
  ...
}

Signed-off-by: default avatarGeorge Liu <liuxiwei@inspur.com>
Change-Id: I9ed3de74417d2662a7f433ea4a589f68f514a369
parent 8be2b5b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment