From 2aafade144b0d0a50a2d0ed04d45e87c627a568e Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Wed, 18 Sep 2013 13:32:35 -0700 Subject: [PATCH] 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 --- templates/test_nova.sh.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/test_nova.sh.erb b/templates/test_nova.sh.erb index e28152b..c9842ac 100644 --- a/templates/test_nova.sh.erb +++ b/templates/test_nova.sh.erb @@ -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}'` 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}'` -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 \ - --port-range-max 22 --direction ingress default + --port-range-max 22 --direction ingress test_sec_group sleep <%= @sleep_time %> ssh $login_user@$floating_ip -i /tmp/id_rsa -o StrictHostKeyChecking=no hostname <% end %>