more
This commit is contained in:
parent
6c466e2c87
commit
53bfb48db3
@ -18,6 +18,7 @@ from charmhelpers.contrib.network.ip import get_address_in_network
|
||||
from charmhelpers.contrib.openstack.neutron import (
|
||||
parse_bridge_mappings,
|
||||
parse_data_port_mappings,
|
||||
parse_vlan_range_mappings,
|
||||
)
|
||||
from charmhelpers.contrib.openstack.context import (
|
||||
NeutronPortContext,
|
||||
@ -148,6 +149,13 @@ class OVSPluginContext(context.NeutronContext):
|
||||
if mappings:
|
||||
ovs_ctxt['bridge_mappings'] = mappings
|
||||
|
||||
vlan_ranges = config('vlan-ranges')
|
||||
vlan_range_mappings = parse_vlan_range_mappings(config('vlan-ranges'))
|
||||
if vlan_ranges:
|
||||
providers = vlan_range_mappings.keys()
|
||||
ovs_ctxt['network_providers'] = ' '.join(providers)
|
||||
ovs_ctxt['vlan_ranges'] = vlan_ranges
|
||||
|
||||
return ovs_ctxt
|
||||
|
||||
|
||||
|
@ -16,10 +16,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
|
||||
|
Loading…
Reference in New Issue
Block a user