[hopem,r=gnuoy,wolsen]
Allow flat network providers to be configured seperately to vlan providers. Closes-Bug: 1444470
This commit is contained in:
commit
64d632ae13
@ -128,11 +128,17 @@ options:
|
||||
description: |
|
||||
Space-separated list of ML2 data bridge mappings with format
|
||||
<provider>:<bridge>.
|
||||
flat-network-providers:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
Space-delimited list of Neutron flat network providers.
|
||||
vlan-ranges:
|
||||
type: string
|
||||
default: "physnet1:1000:2000"
|
||||
description: |
|
||||
Space-delimited list of network provider vlan id ranges.
|
||||
Space-delimited list of Neutron network-provider & vlan-id-ranges using
|
||||
format "<provider>:<start>:<end> ...".
|
||||
# Network configuration options
|
||||
# by default all access is over 'private-address'
|
||||
os-data-network:
|
||||
|
@ -23,9 +23,6 @@ from charmhelpers.contrib.hahelpers.cluster import(
|
||||
from charmhelpers.contrib.network.ip import (
|
||||
get_address_in_network,
|
||||
)
|
||||
from charmhelpers.contrib.openstack.neutron import (
|
||||
parse_vlan_range_mappings,
|
||||
)
|
||||
|
||||
DB_USER = "quantum"
|
||||
QUANTUM_DB = "quantum"
|
||||
@ -146,11 +143,12 @@ class QuantumGatewayContext(OSContextGenerator):
|
||||
if mappings:
|
||||
ctxt['bridge_mappings'] = ','.join(mappings.split())
|
||||
|
||||
flat_providers = config('flat-network-providers')
|
||||
if flat_providers:
|
||||
ctxt['network_providers'] = ','.join(flat_providers.split())
|
||||
|
||||
vlan_ranges = config('vlan-ranges')
|
||||
vlan_range_mappings = parse_vlan_range_mappings(vlan_ranges)
|
||||
if vlan_range_mappings:
|
||||
providers = sorted(vlan_range_mappings.keys())
|
||||
ctxt['network_providers'] = ','.join(providers)
|
||||
if vlan_ranges:
|
||||
ctxt['vlan_ranges'] = ','.join(vlan_ranges.split())
|
||||
|
||||
net_dev_mtu = api_settings['network_device_mtu']
|
||||
|
@ -125,6 +125,7 @@ class TestQuantumGatewayContext(CharmTestCase):
|
||||
self.test_config.set('instance-mtu', 1420)
|
||||
self.test_config.set('vlan-ranges',
|
||||
'physnet1:1000:2000 physnet2:2001:3000')
|
||||
self.test_config.set('flat-network-providers', 'physnet3 physnet4')
|
||||
# Provided by neutron-api relation
|
||||
_rids.return_value = ['neutron-plugin-api:0']
|
||||
_runits.return_value = ['neutron-api/0']
|
||||
@ -147,7 +148,7 @@ class TestQuantumGatewayContext(CharmTestCase):
|
||||
'l2_population': True,
|
||||
'overlay_network_type': 'gre',
|
||||
'bridge_mappings': 'physnet1:br-data',
|
||||
'network_providers': 'physnet1,physnet2',
|
||||
'network_providers': 'physnet3,physnet4',
|
||||
'vlan_ranges': 'physnet1:1000:2000,physnet2:2001:3000',
|
||||
'network_device_mtu': 9000,
|
||||
'veth_mtu': 9000,
|
||||
|
Loading…
Reference in New Issue
Block a user