Fix grenade job failure
Check if subnet already added to router before adding it. Change-Id: I59903642aee125d3b5cfaa944d12cd3ed7b278b4
This commit is contained in:
parent
b833f8ec2a
commit
c923b9c64b
@ -22,5 +22,5 @@ HEAT_PRIVATE_SUBNET_CIDR=10.0.5.0/24
|
|||||||
source $TOP_DIR/openrc demo demo
|
source $TOP_DIR/openrc demo demo
|
||||||
|
|
||||||
openstack network show heat-net || openstack network create heat-net
|
openstack network show heat-net || openstack network create heat-net
|
||||||
openstack subnet show heat-subnet || openstack subnet create heat-subnet --network heat-net --subnet-range $HEAT_PRIVATE_SUBNET_CIDR
|
subnet_id=$((openstack subnet show heat-subnet || openstack subnet create heat-subnet --network heat-net --subnet-range $HEAT_PRIVATE_SUBNET_CIDR) | grep " id " | awk '{print $4}')
|
||||||
openstack router add subnet router1 heat-subnet
|
openstack router show router1 -c interfaces_info | grep -q $subnet_id || openstack router add subnet router1 $subnet_id
|
||||||
|
Loading…
Reference in New Issue
Block a user