diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-09-11 20:09:48 -0400 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-09-11 20:14:35 -0400 |
commit | 8f3017340d32ba0cb89a4370aede58ff8e60dbce (patch) | |
tree | 2bb1b2c627274d53989419c69aa98b8ce9a951ad | |
parent | 296395c1667d7554532585de41cdeba774834bb9 (diff) | |
download | phosphor-objmgr-8f3017340d32ba0cb89a4370aede58ff8e60dbce.tar.gz phosphor-objmgr-8f3017340d32ba0cb89a4370aede58ff8e60dbce.zip |
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>
-rw-r--r-- | obmc/mapper/bindings.py | 7 |
1 files changed, 3 insertions, 4 deletions
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 @@ class Mapper: 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 @@ class Mapper: 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 @@ class Mapper: 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) |