Minor fixes for lib/baremetal

A recent patch moved the flavor management out of nova-manage
and into python-novaclient. This corrects the behaviour of lib/baremetal
so that it calls "nova flavor-key" instead of "nova-manage". This also
fixes a logical error in testing whether dnsmasq is installed.

Change-Id: I3fa821c22ae45a49e283d091b6e5ed51c9757e88
This commit is contained in:
Devananda van der Veen 2012-12-28 15:40:21 -08:00
parent 5ba0360b32
commit 75eaaf43c7

View File

@ -211,9 +211,7 @@ function configure_baremetal_nova_dirs() {
# ensure dnsmasq is installed but not running # ensure dnsmasq is installed but not running
# because baremetal driver will reconfigure and restart this as needed # because baremetal driver will reconfigure and restart this as needed
if [ ! is_package_installed dnsmasq ]; then is_package_installed dnsmasq || install_package dnsmasq
install_package dnsmasq
fi
stop_service dnsmasq stop_service dnsmasq
} }
@ -256,12 +254,10 @@ function create_baremetal_flavor() {
ari=$2 ari=$2
nova flavor-create $BM_FLAVOR_NAME $BM_FLAVOR_ID \ nova flavor-create $BM_FLAVOR_NAME $BM_FLAVOR_ID \
$BM_FLAVOR_RAM $BM_FLAVOR_ROOT_DISK $BM_FLAVOR_CPU $BM_FLAVOR_RAM $BM_FLAVOR_ROOT_DISK $BM_FLAVOR_CPU
nova-manage instance_type set_key \ nova flavor-key $BM_FLAVOR_NAME set \
--name=$BM_FLAVOR_NAME --key cpu_arch --value $BM_FLAVOR_ARCH cpu_arch=$BM_FLAVOR_ARCH \
nova-manage instance_type set_key \ deploy_kernel_id=$aki \
--name=$BM_FLAVOR_NAME --key deploy_kernel_id --value $aki deploy_ramdisk_id=$ari
nova-manage instance_type set_key \
--name=$BM_FLAVOR_NAME --key deploy_ramdisk_id --value $ari
} }
# pull run-time kernel/ramdisk out of disk image and load into glance # pull run-time kernel/ramdisk out of disk image and load into glance