summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/network-environment.yaml2
-rw-r--r--build/nics-template.yaml.jinja22
-rwxr-xr-xlib/post-install-functions.sh6
-rw-r--r--lib/python/apex/network_environment.py1
4 files changed, 8 insertions, 3 deletions
diff --git a/build/network-environment.yaml b/build/network-environment.yaml
index baf8b187..f1503feb 100644
--- a/build/network-environment.yaml
+++ b/build/network-environment.yaml
@@ -41,7 +41,7 @@ resource_registry:
parameter_defaults:
- #NeutronExternalNetworkBridge: "''"
+ NeutronExternalNetworkBridge: 'br-ex'
ControlPlaneSubnetCidr: "24"
ControlPlaneDefaultRoute: 192.0.2.1
ExternalNetCidr: 192.168.37.0/24
diff --git a/build/nics-template.yaml.jinja2 b/build/nics-template.yaml.jinja2
index 91d0c478..3fac43b8 100644
--- a/build/nics-template.yaml.jinja2
+++ b/build/nics-template.yaml.jinja2
@@ -85,7 +85,7 @@ resources:
os_net_config:
network_config:
-
- {%- if vlans['private_network'] is number or vlans['storage_network'] is number or vlans['api_network'] is number %}
+ {%- if vlans['private_network'] is number or vlans['storage_network'] is number or vlans['api_network'] is number or vlans['public_network'] is number %}
type: ovs_bridge
name: {get_input: bridge_name}
members:
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 = \