enable network-device-mtu
This commit is contained in:
parent
1f72ac6272
commit
9fa87d89b4
@ -111,8 +111,8 @@ def _neutron_api_settings():
|
||||
'''
|
||||
neutron_settings = {
|
||||
'l2_population': False,
|
||||
'network_device_mtu': 1500,
|
||||
'overlay_network_type': 'gre',
|
||||
|
||||
}
|
||||
for rid in relation_ids('neutron-plugin-api'):
|
||||
for unit in related_units(rid):
|
||||
@ -122,6 +122,7 @@ def _neutron_api_settings():
|
||||
neutron_settings = {
|
||||
'l2_population': rdata['l2-population'],
|
||||
'overlay_network_type': rdata['overlay-network-type'],
|
||||
'network_device_mtu': rdata['network-device-mtu'],
|
||||
}
|
||||
return neutron_settings
|
||||
return neutron_settings
|
||||
@ -223,6 +224,7 @@ class QuantumGatewayContext(OSContextGenerator):
|
||||
'verbose': config('verbose'),
|
||||
'instance_mtu': config('instance-mtu'),
|
||||
'l2_population': neutron_api_settings['l2_population'],
|
||||
'network_device_mtu': neutron_api_settings['network_device_mtu'],
|
||||
'overlay_network_type':
|
||||
neutron_api_settings['overlay_network_type'],
|
||||
}
|
||||
|
@ -11,5 +11,6 @@ core_plugin = {{ core_plugin }}
|
||||
control_exchange = neutron
|
||||
notification_driver = neutron.openstack.common.notifier.list_notifier
|
||||
list_notifier_drivers = neutron.openstack.common.notifier.rabbit_notifier
|
||||
network_device_mtu = {{ network_device_mtu }}
|
||||
[agent]
|
||||
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
@ -236,6 +236,7 @@ class TestQuantumGatewayContext(CharmTestCase):
|
||||
'debug': False,
|
||||
'verbose': True,
|
||||
'l2_population': False,
|
||||
'network_device_mtu': 1500,
|
||||
'overlay_network_type': 'gre',
|
||||
})
|
||||
|
||||
@ -362,24 +363,29 @@ class TestMisc(CharmTestCase):
|
||||
self.relation_ids.return_value = ['foo']
|
||||
self.related_units.return_value = ['bar']
|
||||
self.test_relation.set({'l2-population': True,
|
||||
'network-device-mtu': 1500,
|
||||
'overlay-network-type': 'gre', })
|
||||
self.relation_get.side_effect = self.test_relation.get
|
||||
self.assertEquals(quantum_contexts._neutron_api_settings(),
|
||||
{'l2_population': True,
|
||||
'network_device_mtu': 1500,
|
||||
'overlay_network_type': 'gre'})
|
||||
|
||||
def test_neutron_api_settings2(self):
|
||||
self.relation_ids.return_value = ['foo']
|
||||
self.related_units.return_value = ['bar']
|
||||
self.test_relation.set({'l2-population': True,
|
||||
'network-device-mtu': 1500,
|
||||
'overlay-network-type': 'gre', })
|
||||
self.relation_get.side_effect = self.test_relation.get
|
||||
self.assertEquals(quantum_contexts._neutron_api_settings(),
|
||||
{'l2_population': True,
|
||||
'network_device_mtu': 1500,
|
||||
'overlay_network_type': 'gre'})
|
||||
|
||||
def test_neutron_api_settings_no_apiplugin(self):
|
||||
self.relation_ids.return_value = []
|
||||
self.assertEquals(quantum_contexts._neutron_api_settings(),
|
||||
{'l2_population': False,
|
||||
'network_device_mtu': 1500,
|
||||
'overlay_network_type': 'gre', })
|
||||
|
Loading…
x
Reference in New Issue
Block a user