fix interface usage for OperatingSystemState

OperatingSystemState property of
xyz.openbmc_project.State.OperatingSystem.Status should be PDI enum of
type OSStatus.
This commit fixes values to be compatible with PDI.

Tested:
Updated to the full enum string and Confirmed that the
'Updated to POST Complete' and 'Updated to !POST Complete' messages
both get logged correctly on a host reboot, and that the VALUE of
'Read POST complete value' is correct when ipmid starts with the host
off or on.

Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
Change-Id: I2b54f9128102e6dedda442e77fc920aeabef58ce
diff --git a/src/whitelist-filter.cpp b/src/whitelist-filter.cpp
index 0b78578..5b8eb27 100644
--- a/src/whitelist-filter.cpp
+++ b/src/whitelist-filter.cpp
@@ -148,7 +148,7 @@
             ipmi::getDbusProperty(*bus, service, systemOsStatusPath,
                                   systemOsStatusIntf, "OperatingSystemState");
         auto& value = std::get<std::string>(v);
-        postCompleted = (value == "Standby");
+        updatePostComplete(value);
         log<level::INFO>("Read POST complete value",
                          entry("VALUE=%d", postCompleted));
     }
@@ -204,14 +204,11 @@
 
 void WhitelistFilter::updatePostComplete(const std::string& value)
 {
-    if (value == "Standby")
-    {
-        postCompleted = true;
-    }
-    else
-    {
-        postCompleted = false;
-    }
+    // The short string "Standby" is deprecated in favor of the full enum string
+    // Support for the short string will be removed in the future.
+    postCompleted = (value == "Standby") ||
+                    (value == "xyz.openbmc_project.State.OperatingSystem."
+                              "Status.OSStatus.Standby");
     log<level::INFO>(postCompleted ? "Updated to POST Complete"
                                    : "Updated to !POST Complete");
 }