summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/redfish/management.py
diff options
context:
space:
mode:
authorDmitry Tantsur <dtantsur@protonmail.com>2021-09-03 10:38:28 +0200
committerDmitry Tantsur <dtantsur@protonmail.com>2021-10-11 17:25:57 +0200
commit7f9badb5437631fdea0f31b85aee3373f7bbb985 (patch)
treeb3dbba42e7f751bd3d09bc0cc16d840b46746053 /ironic/drivers/modules/redfish/management.py
parentefe5a2cf54ac269f9cd90f02088e5485e90630ff (diff)
downloadironic-7f9badb5437631fdea0f31b85aee3373f7bbb985.tar.gz
Add and document high-level helpers for async steps
The pattern we use right now is too verbose to even put in documentation. This change adds two more helpers: * deploy_utils.prepare_agent_boot replaces the omnipresent 2-line snippet around task.boot.prepare_ramdisk. * deploy_utils.reboot_to_finish_step adds rebooting to it. Change-Id: I88540268d3bacebda775a0e94015c29a82c2c6a0
Diffstat (limited to 'ironic/drivers/modules/redfish/management.py')
-rw-r--r--ironic/drivers/modules/redfish/management.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/ironic/drivers/modules/redfish/management.py b/ironic/drivers/modules/redfish/management.py
index 5e572f84a..9a68d9975 100644
--- a/ironic/drivers/modules/redfish/management.py
+++ b/ironic/drivers/modules/redfish/management.py
@@ -760,11 +760,7 @@ class RedfishManagement(base.ManagementInterface):
skip_current_step=True,
polling=True)
- deploy_opts = deploy_utils.build_agent_options(task.node)
- task.driver.boot.prepare_ramdisk(task, deploy_opts)
- manager_utils.node_power_action(task, states.REBOOT)
-
- return deploy_utils.get_async_step_return_state(task.node)
+ return deploy_utils.reboot_to_finish_step(task)
def _apply_firmware_update(self, node, update_service, firmware_updates):
"""Applies the next firmware update to the node