Merge "Bypassing upload deploy ramdisk/kernel to glance when deploy iso is given"

This commit is contained in:
Jenkins 2017-04-06 23:05:51 +00:00 committed by Gerrit Code Review
commit 1fcb6c52a2
1 changed files with 16 additions and 15 deletions

View File

@ -1897,23 +1897,24 @@ function upload_baremetal_ironic_deploy {
fi fi
# load them into glance # load them into glance
IRONIC_DEPLOY_KERNEL_ID=$(openstack \ if ! is_deploy_iso_required; then
image create \ IRONIC_DEPLOY_KERNEL_ID=$(openstack \
$ironic_deploy_kernel_name \ image create \
--public --disk-format=aki \ $ironic_deploy_kernel_name \
--container-format=aki \ --public --disk-format=aki \
< $IRONIC_DEPLOY_KERNEL | grep ' id ' | get_field 2) --container-format=aki \
die_if_not_set $LINENO IRONIC_DEPLOY_KERNEL_ID "Failed to load kernel image into glance" < $IRONIC_DEPLOY_KERNEL | grep ' id ' | get_field 2)
die_if_not_set $LINENO IRONIC_DEPLOY_KERNEL_ID "Failed to load kernel image into glance"
IRONIC_DEPLOY_RAMDISK_ID=$(openstack \ IRONIC_DEPLOY_RAMDISK_ID=$(openstack \
image create \ image create \
$ironic_deploy_ramdisk_name \ $ironic_deploy_ramdisk_name \
--public --disk-format=ari \ --public --disk-format=ari \
--container-format=ari \ --container-format=ari \
< $IRONIC_DEPLOY_RAMDISK | grep ' id ' | get_field 2) < $IRONIC_DEPLOY_RAMDISK | grep ' id ' | get_field 2)
die_if_not_set $LINENO IRONIC_DEPLOY_RAMDISK_ID "Failed to load ramdisk image into glance" die_if_not_set $LINENO IRONIC_DEPLOY_RAMDISK_ID "Failed to load ramdisk image into glance"
if is_deploy_iso_required; then else
IRONIC_DEPLOY_ISO_ID=$(openstack \ IRONIC_DEPLOY_ISO_ID=$(openstack \
image create \ image create \
$(basename $IRONIC_DEPLOY_ISO) \ $(basename $IRONIC_DEPLOY_ISO) \