From 3a9e8cfb40b1be2804a38c375110040ccaf2da8b Mon Sep 17 00:00:00 2001 From: trilliams Date: Mon, 13 Mar 2017 19:00:22 -0500 Subject: [PATCH] Glance v1 is deprecated and removed in devstack [1] With this patch we will use glance v2 api's for interacting with glance. [1] I7f962a07317cdad917ee896d79e49ee18938d074 Closes-Bug: 1672535 Change-Id: Iedc25b55ad2751e14d3794b1cb80f724f1a735c4 --- devstack/lib/magnum | 2 +- magnum/tests/contrib/post_test_hook.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/devstack/lib/magnum b/devstack/lib/magnum index 6410e07a7d..9a96e95508 100644 --- a/devstack/lib/magnum +++ b/devstack/lib/magnum @@ -280,7 +280,7 @@ function magnum_register_image { echo "Unknown image extension in $image_filename, supported extensions: tgz, img, qcow2, iso, vhd, vhdx, tar.gz, img.gz, img.bz2, vhd.gz, vhdx.gz"; false fi - openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT --os-image-api-version 1 image set $image_name $magnum_image_property + openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT --os-image-api-version 2 image set $image_name $magnum_image_property } # install_magnumclient() - Collect source and prepare diff --git a/magnum/tests/contrib/post_test_hook.sh b/magnum/tests/contrib/post_test_hook.sh index 3a713e76ca..ff97b9ca6f 100755 --- a/magnum/tests/contrib/post_test_hook.sh +++ b/magnum/tests/contrib/post_test_hook.sh @@ -61,9 +61,7 @@ function create_test_data { # image. Specifically, when we provide kernel and ramdisk images # we need to select the 'ami' image. Otherwise, when we have # qcow2 images, the format is 'bare'. - # NOTE(prameswar): openstack cli not giving container format in - # command 'openstack image list' once it start supporting we have to add. - export IMAGE_ID=$(glance --os-image-api-version 1 image-list | grep $container_format | grep -i $image_name | awk '{print $2}') + export IMAGE_ID=$(openstack image list --property container_format=$container_format | grep -i $image_name | awk '{print $2}') #Get magnum_url local magnum_api_ip=$(iniget /etc/magnum/magnum.conf api host)