Merge "Allow import to specify image location ipxe=false" into stable/train

This commit is contained in:
Zuul 2020-02-26 05:57:57 +00:00 committed by Gerrit Code Review
commit 27ace2c548
1 changed files with 3 additions and 6 deletions

View File

@ -1574,8 +1574,7 @@ def update_nodes_deploy_data(nodes,
"""Add specific kernel and ramdisk IDs to a node.
Look at all images and update node data with the most specific
deploy_kernel and deploy_ramdisk for the architecture/platform comination
platform.
deploy_kernel and deploy_ramdisk for the architecture/platform combination.
"""
for node in nodes:
@ -1587,10 +1586,8 @@ def update_nodes_deploy_data(nodes,
for kernel in kernel_locations:
path = os.path.join(http_boot, kernel)
if os.path.exists(path):
# NOTE(dtantsur): we don't use http_boot here since we
# assume that the path in containers is fixed
node['kernel_id'] = 'file://%s/%s' % (
constants.IRONIC_HTTP_BOOT_BIND_MOUNT,
http_boot,
kernel)
break
else:
@ -1606,7 +1603,7 @@ def update_nodes_deploy_data(nodes,
path = os.path.join(http_boot, ramdisk)
if os.path.exists(path):
node['ramdisk_id'] = 'file://%s/%s' % (
constants.IRONIC_HTTP_BOOT_BIND_MOUNT,
http_boot,
ramdisk)
break
else: