more
This commit is contained in:
parent
9c7a35104d
commit
c809638c0c
@ -120,6 +120,11 @@ options:
|
||||
description: |
|
||||
Space-separated list of ML2 data bridge mappings with format
|
||||
<provider>:<bridge>.
|
||||
vlan-ranges:
|
||||
type: string
|
||||
default: "physnet1:1000:2000"
|
||||
description: |
|
||||
Space-delimited list of network provider vlan id ranges.
|
||||
# Network configuration options
|
||||
# by default all access is over 'private-address'
|
||||
os-data-network:
|
||||
|
@ -29,6 +29,7 @@ from charmhelpers.contrib.network.ip import (
|
||||
)
|
||||
from charmhelpers.contrib.openstack.neutron import (
|
||||
parse_data_port_mappings,
|
||||
parse_vlan_range_mappings,
|
||||
)
|
||||
from charmhelpers.core.host import (
|
||||
get_nic_hwaddr,
|
||||
@ -253,6 +254,12 @@ class QuantumGatewayContext(OSContextGenerator):
|
||||
if mappings:
|
||||
ctxt['bridge_mappings'] = mappings
|
||||
|
||||
vlan_ranges = config('vlan-ranges')
|
||||
vlan_range_mappings = parse_vlan_range_mappings(config('vlan-ranges'))
|
||||
if vlan_ranges:
|
||||
ctxt['network_providers'] = ' '.join(vlan_range_mappings.keys())
|
||||
ctxt['vlan_ranges'] = vlan_ranges
|
||||
|
||||
net_dev_mtu = neutron_api_settings.get('network_device_mtu')
|
||||
if net_dev_mtu:
|
||||
ctxt['network_device_mtu'] = net_dev_mtu
|
||||
|
@ -14,10 +14,10 @@ tunnel_id_ranges = 1:1000
|
||||
vni_ranges = 1001:2000
|
||||
|
||||
[ml2_type_vlan]
|
||||
network_vlan_ranges = physnet1:1000:2000
|
||||
network_vlan_ranges = {{ vlan_ranges }}
|
||||
|
||||
[ml2_type_flat]
|
||||
flat_networks = physnet1
|
||||
flat_networks = {{ network_providers }}
|
||||
|
||||
[ovs]
|
||||
enable_tunneling = True
|
||||
|
@ -279,6 +279,8 @@ class TestQuantumGatewayContext(CharmTestCase):
|
||||
'l2_population': False,
|
||||
'overlay_network_type': 'gre',
|
||||
'bridge_mappings': 'physnet1:br-data',
|
||||
'network_providers': 'physnet1',
|
||||
'vlan_ranges': 'physnet1:1000:2000'
|
||||
})
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user