From 511c65ab74d06733ceabaed7ac45cbfcd144ea46 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Wed, 9 Jul 2014 14:41:33 -0400 Subject: glance test config use latest cirros image cirros image installed at /root/images/ can be upgraded to different version. Instead of hardcoding cirros image name, let find cirros image at runtime as glance test config is not bounded to a specific cirros image. Signed-off-by: Vu Tran --- .../recipes-devtools/python/python-glance/glance-test-config.init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meta-openstack-controller-test-config/recipes-devtools') diff --git a/meta-openstack-controller-test-config/recipes-devtools/python/python-glance/glance-test-config.init b/meta-openstack-controller-test-config/recipes-devtools/python/python-glance/glance-test-config.init index 2186421..29c62fc 100644 --- a/meta-openstack-controller-test-config/recipes-devtools/python/python-glance/glance-test-config.init +++ b/meta-openstack-controller-test-config/recipes-devtools/python/python-glance/glance-test-config.init @@ -39,7 +39,8 @@ start() id=`sed -n '4p' < $temp_file | get_field 1` glance image-show $id > /dev/null 2>&1 if [ "$?" != "0" ]; then - id=`glance image-create --name myfirstimage --is-public true --container-format bare --disk-format qcow2 --file /root/images/cirros-0.3.0-x86_64-disk.img | grep " id " | get_field 2` + cirros_image_file=`find /root/images/ -name "cirros*.img" | tail -1` + id=`glance image-create --name myfirstimage --is-public true --container-format bare --disk-format qcow2 --file ${cirros_image_file} | grep " id " | get_field 2` fi sed -i "s/^image_ref = .*/image_ref = ${id}/" $TEMPEST_CONF_FILE sed -i "s/^image_ref_alt = .*/image_ref_alt = ${id}/" $TEMPEST_CONF_FILE -- cgit v1.2.3-54-g00ecf