Adding support for BMC Power On/BMC Power Off
This change includes the following new keywords:
BMC Power On
Check Power On States
BMC Power Off
Check Power Off States
Get BMC State
Get Power State
It also includes modifications to the following keywods:
Is Power On
Is Power Off
Wait For Host To Ping
Check OS
Open Connection and Log In
A variable definition has been added to resource.txt and a
file to keep track of DVT's resource files has been created.
Change-Id: Idc81be7e2dfb21c35bc51214f8650a10d8481120
Signed-off-by: Leah McNutt <lmcnutt@us.ibm.com>
diff --git a/lib/boot/boot_resource_master.robot b/lib/boot/boot_resource_master.robot
new file mode 100644
index 0000000..1c8e85a
--- /dev/null
+++ b/lib/boot/boot_resource_master.robot
@@ -0,0 +1,5 @@
+*** Settings ***
+# This file pulls in all of the other resource files in lib/boot/
+
+Resource powerons.robot
+Resource poweroffs.robot
diff --git a/lib/boot/poweroffs.robot b/lib/boot/poweroffs.robot
new file mode 100644
index 0000000..f9a6940
--- /dev/null
+++ b/lib/boot/poweroffs.robot
@@ -0,0 +1,32 @@
+*** Settings ***
+Documentation Contains all of the keywords that do various power offs.
+
+Resource ../resource.txt
+Resource ../utils.robot
+Resource ../connection_client.robot
+
+*** Keywords ***
+BMC Power Off
+ [Documentation] Powers off the system and makes sure that all states are
+ ... powered off.
+
+ Open Connection and Log In
+ Initiate Power Off
+ Check Power Off States
+ Close Connection
+
+Check Power Off States
+ [Documentation] Checks that the BMC state, power state, and boot progress
+ ... are correctly powered off.
+
+ ${power_state}= Get Power State
+ Should Be Equal ${power_state} ${0}
+ Log to Console Power State: ${power_state}
+
+ ${boot_progress}= Get Boot Progress
+ Should Be Equal ${boot_progress} Off
+ Log to Console Boot Progress: ${boot_progress}
+
+ ${bmc_state}= Get BMC State
+ Should Contain ${bmc_state} HOST_POWERED_OFF
+ Log to Console BMC State: ${bmc_state}
diff --git a/lib/boot/powerons.robot b/lib/boot/powerons.robot
new file mode 100644
index 0000000..b3e402f
--- /dev/null
+++ b/lib/boot/powerons.robot
@@ -0,0 +1,36 @@
+*** Settings ***
+Documentation Contains all of the keywords that do various power ons.
+
+Resource ../resource.txt
+Resource ../utils.robot
+Resource ../connection_client.robot
+
+*** Keywords ***
+BMC Power On
+ [Documentation] Powers on the system, checks that the OS is functional, and
+ ... makes sure that all states are powered on.
+
+ &{bmc_connection_args}= Create Dictionary alias=bmc_connection
+
+ Open Connection and Log In &{bmc_connection_args}
+ Initiate Power On
+ Wait For OS
+ Switch Connection bmc_connection
+ Check Power On States
+ Close Connection
+
+Check Power On States
+ [Documentation] Checks that the BMC state, power state, and boot progress
+ ... are correctly powered on.
+
+ ${bmc_state}= Get BMC State
+ Should Contain ${bmc_state} HOST_BOOTED
+ Log to Console BMC State: ${bmc_state}
+
+ ${boot_progress}= Get Boot Progress
+ Should Be Equal ${boot_progress} FW Progress, Starting OS
+ Log to Console Boot Progress: ${boot_progress}
+
+ ${power_state}= Get Power State
+ Should Be Equal ${power_state} ${1}
+ Log to Console Power State: ${power_state}