Merge "Follow-up patch of 7f12be1b14e371e269464883cb7dbcb75910e16f"

This commit is contained in:
Jenkins 2017-04-21 07:42:16 +00:00 committed by Gerrit Code Review
commit f63c5b8463
2 changed files with 10 additions and 6 deletions

View File

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

View File

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