def test_destroy_floppy_image_from_web_server(self, get_floppy_name_mock, utils_mock): get_floppy_name_mock.return_value = "image-uuid" CONF.deploy.http_root = "/webserver/" with task_manager.acquire(self.context, self.node.uuid, shared=False) as task: ilo_common.destroy_floppy_image_from_web_server(task.node) get_floppy_name_mock.assert_called_once_with(task.node) utils_mock.assert_called_once_with("/webserver/image-uuid")
def test_destroy_floppy_image_from_web_server(self, get_floppy_name_mock, utils_mock): get_floppy_name_mock.return_value = 'image-uuid' CONF.deploy.http_root = "/webserver/" with task_manager.acquire(self.context, self.node.uuid, shared=False) as task: ilo_common.destroy_floppy_image_from_web_server(task.node) get_floppy_name_mock.assert_called_once_with(task.node) utils_mock.assert_called_once_with('/webserver/image-uuid')
def clean_up(self, task): """Clean up the deployment environment for the task's node. Unlinks instance image and triggers image cache cleanup. :param task: a TaskManager instance containing the node to act on. """ _clean_up_boot_iso_for_instance(task.node) if not CONF.ilo.use_web_server_for_images: iscsi_deploy.destroy_images(task.node.uuid) else: ilo_common.destroy_floppy_image_from_web_server(task.node)
def clean_up(self, task): """Clean up the deployment environment for the task's node. Unlinks instance image and triggers image cache cleanup. :param task: a TaskManager instance containing the node to act on. """ _clean_up_boot_iso_for_instance(task.node) if not CONF.ilo.use_web_server_for_images: iscsi_deploy.destroy_images(task.node.uuid) else: ilo_common.destroy_floppy_image_from_web_server(task.node)