Support redfish auto reboot via busctl
Update boot table to call redfish auto reboot during boot.
Change-Id: I91ac4ae9b7dd4e90a4ce800e3a571be62cfe0403
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/data/boot_table_redfish.json b/data/boot_table_redfish.json
index aaac314..485ff19 100644
--- a/data/boot_table_redfish.json
+++ b/data/boot_table_redfish.json
@@ -537,15 +537,17 @@
"lib_file_path": "ipmi_client.robot"
},
# Do an auto reboot by setting auto reboot to "yes" and going to quiesce state.
+ # Start of host state as off and "Redfish Initiate Auto Reboot" invoke poweron
+ # sleep 30 and then inject the auto reboot sequence.
"Auto Reboot": {
"start": {
"redfish": "^1$",
- "chassis": "^On$",
- "boot_progress": "^SystemHardwareInitializationComplete|OSBootStarted|OSRunning$",
- "host": "^Enabled$",
- "os_ping": "^1$",
- "os_login": "^1$",
- "os_run_cmd": "^1$"
+ "chassis": "^Off$",
+ "boot_progress": "^None$",
+ "host": "^Disabled$",
+ "os_ping": "^0$",
+ "os_login": "^0$",
+ "os_run_cmd": "^0$"
},
"end": {
"redfish": "^1$",
@@ -558,7 +560,7 @@
},
"bmc_reboot": 0,
"method_type": "keyword",
- "method": "utils.Initiate Auto Reboot 1000",
+ "method": "utils.Redfish Initiate Auto Reboot 1000",
"lib_file_path": "utils.robot"
},
# Run a "reboot" command on the OS_HOST.
diff --git a/lib/utils.robot b/lib/utils.robot
index 6783410..038dfba 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -7,6 +7,7 @@
Resource ../lib/connection_client.robot
Resource ../lib/boot_utils.robot
Resource ../lib/common_utils.robot
+Resource ../lib/bmc_redfish_utils.robot
Library String
Library DateTime
Library Process
@@ -956,6 +957,9 @@
# Set auto reboot policy
Redfish Set Auto Reboot RetryAttempts
+ Redfish Power Operation On
+ Sleep 30s
+
# Set watchdog timer
Set Watchdog Interval Using Busctl ${interval}
@@ -968,8 +972,8 @@
# Description of argument(s):
# miliseconds Time interval for watchdog timer
- ${cmd}= Set Variable busctl set-property xyz.openbmc_project.Watchdog
- ... ${HOST_WATCHDOG_URI}
- ... xyz.openbmc_project.State.Watchdog Interval t ${milliseconds}
+ ${cmd}= Catenate busctl set-property xyz.openbmc_project.Watchdog
+ ... /xyz/openbmc_project/watchdog/host0
+ ... xyz.openbmc_project.State.Watchdog Interval t ${milliseconds}
BMC Execute Command ${cmd}