blob: 6bacaa5db3a684d848fa6e714f17d04547ad8a48 [file] [log] [blame]
Andy Bavier8cca3472015-04-15 16:55:38 -04001#!/bin/bash
Andy Bavier8d51c6c2015-04-01 11:40:22 -04002
Andy Bavier8cca3472015-04-15 16:55:38 -04003source ~/admin-openrc.sh
Andy Bavier8d51c6c2015-04-01 11:40:22 -04004
5# Create nat-net network
Andy Bavier8cca3472015-04-15 16:55:38 -04006neutron net-show nat-net 2>&1 > /dev/null
Andy Bavier8d51c6c2015-04-01 11:40:22 -04007if [ "$?" -ne 0 ]
8then
9 neutron net-create --provider:physical_network=nat --provider:network_type=flat --shared nat-net
10fi
11
12# Create nat-net subnet
Andy Bavier8cca3472015-04-15 16:55:38 -040013neutron subnet-show nat-net 2>&1 > /dev/null
Andy Bavier8d51c6c2015-04-01 11:40:22 -040014if [ "$?" -ne 0 ]
15then
16 neutron subnet-create nat-net --name nat-net 172.16.0.0/16 --gateway=172.16.0.1 --enable-dhcp=false
17fi
18
19# Create nat-net network
Andy Bavier8cca3472015-04-15 16:55:38 -040020neutron net-show ext-net 2>&1 > /dev/null
Andy Bavier8d51c6c2015-04-01 11:40:22 -040021if [ "$?" -ne 0 ]
22then
23 neutron net-create --provider:physical_network=ext --provider:network_type=flat --shared ext-net
24fi
25
26