Andy Bavier | 8d51c6c | 2015-04-01 11:40:22 -0400 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | source ~/admin_openrc.sh |
| 4 | |
| 5 | # Create nat-net network |
| 6 | neutron net-show nat-net 2&>1 > /dev/null |
| 7 | if [ "$?" -ne 0 ] |
| 8 | then |
| 9 | neutron net-create --provider:physical_network=nat --provider:network_type=flat --shared nat-net |
| 10 | fi |
| 11 | |
| 12 | # Create nat-net subnet |
| 13 | neutron subnet-show nat-net 2&>1 > /dev/null |
| 14 | if [ "$?" -ne 0 ] |
| 15 | then |
| 16 | neutron subnet-create nat-net --name nat-net 172.16.0.0/16 --gateway=172.16.0.1 --enable-dhcp=false |
| 17 | fi |
| 18 | |
| 19 | # Create nat-net network |
| 20 | neutron net-show ext-net 2&>1 > /dev/null |
| 21 | if [ "$?" -ne 0 ] |
| 22 | then |
| 23 | neutron net-create --provider:physical_network=ext --provider:network_type=flat --shared ext-net |
| 24 | fi |
| 25 | |
| 26 | |