Add Power Cycle for IPMI Get BIOS POST Code command

Add power cycle step for test Test Get BIOS POST Code
via IPMI Raw Command After Power Cycle.
This command was accidently left out.
Change for longer host_reboot_time, and power host
back on at end of test suite.

Signed-off-by: Lee Tarlton <leet@ami.com>
Change-Id: I10cb5207d84d99d1281257013c865cf1fbc3aeb6
diff --git a/ipmi/test_get_bios_post_code.robot b/ipmi/test_get_bios_post_code.robot
index 559ad12..39cc0f8 100644
--- a/ipmi/test_get_bios_post_code.robot
+++ b/ipmi/test_get_bios_post_code.robot
@@ -8,7 +8,7 @@
 
 *** Variables ***
 ${power_state_change}  10
-${host_reboot_time}  240
+${host_reboot_time}  360
 
 *** Test Cases ***
 
@@ -35,6 +35,13 @@
     [Documentation]  Get BIOS POST Code via IPMI raw command after power cycle.
     [Tags]  Test_Get_BIOS_POST_Code_via_IPMI_Raw_Command_After_Power_Cycle
 
+    ${resp}=  Run IPMI Standard Command  chassis power cycle
+    Sleep  ${power_state_change}
+    Should Contain  ${resp}  Chassis Power Control: Cycle
+    sleep  ${host_reboot_time}
+    ${ipmi_state}=  Get Host State Via External IPMI
+    Valid Value  ipmi_state  ['on']
+
     ${resp}=  Run IPMI Standard Command  raw ${IPMI_RAW_CMD['BIOS_POST_Code']['Get'][0]}
     Sleep  ${host_reboot_time}
 
@@ -51,6 +58,12 @@
     ${resp}=  Run IPMI Standard Command  raw ${IPMI_RAW_CMD['BIOS_POST_Code']['Get'][0]}
     Should Contain  ${resp}  ${IPMI_RAW_CMD['BIOS_POST_Code']['Get'][3]}
 
+    # Turn host back on.
+    IPMI Power On  stack_mode=skip  quiet=1
+    Verify Host PowerOn Via IPMI
+    ${resp}=  Run IPMI Standard Command  chassis power status
+    Should Be Equal As Strings  '${resp}'  'Chassis Power is on'
+
 *** Keywords ***
 
 Verify Host PowerOn Via IPMI