From 22ff1b57557312861f1947a9fdf5399358633bd1 Mon Sep 17 00:00:00 2001 From: blsaws Date: Thu, 15 Sep 2016 17:53:37 +0000 Subject: Add metadata to cirros1 JIRA: COPPER-4 Change-Id: If6a5bf6726667a0df995c3dd771a224dc6ed0947 Signed-off-by: blsaws --- tests/adhoc/smoke01.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/adhoc/smoke01.sh b/tests/adhoc/smoke01.sh index 60fb878..c8ace71 100644 --- a/tests/adhoc/smoke01.sh +++ b/tests/adhoc/smoke01.sh @@ -129,7 +129,13 @@ nova keypair-add smoke01 > /tmp/smoke01 chmod 600 /tmp/smoke01 echo "Boot cirros1" -nova boot --flavor m1.tiny --image cirros-0.3.3-x86_64 --nic net-id=$internal_NET --security-groups smoke01 --key-name smoke01 cirros1 +openstack server create --config-drive True --flavor m1.tiny --image cirros-0.3.3-x86_64 --nic net-id=$internal_NET --security-group smoke01 --key-name smoke01 cirros1 +# metadata is accessible by logging into cirros1 after floating IP assignment +# ssh -i /tmp/smoke01 -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no cirros@$FLOATING_IP +# from the local metadata service, via: curl http://169.254.169.254/latest/meta-data +# from the config drive, via +# sudo mount /dev/sr0 /mnt/ +# find /mnt/openstack/latest -name *.json -exec grep -H { {} + | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' echo "Get cirros1 instance ID" test_cirros1_ID=$(openstack server list | awk "/ cirros1 / { print \$2 }") -- cgit 1.2.3-korg