Fix typo and docstring in pxe/ipxe

The docstring contains parameter mode which is not
present. Move the param description to a comment
in code where mode is resolved.

Also fixes a typo in pxe_utils.py docstring.

Change-Id: Ic0a31612023a4985178dbb6e3078dff53f0aba0a
This commit is contained in:
Harald Jensås 2019-03-08 18:02:08 +01:00
parent 77ee49f21c
commit 13bdf8b0ca
3 changed files with 11 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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: