Fix test_nova.sh script for quantum.
Change-Id: I014f17d2be001a2447d3bd00bde3699840b9443e
This commit is contained in:
@@ -29,7 +29,10 @@ login_user='ubuntu'
|
||||
|
||||
|
||||
# create a pub/priv keypair
|
||||
ssh-keygen -f /tmp/id_rsa -t rsa -N ''
|
||||
key_path=/tmp/id_rsa
|
||||
if [ ! -f $key_path ]; then
|
||||
ssh-keygen -f $key_path -t rsa -N ''
|
||||
fi
|
||||
|
||||
#add the public key to nova.
|
||||
nova --no-cache keypair-add --pub_key /tmp/id_rsa.pub key_cirros
|
||||
@@ -93,7 +96,10 @@ ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname
|
||||
# get port
|
||||
ip_addr=`nova show $instance_name | grep 'net1 network' | awk -F'|' '{print $3}'`
|
||||
port_id=`quantum port-list | grep $ip_addr | awk -F' ' '{print $2}'`
|
||||
quantum floatingip-create --port_id $port_id $quantum_public_net
|
||||
floating_ip=`quantum floatingip-create --port_id $port_id $quantum_public_net | grep floating_ip_address | awk '{print $4}'`
|
||||
quantum security-group-rule-create --protocol icmp --direction ingress default
|
||||
quantum security-group-rule-create --protocol tcp --port-range-min 22 \
|
||||
--port-range-max 22 --direction ingress default
|
||||
sleep <%= sleep_time %>
|
||||
ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname
|
||||
<% end %>
|
||||
|
Reference in New Issue
Block a user