Fix conflicting "CurrentHostState" host state from hypervisor
Changes:
Boot table look up "CurrentHostState" but from the host
URL "/xyz/openbmc_project/state/host0". Skipping the
hypervisor state from the state enumeration logic for
checking the boot state.
"/xyz/openbmc_project/state/host0": {
"CurrentHostState": "xyz.openbmc_project.State.Host.HostState.Running",
"/xyz/openbmc_project/state/hypervisor0": {
"CurrentHostState": "xyz.openbmc_project.State.Host.HostState.TransitioningToRunning",
Change-Id: I77b8beb26a6b9949bdaff33094e1beb5b4d3daf7
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/state.py b/lib/state.py
index 1071d06..3eb3473 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -662,6 +662,11 @@
if int(state['rest']):
for url_path in ret_values:
+ # Skip conflicting "CurrentHostState" URL from the enum
+ # /xyz/openbmc_project/state/hypervisor0
+ if "hypervisor0" in url_path:
+ continue
+
for attr_name in ret_values[url_path]:
# Create a state key value based on the attr_name.
try: