summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ironic/drivers/modules/ilo/deploy.py6
-rw-r--r--ironic/tests/drivers/ilo/test_common.py1
-rw-r--r--ironic/tests/drivers/ilo/test_deploy.py15
3 files changed, 21 insertions, 1 deletions
diff --git a/ironic/drivers/modules/ilo/deploy.py b/ironic/drivers/modules/ilo/deploy.py
index 388ca6e07..788dff201 100644
--- a/ironic/drivers/modules/ilo/deploy.py
+++ b/ironic/drivers/modules/ilo/deploy.py
@@ -731,6 +731,12 @@ class IloVirtualMediaAgentVendorInterface(agent.AgentVendorInterface):
super(IloVirtualMediaAgentVendorInterface,
self).reboot_to_instance(task, **kwargs)
+ @task_manager.require_exclusive_lock
+ def continue_deploy(self, task, **kwargs):
+ ilo_common.cleanup_vmedia_boot(task)
+ super(IloVirtualMediaAgentVendorInterface,
+ self).continue_deploy(task, **kwargs)
+
class IloPXEDeploy(iscsi_deploy.ISCSIDeploy):
diff --git a/ironic/tests/drivers/ilo/test_common.py b/ironic/tests/drivers/ilo/test_common.py
index 5040a377d..a9a85e4e4 100644
--- a/ironic/tests/drivers/ilo/test_common.py
+++ b/ironic/tests/drivers/ilo/test_common.py
@@ -504,7 +504,6 @@ class IloCommonMethodsTestCase(db_base.DbTestCase):
with task_manager.acquire(self.context, self.node.uuid,
shared=False) as task:
ilo_common.eject_vmedia_devices(task)
-
ilo_object_mock.eject_virtual_media.assert_has_calls(
[mock.call('FLOPPY'), mock.call('CDROM')])
diff --git a/ironic/tests/drivers/ilo/test_deploy.py b/ironic/tests/drivers/ilo/test_deploy.py
index df886cd09..5f761a98e 100644
--- a/ironic/tests/drivers/ilo/test_deploy.py
+++ b/ironic/tests/drivers/ilo/test_deploy.py
@@ -1858,3 +1858,18 @@ class IloVirtualMediaAgentVendorInterfaceTestCase(db_base.DbTestCase):
self.assertFalse(func_update_secure_boot_mode.called)
agent_reboot_to_instance_mock.assert_called_once_with(
mock.ANY, task, **kwargs)
+
+ @mock.patch.object(ilo_common, 'cleanup_vmedia_boot',
+ spec_set=True, autospec=True)
+ @mock.patch.object(agent.AgentVendorInterface, 'continue_deploy',
+ spec_set=True, autospec=True)
+ def test_continue_deploy(self, agent_continue_deploy_mock,
+ cleanup_mock):
+ CONF.ilo.use_web_server_for_images = True
+ kwargs = {'address': '123456'}
+ with task_manager.acquire(self.context, self.node.uuid,
+ shared=False) as task:
+ task.driver.vendor.continue_deploy(task, **kwargs)
+ cleanup_mock.assert_called_once_with(task)
+ agent_continue_deploy_mock.assert_called_once_with(
+ mock.ANY, task, **kwargs)