default to no network-device-mtu
This commit is contained in:
@@ -50,9 +50,10 @@ options:
|
||||
description: Name of the external network for floating IP addresses provided by Neutron.
|
||||
network-device-mtu:
|
||||
type: int
|
||||
default: 1500
|
||||
default: 0
|
||||
description: |
|
||||
The MTU size for the interfaces managed by neutron.
|
||||
The MTU size for the interfaces managed by neutron. If set to 0, no value
|
||||
will be applied.
|
||||
neutron-plugin:
|
||||
default: ovs
|
||||
type: string
|
||||
|
||||
@@ -282,8 +282,12 @@ def neutron_plugin_api_relation_joined(rid=None):
|
||||
'neutron-security-groups': config('neutron-security-groups'),
|
||||
'l2-population': get_l2population(),
|
||||
'overlay-network-type': get_overlay_network_type(),
|
||||
'network-device-mtu': config('network-device-mtu'),
|
||||
}
|
||||
|
||||
mtu = config('network-device-mtu')
|
||||
if mtu:
|
||||
relation_data['network-device-mtu'] = mtu
|
||||
|
||||
relation_set(relation_id=rid, **relation_data)
|
||||
|
||||
|
||||
|
||||
@@ -273,6 +273,21 @@ class NeutronAPIHooksTests(CharmTestCase):
|
||||
self.assertTrue(self.CONFIGS.write.called_with(NEUTRON_CONF))
|
||||
|
||||
def test_neutron_plugin_api_relation_joined_nol2(self):
|
||||
_relation_data = {
|
||||
'neutron-security-groups': False,
|
||||
'l2-population': False,
|
||||
'overlay-network-type': 'vxlan',
|
||||
}
|
||||
self.get_l2population.return_value = False
|
||||
self.get_overlay_network_type.return_value = 'vxlan'
|
||||
self._call_hook('neutron-plugin-api-relation-joined')
|
||||
self.relation_set.assert_called_with(
|
||||
relation_id=None,
|
||||
**_relation_data
|
||||
)
|
||||
|
||||
def test_neutron_plugin_api_relation_joined_w_mtu(self):
|
||||
self.test_config.set('network-device-mtu', 1500)
|
||||
_relation_data = {
|
||||
'neutron-security-groups': False,
|
||||
'l2-population': False,
|
||||
|
||||
Reference in New Issue
Block a user