summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2016-10-21 00:21:52 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-10-21 00:21:52 +0000
commitbd5ed1ad751b4d9b937859a27d29b026cf6b429c (patch)
treeb308492e0f5e4d696431f92735a0cfc25af18b84
parent1549576978e6bd56c9d376069bac86fb4f1788e9 (diff)
parentbb3dc933b7fd9e04fff5a73df8534494ad980ee7 (diff)
Merge "Add ability to configure allowed vlan ranges in deploy configuration" into stable/colorado
-rw-r--r--config/network/network_settings.yaml1
-rw-r--r--lib/python/apex/network_environment.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/config/network/network_settings.yaml b/config/network/network_settings.yaml
index f768064..5c9d644 100644
--- a/config/network/network_settings.yaml
+++ b/config/network/network_settings.yaml
@@ -57,6 +57,7 @@ private_network:
cidr: 11.0.0.0/24
compute_interface: nic2
controller_interface: nic2
+ vlan_id_range: 1,1000 # Tenant physical network VLAN-ID range
# "public" network is used for external connectivity.
# The external network provides Internet access for virtual
diff --git a/lib/python/apex/network_environment.py b/lib/python/apex/network_environment.py
index d96fa44..61810d8 100644
--- a/lib/python/apex/network_environment.py
+++ b/lib/python/apex/network_environment.py
@@ -126,6 +126,12 @@ class NetworkEnvironment(dict):
}]
priv_cidr = net_settings[PRIVATE_NETWORK]['cidr']
self[param_def]['TenantNetCidr'] = str(priv_cidr)
+ if 'vlan_id_range' in net_settings[PRIVATE_NETWORK].keys():
+ tenant_vlan_range = \
+ net_settings[PRIVATE_NETWORK]['vlan_id_range'].split(',')
+ self[param_def]['NeutronNetworkVLANRanges'] = \
+ "datacentre:" + tenant_vlan_range[0] + ':' \
+ + tenant_vlan_range[1]
if priv_cidr.version == 6:
postfix = '/tenant_v6.yaml'
else: