Do not set deploy_ramdisk and deploy_kernel as flavor keys

Setting deploy_ramdisk and deploy_kernel as flavor extra_specs is
deprecated from more than a cycle and not supported anymore. The deploy
kernel and ramdisk name are instead passed to register_nodes so that
they are set on the node itself in Ironic.

Co-authored-By: James Slagle <jslagle@redhat.com>
Co-authored-By: Derek Higgins <derekh@redhat.com>

Change-Id: I494e3579c3daad7bf13a8127cf83cc61f82f913a
Related-To: I0727126770e6c79c898560a34e91a10686696d82
Related-Bug: 1453076
Depends-On: Ie38d3186b45fe00e0577f4b0f8b6a971edb9827d
This commit is contained in:
Giulio Fidente 2015-05-08 12:35:47 +02:00 committed by Derek Higgins
parent 8360ad1f88
commit 026c854dcc
1 changed files with 10 additions and 10 deletions

View File

@ -69,9 +69,6 @@ if [ -z "$JSON_PATH" ]; then
exit 1
fi
NODES=$(cat $JSON_PATH)
register-nodes -s $SERVICE_HOST -n <(echo $NODES)
if [ $USE_IRONIC -eq 0 ]; then
deploy_base=deploy-ramdisk
else
@ -80,10 +77,15 @@ fi
deploy_kernel=$TRIPLEO_ROOT/$deploy_base.kernel
deploy_ramdisk=$TRIPLEO_ROOT/$deploy_base.initramfs
deploy_kernel_id=$(glance image-create --name bm-deploy-kernel --is-public True \
--disk-format aki < "$deploy_kernel" | awk ' / id / {print $4}')
deploy_ramdisk_id=$(glance image-create --name bm-deploy-ramdisk --is-public True \
--disk-format ari < "$deploy_ramdisk" | awk ' / id / {print $4}')
if ! glance image-show bm-deploy-kernel > /dev/null ; then
deploy_kernel_id=$(glance image-create --name bm-deploy-kernel --is-public True \
--disk-format aki < "$deploy_kernel" | awk ' / id / {print $4}')
deploy_ramdisk_id=$(glance image-create --name bm-deploy-ramdisk --is-public True \
--disk-format ari < "$deploy_ramdisk" | awk ' / id / {print $4}')
fi
NODES=$(cat $JSON_PATH)
register-nodes -s $SERVICE_HOST -n <(echo $NODES) -k bm-deploy-kernel -d bm-deploy-ramdisk
function cleanup_flavor {
local FLAVOR_NAME=${1:?"cleanup_flavor requires a flavor name"}
@ -116,6 +118,4 @@ fi
nova flavor-create baremetal \
--ephemeral $EPHEMERAL_DISK auto $MEM $ROOT_DISK $CPU
nova flavor-key baremetal set "cpu_arch"="$ARCH" \
"baremetal:deploy_kernel_id"="$deploy_kernel_id" \
"baremetal:deploy_ramdisk_id"="$deploy_ramdisk_id"
nova flavor-key baremetal set "cpu_arch"="$ARCH"