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>
2 files changed
tree: a271ee79ace0bfdb325dfd6f507ff9177fc1badf
  1. fail-monitor/
  2. libmapper/
  3. src/
  4. subprojects/
  5. .clang-format
  6. .gitignore
  7. LICENSE
  8. meson.build
  9. meson.options
  10. OWNERS
  11. README.md
README.md

The Mapper

This repository contains the mapper, which assists in finding things on D-Bus. There is documentation about it here.

Prerequisites

Non-OpenBMC build dependencies are:

  • meson/ninja
  • boost
  • libsystemd
  • systemd
  • tinyxml2

Build

meson build && ninja -C build

Run Unit Tests

meson build && ninja -C build test

Clean the repository

rm -rf build