diff options
author | Dan Radez <dradez@redhat.com> | 2016-10-19 12:35:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-19 12:35:44 +0000 |
commit | c44e8ee96f21f415f26ec3dbeaf9172081f830c8 (patch) | |
tree | 36b36492c3da98396b2630556cc450c2e7faee7b | |
parent | 310e57e504024c40e4043e39c3e7b663add16f3a (diff) | |
parent | 3228f00248cda32671fb0e6a02059bea6ae66c99 (diff) |
Merge "Add ability to configure allowed vlan ranges in deploy configuration"
-rw-r--r-- | config/network/network_settings.yaml | 1 | ||||
-rw-r--r-- | lib/python/apex/network_environment.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/config/network/network_settings.yaml b/config/network/network_settings.yaml index ab9ed962..ee5537d9 100644 --- a/config/network/network_settings.yaml +++ b/config/network/network_settings.yaml @@ -89,6 +89,7 @@ networks: # Network configurations mtu: 64000 # Tenant network MTU overlay_id_range: 2,65535 # Tenant network Overlay segmentation ID range: # VNI, VLAN-ID, etc. + vlan_id_range: 1,1000 # Tenant physical network VLAN-ID range segmentation_type: vxlan # Tenant network segmentation type: # vlan, vxlan, gre nic_mapping: # Mapping of network configuration for Overcloud Nodes 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: |