update test sec group rules
In Havana, a default security group is created per tenant. This causes the security groups part of the test file to fail b/c it expects only one group named default, and since the credentials used are for admin, it winds up seeing two security groups named default (from admin and services tenants). This commit updates the test to create its own security group to get around this issue. Change-Id: Iddf315e732f8e275fc193e00b74dcbda9d73bc25
This commit is contained in:
@@ -97,9 +97,11 @@ ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname
|
|||||||
ip_addr=`nova show $instance_name | grep 'net1 network' | awk -F'|' '{print $3}'`
|
ip_addr=`nova show $instance_name | grep 'net1 network' | awk -F'|' '{print $3}'`
|
||||||
port_id=`neutron port-list | grep $ip_addr | awk -F' ' '{print $2}'`
|
port_id=`neutron port-list | grep $ip_addr | awk -F' ' '{print $2}'`
|
||||||
floating_ip=`neutron floatingip-create --port_id $port_id $neutron_public_net | grep floating_ip_address | awk '{print $4}'`
|
floating_ip=`neutron floatingip-create --port_id $port_id $neutron_public_net | grep floating_ip_address | awk '{print $4}'`
|
||||||
neutron security-group-rule-create --protocol icmp --direction ingress default
|
neutron security-group-create test_sec_group
|
||||||
|
nova add-secgroup $instance_name test_sec_group
|
||||||
|
neutron security-group-rule-create --protocol icmp --direction ingress test_sec_group
|
||||||
neutron security-group-rule-create --protocol tcp --port-range-min 22 \
|
neutron security-group-rule-create --protocol tcp --port-range-min 22 \
|
||||||
--port-range-max 22 --direction ingress default
|
--port-range-max 22 --direction ingress test_sec_group
|
||||||
sleep <%= @sleep_time %>
|
sleep <%= @sleep_time %>
|
||||||
ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname
|
ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Reference in New Issue
Block a user