Still create host settings object if no host control
P9 doesn't have a host control object, so the host
settings object can't depend on it. As a short term
fix just create the host settings object even if
the host control object not found.
Change-Id: I6e14a1350de3575eb7f18d6d3a698367384cd8fc
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/settings_manager.py b/settings_manager.py
index f4907f7..0205ea5 100644
--- a/settings_manager.py
+++ b/settings_manager.py
@@ -69,6 +69,11 @@
if setting['type'] is not 'instance_query':
continue
paths = mapper.get_subtree_paths(setting['subtree'], 0)
+
+ if setting['keyregex'] == 'host':
+ # Always create at least one host object.
+ paths = set(paths + ['/org/openbmc/control/host0'])
+
for path in paths:
m = re.search(setting['matchregex'], path)
if not m: