summaryrefslogtreecommitdiff
path: root/redfish-core/lib/health.hpp
diff options
context:
space:
mode:
authorMyung Bae <myungbae@us.ibm.com>2024-05-24 21:10:04 +0300
committerEd Tanous <ed@tanous.net>2024-07-03 10:15:15 +0300
commit28ee563e3d37a89100a903bd971bd9df443c5771 (patch)
treeb6249d44cd8873c9665a8a71620ae60915b511ac /redfish-core/lib/health.hpp
parent478c5a57ac1143d689f3d3670092c2eb75e0f0c4 (diff)
downloadbmcweb-master.tar.xz
Fix Chassis Topology Links HandlingHEADmaster
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/60914 implements topology links for chassis using `getAssociationEndPoints()` for `containing/contained_by` associations. If the association is used only between chassis, the desired result is obtained. ``` busctl get-property xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/system/chassis \ xyz.openbmc_project.Association.Definitions Associations a(sss) ... containing" "contained_by" "/xyz/openbmc_project/inventory/system/chassis/motherboard/rdx0" ``` ``` $ curl -k -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", "Links": { "Contains": [ ... { "@odata.id": "/redfish/v1/Chassis/rdx0" }, ``` However, the same associations can also be used for the other cases which may also be used for the other types[1]. For example, https://gerrit.openbmc.org/c/openbmc/openbmc/+/70372 also adds the associations between chassis and the non-chassis/board resources. ``` busctl get-property xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/system/chassis \ xyz.openbmc_project.Association.Definitions Associations … "containing" "contained_by" "/xyz/openbmc_project/inventory/system/chassis/motherboard/connector0" … "containing" "contained_by" "/xyz/openbmc_project/inventory/system/chassis/motherboard/rdx0" ``` In that case, Chassis Links gives the undesired result including the non-chassis resources in `Contains` collection. ``` $ curl -k -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", "Links": { "Contains": [ ... { "@odata.id": "/redfish/v1/Chassis/connector0" }, ... ``` This commit is to limit to get the chassis/board resources for Chassis `Contains` collection. Tested: - Check Chassis/Links collection to see whether there are non-chassis `curl -k -X GET https://${bmc}/redfish/v1/Chassis/chassis` - Redfish Service Validator passes [1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/e2c9bc74f2b8c0e78c305894289f8938d75ee108/yaml/xyz/openbmc_project/Inventory/Item/README.md?plain=1#L21 Change-Id: I472fc12379694acc35055965400141dbb1b33bfc Signed-off-by: Myung Bae <myungbae@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/health.hpp')
0 files changed, 0 insertions, 0 deletions