Clean up the code for fetching image id

Change-Id: I63eb86b3fb39749a839040a25689ecf979537b64
This commit is contained in:
Jiří Suchomel 2019-06-10 10:04:17 +02:00
parent 4ec3d501b3
commit 1e8ceb15b7

View File

@ -42,11 +42,9 @@ openstack stack create --wait \
-t ./tools/gate/files/heat-subnet-pool-deployment.yaml \
heat-subnet-pool-deployment
IMAGE_NAME=$(openstack image show -f value -c name \
$(openstack image list -f csv | awk -F ',' '{ print $2 "," $1 }' | \
grep "^\"Cirros" | head -1 | awk -F ',' '{ print $2 }' | tr -d '"'))
FLAVOR_ID=$(openstack flavor show m1.tiny -f value -c id)
IMAGE_ID=$(openstack image show "${IMAGE_NAME}" -f value -c id)
IMAGE_ID=$(openstack image list -f value -c Name -c ID | \
grep " Cirros " | head -1 | cut -f 1 -d ' ')
NETWORK_ID=$(openstack network show public -f value -c id)
if [ "x$(systemd-detect-virt)" == "xnone" ]; then