bindings: Fix interface matching when searching
Prior to this patch the default interface matching filter
specified the org.openbmc and xyz.openbmc_project interface
namespaces. This results in missing attributes in other
namespaces.
Change the default match algorithm to filter out
org.freedesktop.DBus.ObjectManager interfaces only, so that
by default the complete set of interfaces are considered.
Resolves: openbmc/openbmc#2269
Change-Id: If895b7bbfa8794a36376042cbdbcf55c300abb50
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/obmc/mapper/bindings.py b/obmc/mapper/bindings.py
index 2e2df0a..e61a39c 100644
--- a/obmc/mapper/bindings.py
+++ b/obmc/mapper/bindings.py
@@ -16,7 +16,6 @@
import dbus
import obmc.dbuslib.enums
-import obmc.utils.misc
import obmc.utils.pathtree
@@ -105,7 +104,7 @@
properties_iface = dbus.Interface(
obj, dbus_interface=dbus.PROPERTIES_IFACE)
for i in interfaces:
- if not match(i):
+ if match and not match(i):
continue
properties.update(self.__get_properties_on_iface(
properties_iface, i))
@@ -114,7 +113,7 @@
def enumerate_object(
self, path,
- match=obmc.utils.misc.org_dot_openbmc_match,
+ match=lambda x: x != dbus.BUS_DAEMON_IFACE + '.ObjectManager',
mapper_data=None):
if mapper_data is None:
mapper_data = {path: self.get_object(path)}
@@ -130,7 +129,7 @@
def enumerate_subtree(
self, path='/',
- match=obmc.utils.misc.org_dot_openbmc_match,
+ match=lambda x: x != dbus.BUS_DAEMON_IFACE + '.ObjectManager',
mapper_data=None):
if mapper_data is None:
mapper_data = self.get_subtree(path)