commit | 1e3f7810c7e19008283937ab12a69fdce0d2df8c | [log] [tgz] |
---|---|---|
author | Myung Bae <myungbae@us.ibm.com> | Tue Mar 25 08:33:22 2025 -0700 |
committer | Myung Bae <myungbae@us.ibm.com> | Tue Apr 01 07:31:05 2025 -0500 |
tree | a271ee79ace0bfdb325dfd6f507ff9177fc1badf | |
parent | 2a1ef0138c33036c82793104287e72d41f778108 [diff] |
Fix SubTreePathsById when given ID is invalid The commit 7a93d51 makes `getAssociatedSubTreePathsById()` to return empty paths if there are no associated subtrees. However, it also returns empty paths as a success, even if the given id is not valid. This is to check the invalid case and to return NotFound. For example, currently, this gives the success - GET /redfish/v1/Chassis/INVALID/PowerSubsystem/PowerSupplies Tested: - GET with the invalid id and check the return condition. ``` busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssassas \ "InvalidChassis" \ "/xyz/openbmc_project/inventory" \ 1 "xyz.openbmc_project.Inventory.Item.Chassis" \ "powered_by" \ 1 "xyz.openbmc_project.Inventory.Item.PowerSupply" --> Call failed: The resource is not found. ``` Change-Id: If4f621e105bc1a5c443c1ec8b7762f57748e1d10 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
This repository contains the mapper, which assists in finding things on D-Bus. There is documentation about it here.
Non-OpenBMC build dependencies are:
meson build && ninja -C build
meson build && ninja -C build test
rm -rf build