summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/classes
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-22 20:48:49 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-29 21:59:15 -0400
commit4f045d0b1bd11f4529a4b25c69a95ac043fe9e76 (patch)
treee076890092af8dbda6f57726c534e8f317e1c74b /meta-phosphor/classes
parent24dc4d718b07918a78407cacc7d2612850ddd863 (diff)
downloadtalos-openbmc-4f045d0b1bd11f4529a4b25c69a95ac043fe9e76.tar.gz
talos-openbmc-4f045d0b1bd11f4529a4b25c69a95ac043fe9e76.zip
phosphor-mapper: Add service namespaces
The c++ mapper implements a dbus service namespace whitelist instead of a path namespace whitelist. A service namespace whitelist significantly reduces the amount of introspection required by the mapper as compared to path namespaces. Add the service namespace whitelist to the mapper command line in the mapper systemd unit and extend the existing framework for specifying mapper command line arguments to include a service namespace whitelist. Note that support for a _service_ blacklist is added and _path_ and _interface_ blacklists are not being re-introduced. (From meta-phosphor rev: 385c63fee1d7ac4f34165de7095f2e76b10f1328) Change-Id: I0cc8f7d7dd0c1196b2354118cf6ab89b2d30231f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/classes')
-rw-r--r--meta-phosphor/classes/phosphor-mapper.bbclass16
-rw-r--r--meta-phosphor/classes/phosphor-mapperdir.bbclass2
2 files changed, 15 insertions, 3 deletions
diff --git a/meta-phosphor/classes/phosphor-mapper.bbclass b/meta-phosphor/classes/phosphor-mapper.bbclass
index 7bafecb79..97da8503d 100644
--- a/meta-phosphor/classes/phosphor-mapper.bbclass
+++ b/meta-phosphor/classes/phosphor-mapper.bbclass
@@ -7,17 +7,23 @@
# interfaces it will keep track of.
#
# The Phosphor layer by default configures the mapper to
-# watch xyz.openbmc_project interfaces and paths only. This
-# configuration file is intended to be inherited by
-# native recipes in other layers that wish to add namespaces
+# watch xyz.openbmc_project services, interfaces and paths
+# only. This configuration file is intended to be inherited
+# by native recipes in other layers that wish to add namespaces
# or interfaces to the mapper watchlist.
# Add path namespaces to be monitored:
# PHOSPHOR_MAPPER_NAMESPACE_append = " /foo/bar"
+# Add service namespaces to be monitored:
+# PHOSPHOR_MAPPER_SERVICE_append = " foo.bar"
+
# Add interfaces to be monitored:
# PHOSPHOR_MAPPER_INTERFACE_append = " foo.bar"
+# Blacklist services from being monitored:
+# PHOSPHOR_MAPPER_SERVICE_BLACKLIST_append = " foo.bar"
+
inherit phosphor-mapperdir
inherit obmc-phosphor-utils
@@ -34,9 +40,13 @@ python phosphor_mapper_do_postinst() {
pass
process_var(d, 'PHOSPHOR_MAPPER_NAMESPACE', 'namespace_dir')
+ process_var(d, 'PHOSPHOR_MAPPER_SERVICE', 'service_dir')
process_var(d, 'PHOSPHOR_MAPPER_INTERFACE', 'interface_dir')
+ process_var(d, 'PHOSPHOR_MAPPER_SERVICE_BLACKLIST', 'serviceblacklist_dir')
}
do_install[vardeps] += "PHOSPHOR_MAPPER_NAMESPACE"
+do_install[vardeps] += "PHOSPHOR_MAPPER_SERVICE"
do_install[vardeps] += "PHOSPHOR_MAPPER_INTERFACE"
+do_install[vardeps] += "PHOSPHOR_MAPPER_SERVICE_BLACKLIST"
do_install[postfuncs] += "phosphor_mapper_do_postinst"
diff --git a/meta-phosphor/classes/phosphor-mapperdir.bbclass b/meta-phosphor/classes/phosphor-mapperdir.bbclass
index 33962f257..ed686287a 100644
--- a/meta-phosphor/classes/phosphor-mapperdir.bbclass
+++ b/meta-phosphor/classes/phosphor-mapperdir.bbclass
@@ -1,2 +1,4 @@
namespace_dir="${datadir}/phosphor-mapper/namespace"
+service_dir="${datadir}/phosphor-mapper/service"
interface_dir="${datadir}/phosphor-mapper/interface"
+serviceblacklist_dir="${datadir}/phosphor-mapper/serviceblacklist"
OpenPOWER on IntegriCloud