Merge "Fix not exist deploy image within irmc-virtual-media booting"
This commit is contained in:
commit
d5f9fc8579
@ -287,9 +287,7 @@ def _prepare_boot_iso(task, root_uuid):
|
||||
ramdisk_href = (task.node.instance_info.get('ramdisk')
|
||||
or image_properties['ramdisk_id'])
|
||||
|
||||
deploy_iso_filename = _get_iso_name(task.node, label='deploy')
|
||||
deploy_iso = ('file://' + os.path.join(
|
||||
CONF.irmc.remote_image_share_root, deploy_iso_filename))
|
||||
deploy_iso_href = deploy_info['irmc_deploy_iso']
|
||||
boot_mode = boot_mode_utils.get_boot_mode_for_deploy(task.node)
|
||||
kernel_params = CONF.pxe.pxe_append_params
|
||||
|
||||
@ -299,7 +297,7 @@ def _prepare_boot_iso(task, root_uuid):
|
||||
|
||||
images.create_boot_iso(task.context, boot_iso_fullpathname,
|
||||
kernel_href, ramdisk_href,
|
||||
deploy_iso, root_uuid,
|
||||
deploy_iso_href, root_uuid,
|
||||
kernel_params, boot_mode)
|
||||
|
||||
driver_internal_info['irmc_boot_iso'] = boot_iso_filename
|
||||
|
@ -476,11 +476,12 @@ class IRMCDeployPrivateMethodsTestCase(test_common.BaseIRMCTest):
|
||||
create_boot_iso_mock):
|
||||
CONF.pxe.pxe_append_params = 'kernel-params'
|
||||
|
||||
deploy_info_mock.return_value = {'image_source': 'image-uuid'}
|
||||
deploy_info_mock.return_value = \
|
||||
{'image_source': 'image-uuid',
|
||||
'irmc_deploy_iso': '02f9d414-2ce0-4cf5-b48f-dbc1bf678f55'}
|
||||
image_props_mock.return_value = {'kernel_id': 'kernel_uuid',
|
||||
'ramdisk_id': 'ramdisk_uuid'}
|
||||
|
||||
CONF.irmc.remote_image_share_name = '/remote_image_share_root'
|
||||
boot_mode_mock.return_value = 'uefi'
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -496,8 +497,7 @@ class IRMCDeployPrivateMethodsTestCase(test_common.BaseIRMCTest):
|
||||
'/remote_image_share_root/'
|
||||
"boot-%s.iso" % self.node.uuid,
|
||||
'kernel_uuid', 'ramdisk_uuid',
|
||||
'file:///remote_image_share_root/'
|
||||
"deploy-%s.iso" % self.node.uuid,
|
||||
'02f9d414-2ce0-4cf5-b48f-dbc1bf678f55',
|
||||
'root-uuid', 'kernel-params', 'uefi')
|
||||
task.node.refresh()
|
||||
self.assertEqual("boot-%s.iso" % self.node.uuid,
|
||||
@ -524,7 +524,6 @@ class IRMCDeployPrivateMethodsTestCase(test_common.BaseIRMCTest):
|
||||
tempfile_mock.side_effect = [mock_image_file_handle]
|
||||
|
||||
deploy_args = {'arg1': 'val1', 'arg2': 'val2'}
|
||||
CONF.irmc.remote_image_share_name = '/remote_image_share_root'
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=False) as task:
|
||||
@ -552,7 +551,6 @@ class IRMCDeployPrivateMethodsTestCase(test_common.BaseIRMCTest):
|
||||
tempfile_mock.side_effect = [mock_image_file_handle]
|
||||
|
||||
deploy_args = {'arg1': 'val1', 'arg2': 'val2'}
|
||||
CONF.irmc.remote_image_share_name = '/remote_image_share_root'
|
||||
copyfile_mock.side_effect = IOError("fake error")
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user