From 3228f00248cda32671fb0e6a02059bea6ae66c99 Mon Sep 17 00:00:00 2001 From: Peng Liu Date: Tue, 20 Sep 2016 16:35:18 -0400 Subject: Add ability to configure allowed vlan ranges in deploy configuration Add a new parameter 'vlan_id_range' for tenant vlan range, which can set the 'network_vlan_ranges' for 'datacentre' network in ml2.ini on both compute and controller. Change-Id: I5c190fb2d5d582d0d5f56d4c18cf32502b758bd8 JIRA: APEX-272 Signed-off-by: Peng Liu --- lib/python/apex/network_environment.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/python') diff --git a/lib/python/apex/network_environment.py b/lib/python/apex/network_environment.py index 5cb2d0cd..bbe8ee6b 100644 --- a/lib/python/apex/network_environment.py +++ b/lib/python/apex/network_environment.py @@ -116,6 +116,12 @@ class NetworkEnvironment(dict): 'end': str(tenant_range[1])}] tenant_cidr = nets[TENANT_NETWORK]['cidr'] self[param_def]['TenantNetCidr'] = str(tenant_cidr) + if 'vlan_id_range' in nets[TENANT_NETWORK].keys(): + tenant_vlan_range = \ + nets[TENANT_NETWORK]['vlan_id_range'].split(',') + self[param_def]['NeutronNetworkVLANRanges'] = \ + "datacentre:" + tenant_vlan_range[0] + ':' \ + + tenant_vlan_range[1] if tenant_cidr.version == 6: postfix = '/tenant_v6.yaml' else: -- cgit 1.2.3-korg