
This patch creates the external network and a subnet on that network. Change-Id: I4ecb2d0d611a956413d9b8d1b9a4bd6c25f3f285 Co-Authored-By: Pranav Salunke <dguitarbite@gmail.com> Implements: blueprint openstack-training-labs
25 lines
818 B
Bash
Executable File
25 lines
818 B
Bash
Executable File
#!/usr/bin/env bash
|
|
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
|
|
source "$TOP_DIR/config/paths"
|
|
source "$CONFIG_DIR/credentials"
|
|
source "$LIB_DIR/functions.guest"
|
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
|
exec_logfile
|
|
|
|
indicate_current_auto
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Create the external network and a subnet on it.
|
|
#------------------------------------------------------------------------------
|
|
|
|
echo "Creating the external network."
|
|
neutron net-create ext-net --shared --router:external=True
|
|
|
|
echo "Creating a subnet on the external network."
|
|
neutron subnet-create ext-net \
|
|
--name ext-subnet \
|
|
--allocation-pool start="$FLOATING_IP_START,end=$FLOATING_IP_END" \
|
|
--disable-dhcp \
|
|
--gateway "$EXTERNAL_NETWORK_GATEWAY" \
|
|
"$EXTERNAL_NETWORK_CIDR"
|