From 485a3315d77d8ee8cb29a8b5d787ba248c969c10 Mon Sep 17 00:00:00 2001 From: Shivanand Tendulker Date: Sun, 16 Apr 2017 00:12:41 -0400 Subject: [PATCH] Follow-up patch of 7f12be1b14e371e269464883cb7dbcb75910e16f This commit addresses outstanding minor comments of the review 7f12be1b14e371e269464883cb7dbcb75910e16f. Change-Id: I6c3511dd9366daf12ab578f60cc6f106a4aa43c4 --- ironic/drivers/pxe.py | 6 ++++-- ironic/tests/unit/drivers/modules/ilo/test_boot.py | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ironic/drivers/pxe.py b/ironic/drivers/pxe.py index 64db66a481..596de3ffd2 100644 --- a/ironic/drivers/pxe.py +++ b/ironic/drivers/pxe.py @@ -82,8 +82,10 @@ class PXEAndIloDriver(base.BaseDriver): This driver implements the `core` functionality using :class:`ironic.drivers.modules.ilo.power.IloPower` for power management - :class:`ironic.drivers.modules.ilo.deploy.IloPXEDeploy` for image - deployment. + :class:`ironic.drivers.modules.iscsi_deploy.ISCSIDeploy` for + image deployment. + :class:`ironic.drivers.modules.ilo.boot.IloPXEBoot` for boot + related actions. """ def __init__(self): if not importutils.try_import('proliantutils'): diff --git a/ironic/tests/unit/drivers/modules/ilo/test_boot.py b/ironic/tests/unit/drivers/modules/ilo/test_boot.py index 4cf54c538f..04592fa0ee 100644 --- a/ironic/tests/unit/drivers/modules/ilo/test_boot.py +++ b/ironic/tests/unit/drivers/modules/ilo/test_boot.py @@ -946,7 +946,7 @@ class IloPXEBootTestCase(db_base.DbTestCase): @mock.patch.object(pxe.PXEBoot, 'prepare_ramdisk', spec_set=True, autospec=True) def test_prepare_ramdisk_not_deploying_not_cleaning( - self, pxe_boot_mock, prepare_node_mock): + self, pxe_prepare_instance_mock, prepare_node_mock): self.node.provision_state = states.CLEANING self.node.save() with task_manager.acquire(self.context, self.node.uuid, @@ -955,13 +955,14 @@ class IloPXEBootTestCase(db_base.DbTestCase): task.driver.boot.prepare_ramdisk(task, None)) self.assertFalse(prepare_node_mock.called) - pxe_boot_mock.assert_called_once_with(mock.ANY, task, None) + pxe_prepare_instance_mock.assert_called_once_with(mock.ANY, + task, None) @mock.patch.object(ilo_boot, 'prepare_node_for_deploy', spec_set=True, autospec=True) @mock.patch.object(pxe.PXEBoot, 'prepare_ramdisk', spec_set=True, autospec=True) - def test_prepare_ramdisk_in_deploying(self, pxe_boot_mock, + def test_prepare_ramdisk_in_deploying(self, pxe_prepare_instance_mock, prepare_node_mock): self.node.provision_state = states.DEPLOYING self.node.save() @@ -971,7 +972,8 @@ class IloPXEBootTestCase(db_base.DbTestCase): task.driver.boot.prepare_ramdisk(task, None)) prepare_node_mock.assert_called_once_with(task) - pxe_boot_mock.assert_called_once_with(mock.ANY, task, None) + pxe_prepare_instance_mock.assert_called_once_with(mock.ANY, + task, None) @mock.patch.object(ilo_common, 'update_secure_boot_mode', spec_set=True, autospec=True)