From 75eaaf43c7c0798c4d92726e448d4c0e9372ccf2 Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Fri, 28 Dec 2012 15:40:21 -0800 Subject: [PATCH] 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 --- lib/baremetal | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/baremetal b/lib/baremetal index 62605fb88a..112fd6d9ba 100644 --- a/lib/baremetal +++ b/lib/baremetal @@ -211,9 +211,7 @@ function configure_baremetal_nova_dirs() { # ensure dnsmasq is installed but not running # because baremetal driver will reconfigure and restart this as needed - if [ ! is_package_installed dnsmasq ]; then - install_package dnsmasq - fi + is_package_installed dnsmasq || install_package dnsmasq stop_service dnsmasq } @@ -256,12 +254,10 @@ function create_baremetal_flavor() { ari=$2 nova flavor-create $BM_FLAVOR_NAME $BM_FLAVOR_ID \ $BM_FLAVOR_RAM $BM_FLAVOR_ROOT_DISK $BM_FLAVOR_CPU - nova-manage instance_type set_key \ - --name=$BM_FLAVOR_NAME --key cpu_arch --value $BM_FLAVOR_ARCH - nova-manage instance_type set_key \ - --name=$BM_FLAVOR_NAME --key deploy_kernel_id --value $aki - nova-manage instance_type set_key \ - --name=$BM_FLAVOR_NAME --key deploy_ramdisk_id --value $ari + nova flavor-key $BM_FLAVOR_NAME set \ + cpu_arch=$BM_FLAVOR_ARCH \ + deploy_kernel_id=$aki \ + deploy_ramdisk_id=$ari } # pull run-time kernel/ramdisk out of disk image and load into glance