From 13bdf8b0ca119bbd79981225a8e3b38940d0c0ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Harald=20Jens=C3=A5s?= <hjensas@redhat.com>
Date: Fri, 8 Mar 2019 18:02:08 +0100
Subject: [PATCH] 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
---
 ironic/common/pxe_utils.py     | 2 +-
 ironic/drivers/modules/ipxe.py | 9 +++++----
 ironic/drivers/modules/pxe.py  | 9 +++++----
 3 files changed, 11 insertions(+), 9 deletions(-)

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: