diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py index 3ac328e615..e96b185b24 100644 --- a/ironic/common/pxe_utils.py +++ b/ironic/common/pxe_utils.py @@ -422,7 +422,7 @@ def dhcp_options_for_instance(task, ipxe_enabled=False, url_boot=False): """Retrieves the DHCP PXE boot options. :param task: A TaskManager instance. - :param ipxe_enabled: Default false boolean that siganls if iPXE + :param ipxe_enabled: Default false boolean that signals if iPXE formatting should be returned by the method for DHCP server configuration. :param url_boot: Default false boolean to inform the method if diff --git a/ironic/drivers/modules/ipxe.py b/ironic/drivers/modules/ipxe.py index 0a334779a2..0495e87369 100644 --- a/ironic/drivers/modules/ipxe.py +++ b/ironic/drivers/modules/ipxe.py @@ -120,10 +120,6 @@ class iPXEBoot(pxe_base.PXEBaseMixin, base.BootInterface): :param ramdisk_params: the parameters to be passed to the ramdisk. pxe driver passes these parameters as kernel command-line arguments. - :param mode: Label indicating a deploy or rescue operation - being carried out on the node. Supported values are - 'deploy' and 'rescue'. Defaults to 'deploy', indicating - deploy operation is being carried out. :returns: None :raises: MissingParameterValue, if some information is missing in node's driver_info or instance_info. @@ -133,6 +129,11 @@ class iPXEBoot(pxe_base.PXEBaseMixin, base.BootInterface): operation failed on the node. """ node = task.node + + # Label indicating a deploy or rescue operation being carried out on + # the node, 'deploy' or 'rescue'. Unless the node is in a rescue like + # state, the mode is set to 'deploy', indicating deploy operation is + # being carried out. mode = deploy_utils.rescue_or_deploy_mode(node) # NOTE(mjturek): At this point, the ipxe boot script should diff --git a/ironic/drivers/modules/pxe.py b/ironic/drivers/modules/pxe.py index c33dd23927..1b1ed746bd 100644 --- a/ironic/drivers/modules/pxe.py +++ b/ironic/drivers/modules/pxe.py @@ -127,10 +127,6 @@ class PXEBoot(pxe_base.PXEBaseMixin, base.BootInterface): :param ramdisk_params: the parameters to be passed to the ramdisk. pxe driver passes these parameters as kernel command-line arguments. - :param mode: Label indicating a deploy or rescue operation - being carried out on the node. Supported values are - 'deploy' and 'rescue'. Defaults to 'deploy', indicating - deploy operation is being carried out. :returns: None :raises: MissingParameterValue, if some information is missing in node's driver_info or instance_info. @@ -140,6 +136,11 @@ class PXEBoot(pxe_base.PXEBaseMixin, base.BootInterface): operation failed on the node. """ node = task.node + + # Label indicating a deploy or rescue operation being carried out on + # the node, 'deploy' or 'rescue'. Unless the node is in a rescue like + # state, the mode is set to 'deploy', indicating deploy operation is + # being carried out. mode = deploy_utils.rescue_or_deploy_mode(node) ipxe_enabled = CONF.pxe.ipxe_enabled if ipxe_enabled: