예제 #1
0
 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")
예제 #2
0
 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')
예제 #3
0
    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)
예제 #4
0
파일: deploy.py 프로젝트: jriguera/ironic
    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)