diff options
author | Tim Rozet <trozet@redhat.com> | 2016-07-15 13:22:22 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2016-07-15 17:16:17 -0400 |
commit | 98fe31feaba1db62445d8a006dd52fd5e12eba1d (patch) | |
tree | 624af0fa0faad310fc70544f2e4af213156faafd /lib | |
parent | 88d5b2462933cce79cb059c81e007ec83ee2cd9e (diff) |
Fixes public vlan network settings
JIRA: APEX-201
Change-Id: I3ba8d5e38e203bb4f23679a3b91de97c591de146
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/post-install-functions.sh | 6 | ||||
-rw-r--r-- | lib/python/apex/network_environment.py | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh index 912a2a11..23c83361 100755 --- a/lib/post-install-functions.sh +++ b/lib/post-install-functions.sh @@ -76,7 +76,11 @@ EOI source overcloudrc set -o errexit echo "Configuring Neutron external network" -neutron net-create external --router:external=True --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') +if [[ -n "$public_network_vlan" && "$public_network_vlan" != 'native' ]]; then + neutron net-create external --router:external=True --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --provider:network_type vlan --provider:segmentation_id ${public_network_vlan} --provider:physical_network datacentre +else + neutron net-create external --router:external=True --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') +fi neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --disable-dhcp external --gateway ${public_network_gateway} --allocation-pool start=${public_network_floating_ip_range%%,*},end=${public_network_floating_ip_range##*,} ${public_network_cidr} echo "Removing sahara endpoint and service" diff --git a/lib/python/apex/network_environment.py b/lib/python/apex/network_environment.py index bf4bdc79..981c8f1c 100644 --- a/lib/python/apex/network_environment.py +++ b/lib/python/apex/network_environment.py @@ -84,6 +84,7 @@ class NetworkEnvironment: public_cidr = net_settings[PUBLIC_NETWORK]['cidr'] self.netenv_obj[param_def]['ExternalNetCidr'] = str(public_cidr) if net_settings[PUBLIC_NETWORK]['vlan'] != 'native': + self.netenv_obj[param_def]['NeutronExternalNetworkBridge'] = '""' self.netenv_obj[param_def]['ExternalNetworkVlanID'] = \ net_settings[PUBLIC_NETWORK]['vlan'] public_range = \ |