diff options
author | George Liu <liuxiwei@inspur.com> | 2023-04-11 05:44:33 +0300 |
---|---|---|
committer | George Liu <liuxiwei@inspur.com> | 2023-04-11 05:51:57 +0300 |
commit | 7a2bb2c9561a57dd23d1de44f5f38a95fdd806af (patch) | |
tree | 460c42e285d2b341fe43a5cee4defc38125cc761 | |
parent | a72100201c2ebf3e8da33e9f325ae871bc4598bf (diff) | |
download | bmcweb-7a2bb2c9561a57dd23d1de44f5f38a95fdd806af.tar.xz |
Fix PowerSubsystem/PowerSupplies causing validator to fail
In the following commit[1], the member of Members was removed by
mistake, causing the validator to fail. This commit fixes this
problem.
Redfish validator failing with the following:
ERROR - Members: Mandatory prop does not exist
1 failMandatoryExist errors in
/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies
1 failMandatoryExist errors in
/redfish/v1/Chassis/motherboard/PowerSubsystem/PowerSupplies
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57668/26..29//COMMIT_MSG#b15
Tested: Validator passes
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I814e07d860422c5dce0fbb6267cb58dc07a74c31
-rw-r--r-- | redfish-core/lib/power_supply.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/redfish-core/lib/power_supply.hpp b/redfish-core/lib/power_supply.hpp index 9fffa197c6..266bda2fef 100644 --- a/redfish-core/lib/power_supply.hpp +++ b/redfish-core/lib/power_supply.hpp @@ -44,6 +44,8 @@ inline void "PowerSubsystem", "PowerSupplies"); asyncResp->res.jsonValue["Description"] = "The collection of PowerSupply resource instances."; + asyncResp->res.jsonValue["Members"] = nlohmann::json::array(); + asyncResp->res.jsonValue["Members@odata.count"] = 0; std::string powerPath = *validChassisPath + "/powered_by"; dbus::utility::getAssociationEndPoints( |