summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2018-11-13 10:33:50 -0600
committerMatt Spinler <spinler@us.ibm.com>2018-11-26 21:17:51 +0000
commit06e5d2fe297d15ac261a9452a3674a946b36c7ff (patch)
tree3cdbea529a85c6205805f3c29f33305c852b1433
parentd4dd96a0386fa4d3a6abe8602f5404422db8e547 (diff)
downloadphosphor-objmgr-06e5d2fe297d15ac261a9452a3674a946b36c7ff.tar.gz
phosphor-objmgr-06e5d2fe297d15ac261a9452a3674a946b36c7ff.zip
bindings: Skip the default ifaces on enumerate
The C++ mapper will now return D-Bus object paths that only contain the 3 default D-Bus interfaces: * org.freedesktop.DBus.Introspectable * org.freedesktop.DBus.Peer * org.freedesktop.DBus.Properties Whereas before it would filter out these paths. As these paths aren't explicitly hosted by a service, trying to do a GetAll method to read their properties, which would occur during an enumerate REST operation, would fail. The fix is to skip trying to read properties on these interfaces. Change-Id: I9b306a4fbefa78c60f739c1351cd32ee2c36c234 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rw-r--r--obmc/mapper/bindings.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/obmc/mapper/bindings.py b/obmc/mapper/bindings.py
index 8fbcd51..8024105 100644
--- a/obmc/mapper/bindings.py
+++ b/obmc/mapper/bindings.py
@@ -24,6 +24,12 @@ MAPPER_IFACE = MAPPER_NAME
MAPPER_PATH = '/xyz/openbmc_project/object_mapper'
MAPPER_NOT_FOUND = 'org.freedesktop.DBus.Error.FileNotFound'
+# The default D-Bus interfaces that we don't need to get
+# properties on during an enumerate.
+DEFAULT_IFACES = ['org.freedesktop.DBus.Introspectable',
+ 'org.freedesktop.DBus.Peer',
+ 'org.freedesktop.DBus.Properties']
+
class Mapper:
def __init__(self, bus):
@@ -108,6 +114,8 @@ class Mapper:
for i in interfaces:
if match and not match(i):
continue
+ if i in DEFAULT_IFACES:
+ continue
properties.update(self.__get_properties_on_iface(
properties_iface, i))
OpenPOWER on IntegriCloud