control: manager: Services with no managed objs
When a D-Bus object used in events is under a service that has the
"org.freedesktop.DBus.ObjectManager", the control::json::Manager will
try to get all the managed objects under the service and add to cache.
However, in case when the results from the GetManagedObjects are empty,
it omits the attempt to directly read the object from D-Bus using the
configured information.
This patch handles this situation and allows services that have the
ObjectManager interface but empty managed objects can be read.
Example: Objects under xyz.openbmc_project.State.Host service.
root@mtmitchell-dcscm:~# busctl call xyz.openbmc_project.State.Host \
/xyz/openbmc_project/state/host0 org.freedesktop.DBus.ObjectManager \
GetManagedObjects
a{oa{sa{sv}}} 0
Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Change-Id: I5eca78fdfbc8a26fb7effb861440dc3cf28959d0
2 files changed