diff options
author | Imre Farkas <ifarkas@redhat.com> | 2015-03-10 16:59:54 +0100 |
---|---|---|
committer | Imre Farkas <ifarkas@redhat.com> | 2015-10-21 15:22:21 +0200 |
commit | 4755e2adf3f15ef5875ee3933a85d0de6125ccb5 (patch) | |
tree | 038a1cde920e0ed94f138325dee231da8e6b0238 /ironic/drivers/modules/drac/bios.py | |
parent | dc3b45147620108054ea1026e905808adb21c446 (diff) | |
download | ironic-4755e2adf3f15ef5875ee3933a85d0de6125ccb5.tar.gz |
DRAC BIOS vendor_passthru: enable rebooting the node
Changing the BIOS settings require rebooting the node. If the node was
originally powered off, the driver would need to turn it on, poll the
job status on the DRAC card and power off the node. To keep things
simple, the BIOS mgmt vendor_passthru methods avoided doing that.
However, it would be beneficial for the user to let them decide whether
they want to reboot the node automatically after the config job
succeeds. DRAC cards already support this, so the driver doesn't need to
supervise the config job status. With this patch the DRAC vendor
passthru for commit_bios_config accepts a 'reboot' parameter.
Closes-bug: #1508459
Change-Id: Id9a87f6dec6a8d6160948e39a763134729cead99
Diffstat (limited to 'ironic/drivers/modules/drac/bios.py')
-rw-r--r-- | ironic/drivers/modules/drac/bios.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ironic/drivers/modules/drac/bios.py b/ironic/drivers/modules/drac/bios.py index a74f01e99..907699055 100644 --- a/ironic/drivers/modules/drac/bios.py +++ b/ironic/drivers/modules/drac/bios.py @@ -388,10 +388,12 @@ def set_config(task, **kwargs): @task_manager.require_exclusive_lock -def commit_config(task): +def commit_config(task, reboot=False): """Commits pending changes added by set_config :param task: is the ironic task for running the config job. + :param reboot: indicates whether a reboot job should be automatically + created with the config job. :raises: DracClientError on an error from pywsman library. :raises: DracPendingConfigJobExists if the job is already created. :raises: DracOperationFailed if the client received response with an @@ -402,7 +404,7 @@ def commit_config(task): """ node = task.node management.check_for_config_job(node) - management.create_config_job(node) + management.create_config_job(node, reboot) @task_manager.require_exclusive_lock |