From 8479545525f4c12c17fd47b1066d520758392ff6 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Wed, 29 Jun 2016 00:38:33 +0000 Subject: [PATCH] Use openstack commands for prepare_test_network.sh There is not yet an openstack command to create a subnet so the old command is used. The tests work fine without adding the ROUTER_GW_IP route, so this has been removed. Change-Id: Ic5f9c3ab130ad089fb12a7f2182dc8136faa6daf --- heat_integrationtests/prepare_test_network.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/heat_integrationtests/prepare_test_network.sh b/heat_integrationtests/prepare_test_network.sh index 268fb2a5eb..e0e6c87067 100755 --- a/heat_integrationtests/prepare_test_network.sh +++ b/heat_integrationtests/prepare_test_network.sh @@ -14,16 +14,12 @@ # This script creates default tenant networks for the tests -set -x +set -ex -source $DEST/devstack/openrc admin admin -PUB_SUBNET_ID=`neutron subnet-list | grep ' public-subnet ' | awk '{split($0,a,"|"); print a[2]}'` -ROUTER_GW_IP=`neutron port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F '"' -v subnet_id="${PUB_SUBNET_ID//[[:space:]]/}" '$4 == subnet_id { print $8; }'` +HEAT_PRIVATE_SUBNET_CIDR=10.0.5.0/24 # create a heat specific private network (default 'private' network has ipv6 subnet) source $DEST/devstack/openrc demo demo -HEAT_PRIVATE_SUBNET_CIDR=10.0.5.0/24 -neutron net-create heat-net +openstack network create heat-net neutron subnet-create --name heat-subnet heat-net $HEAT_PRIVATE_SUBNET_CIDR -neutron router-interface-add router1 heat-subnet -sudo route add -net $HEAT_PRIVATE_SUBNET_CIDR gw $ROUTER_GW_IP +openstack router add subnet router1 heat-subnet