Add wait argument to 'Initiate BMC Reboot'.

This support is needed for OBMC Boot Test to use this function.

Change-Id: Idb907e072343602fc5467acebd97511bab02b0e8
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/state_manager.robot b/lib/state_manager.robot
index 5ea733f..8d0fa11 100755
--- a/lib/state_manager.robot
+++ b/lib/state_manager.robot
@@ -228,17 +228,24 @@
     ...  ELSE  Run Keywords  Initiate BMC Reboot  AND
     ...  Wait for BMC state  ${expected_state}
 
-
 Initiate BMC Reboot
     [Documentation]  Initiate BMC reboot.
-    ${args}=  Create Dictionary   data=${BMC_REBOOT_TRANS}
+    [Arguments]  ${wait}=${1}
+
+    # Description of argument(s):
+    # wait  Indicates that this keyword should wait for ending state..
+
+    ${args}=  Create Dictionary  data=${BMC_REBOOT_TRANS}
 
     Run Keyword And Ignore Error  Write Attribute
-    ...  ${BMC_STATE_URI}  RequestedBMCTransition   data=${args}
+    ...  ${BMC_STATE_URI}  RequestedBMCTransition  data=${args}
 
-    ${session_active}=   Check If BMC Reboot Is Initiated
-    Run Keyword If   '${session_active}' == '${True}'
-    ...    Fail   msg=BMC Reboot didn't occur
+    # Does caller want to wait for status?
+    Run Keyword If  '${wait}' == '${0}'  Return From Keyword
+
+    ${session_active}=  Check If BMC Reboot Is Initiated
+    Run Keyword If  '${session_active}' == '${True}'
+    ...  Fail  msg=BMC Reboot didn't occur.
 
     Check If BMC is Up