def test__attach_boot_iso(self, setup_vmedia_mock, set_boot_device_mock, power_ilo_client_mock, common_ilo_client_mock): with task_manager.acquire(self.context, self.node.uuid, shared=True) as task: task.node.instance_info['ilo_boot_iso'] = 'boot-iso' ilo_power._attach_boot_iso(task) setup_vmedia_mock.assert_called_once_with(task, 'boot-iso') set_boot_device_mock.assert_called_once_with(task.node, 'CDROM')
def test__attach_boot_iso_on_rebuild(self, setup_vmedia_mock, set_boot_device_mock, get_ilo_object_mock): with task_manager.acquire(self.context, self.node.uuid, shared=True) as task: task.node.provision_state = states.DEPLOYING task.node.instance_info['ilo_boot_iso'] = 'boot-iso' ilo_power._attach_boot_iso(task) self.assertFalse(setup_vmedia_mock.called) self.assertFalse(set_boot_device_mock.called)
def test__attach_boot_iso(self, setup_vmedia_mock, set_boot_device_mock, get_ilo_object_mock): with task_manager.acquire(self.context, self.node.uuid, shared=True) as task: task.node.provision_state = states.ACTIVE task.node.instance_info['ilo_boot_iso'] = 'boot-iso' ilo_power._attach_boot_iso(task) setup_vmedia_mock.assert_called_once_with(task, 'boot-iso') set_boot_device_mock.assert_called_once_with(task, boot_devices.CDROM)
def test__attach_boot_iso(self, setup_vmedia_mock, set_boot_device_mock, get_ilo_object_mock): with task_manager.acquire(self.context, self.node.uuid, shared=True) as task: task.node.provision_state = states.ACTIVE task.node.instance_info['ilo_boot_iso'] = 'boot-iso' ilo_power._attach_boot_iso(task) setup_vmedia_mock.assert_called_once_with(task, 'boot-iso') set_boot_device_mock.assert_called_once_with( task, boot_devices.CDROM)