Update test_os_reboot.robot suite to redfish
Change-Id: I9afeca43171fd3f4fb954df9e1027c735d32b1c5
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/extended/test_os_reboot.robot b/redfish/extended/test_os_reboot.robot
new file mode 100644
index 0000000..1954eda
--- /dev/null
+++ b/redfish/extended/test_os_reboot.robot
@@ -0,0 +1,49 @@
+*** Settings ***
+Documentation Module to test OS reboot functionality.
+
+Resource ../../lib/openbmc_ffdc.robot
+Resource ../../lib/boot_utils.robot
+
+Suite Setup Run Key Start SOL Console Logging
+Test Teardown Test Teardown Execution
+
+*** Variables ***
+
+# User defined boot test iteration.
+${BOOT_LOOP_COUNT} ${1}
+
+*** Test Cases ***
+
+Host Reboot Loop
+ [Documentation] Boot OS and trigger reboot and expect
+ ... OS to boot back.
+ [Tags] Host_Reboot_Loop
+
+ # 1. Boot OS
+ # 2. Verify OS is booted
+ # 3. Issue "reboot" from OS
+ # 4. Verify if OS is booted back
+
+ # By default run test for 1 loop, else user input iteration.
+ # Fails immediately if any of the execution rounds fail.
+
+ # Note: Host Reboot is implemented by the OBMC Boot Test tool.
+ # OBMC Boot Test will take the necessary steps to get the OBMC
+ # to a host powered on state before attempting the Host Reboot.
+ Repeat Keyword ${BOOT_LOOP_COUNT} times Redfish Host Reboot
+
+*** Keywords ***
+
+Test Teardown Execution
+ [Documentation] Do the post test teardown.
+ # 1. Capture FFDC on test failure.
+ # 2. Stop SOL logging.
+ # 3. Close all open SSH connections.
+
+ FFDC On Test Case Fail
+
+ ${keyword_buf}= Catenate Stop SOL Console Logging
+ ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
+ Run Key ${keyword_buf}
+
+ Close All Connections