summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVu Tran <vu.tran@windriver.com>2014-07-09 14:41:33 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-07-17 00:14:04 -0400
commit27813690a6dbe7e50b68635077196f461b3a1914 (patch)
tree4d6980ece9130a21b01125f430bb7016787d0de3
parent3651c6289525a664c7b93d5945fe94f9283aa545 (diff)
downloadmeta-cloud-services-27813690a6dbe7e50b68635077196f461b3a1914.tar.gz
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 <vu.tran@windriver.com>
-rw-r--r--meta-openstack-controller-test-config/recipes-devtools/python/python-glance/glance-test-config.init3
1 files changed, 2 insertions, 1 deletions
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()
39 id=`sed -n '4p' < $temp_file | get_field 1` 39 id=`sed -n '4p' < $temp_file | get_field 1`
40 glance image-show $id > /dev/null 2>&1 40 glance image-show $id > /dev/null 2>&1
41 if [ "$?" != "0" ]; then 41 if [ "$?" != "0" ]; then
42 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` 42 cirros_image_file=`find /root/images/ -name "cirros*.img" | tail -1`
43 id=`glance image-create --name myfirstimage --is-public true --container-format bare --disk-format qcow2 --file ${cirros_image_file} | grep " id " | get_field 2`
43 fi 44 fi
44 sed -i "s/^image_ref = .*/image_ref = ${id}/" $TEMPEST_CONF_FILE 45 sed -i "s/^image_ref = .*/image_ref = ${id}/" $TEMPEST_CONF_FILE
45 sed -i "s/^image_ref_alt = .*/image_ref_alt = ${id}/" $TEMPEST_CONF_FILE 46 sed -i "s/^image_ref_alt = .*/image_ref_alt = ${id}/" $TEMPEST_CONF_FILE