Making adjustments for coming state changes.  I also rewrote some robot
keywords in python.

Note that the changes for the new "bmc" values are not present yet
since the product code for that is not yet available to me.

Change-Id: I30ea13930512ae1ffcf29000d0e4661352a797d7
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/boot/powerons.py b/lib/boot/powerons.py
index a861d57..e8b921b 100755
--- a/lib/boot/powerons.py
+++ b/lib/boot/powerons.py
@@ -10,9 +10,15 @@
 
 from robot.libraries.BuiltIn import BuiltIn
 
+# We don't want global variable getting changed when an import is done
+# so we'll save it and restore it.
+quiet = int(BuiltIn().get_variable_value("${quiet}"))
+
 # We need utils.robot to get keyword "Initiate Power On".
 BuiltIn().import_resource("utils.robot")
 
+BuiltIn().set_global_variable("${quiet}", quiet)
+
 
 ###############################################################################
 def bmc_power_on():
@@ -39,9 +45,15 @@
     state_mod.wait_state(match_state, wait_time=state_change_timeout,
                          interval="3 seconds", invert=1)
 
-    cmd_buf = ["Create Dictionary", "power=${1}",
-               "bmc=HOST_BOOTED",
-               "boot_progress=FW Progress, Starting OS"]
+    if state_mod.OBMC_STATES_VERSION == 0:
+        cmd_buf = ["Create Dictionary", "power=${1}",
+                   "bmc=HOST_BOOTED",
+                   "boot_progress=FW Progress, Starting OS"]
+    else:
+        cmd_buf = ["Create Dictionary", "chassis=On",
+                   "bmc=HOST_BOOTED",
+                   "boot_progress=FW Progress, Starting OS",
+                   "host=Running"]
     grp.rdpissuing_keyword(cmd_buf)
     final_state = BuiltIn().run_keyword(*cmd_buf)