Fix boot sensor test

Changes:
    - Added "wait" option for "Initiate Host Reboot" keyword.
    - Update system state in test template.

Change-Id: Ia7c714694a064b67615137f300e344bdbdcf7777
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/state_manager.robot b/lib/state_manager.robot
index 75b1048..e50f1b0 100755
--- a/lib/state_manager.robot
+++ b/lib/state_manager.robot
@@ -17,7 +17,7 @@
     [Documentation]  Initiate host power on.
     [Arguments]  ${wait}=${1}
 
-    # Description of arguments:
+    # Description of argument(s):
     # wait  Indicates that this keyword should wait for host running state.
 
     ${args}=  Create Dictionary   data=${HOST_POWERON_TRANS}
@@ -37,7 +37,7 @@
     # 2. Hard power off, if failed.
     [Arguments]  ${wait}=${1}
 
-    # Description of arguments:
+    # Description of argument(s):
     # wait  Indicates that this keyword should wait for host off state.
 
     ${args}=  Create Dictionary   data=${HOST_POWEROFF_TRANS}
@@ -80,10 +80,18 @@
 
 Initiate Host Reboot
     [Documentation]  Initiate host reboot via REST.
+    [Arguments]  ${wait}=${1}
+
+    # Description of argument(s):
+    # wait  Indicates that this keyword should wait for host reboot state.
 
     ${args}=  Create Dictionary  data=${HOST_REBOOT_TRANS}
     Write Attribute
     ...  ${HOST_STATE_URI}  RequestedHostTransition  data=${args}
+
+    # Does caller want to wait for host booted status?
+    Run Keyword If  '${wait}' == '${0}'  Return From Keyword
+
     Is Host Rebooted
 
 
@@ -304,4 +312,4 @@
 
 Wait For BMC Ready
     [Documentation]  Check BMC state and wait for BMC Ready.
-    Wait Until Keyword Succeeds  10 min  10 sec  Is BMC Ready
\ No newline at end of file
+    Wait Until Keyword Succeeds  10 min  10 sec  Is BMC Ready
diff --git a/tests/test_soft_boot_sensors.robot b/tests/test_soft_boot_sensors.robot
index 9e200e0..4775080 100644
--- a/tests/test_soft_boot_sensors.robot
+++ b/tests/test_soft_boot_sensors.robot
@@ -59,7 +59,7 @@
     [Template]  Validate Boot AttemptsLeft
 
     # System at standby    AttemptsLeft
-    Ready                  2
+    Off                    2
 
 
 Verify Boot Sensor States At Ready
@@ -249,7 +249,7 @@
     ...  ELSE IF  '${option}' == 'Booted'
     ...    Initiate Host Boot
     ...  ELSE IF  '${option}' == 'RebootHost'
-    ...    Initiate Host Reboot
+    ...    Initiate Host Reboot  wait=${0}
     ...  ELSE IF  '${option}' == 'ResetReload'
     ...    Reboot Host And Expect Runtime