Merge "log if 'flat' interface and no cleaning network"
This commit is contained in:
@@ -36,16 +36,12 @@ class FlatNetwork(common.VIFPortIDMixin, neutron.NeutronNetworkInterfaceMixin,
|
||||
|
||||
def __init__(self):
|
||||
cleaning_net = CONF.neutron.cleaning_network
|
||||
# TODO(vdrok): Switch to DriverLoadError in Ocata
|
||||
if not cleaning_net:
|
||||
LOG.warning(_LW(
|
||||
'Please specify a valid UUID or name for '
|
||||
'[neutron]/cleaning_network configuration option so that '
|
||||
'this interface is able to perform cleaning. It will be '
|
||||
'required starting with the Ocata release, and if not '
|
||||
'specified then, the conductor service will fail to start if '
|
||||
'"flat" is in the list of values for '
|
||||
'[DEFAULT]enabled_network_interfaces configuration option.'))
|
||||
'this interface is able to perform cleaning. Otherwise, '
|
||||
'cleaning operations will fail to start.'))
|
||||
|
||||
def validate(self, task):
|
||||
"""Validates the network interface.
|
||||
|
||||
@@ -68,7 +68,7 @@ class TestFlatInterface(db_base.DbTestCase):
|
||||
mock_p_changed.assert_called_once_with(task, port)
|
||||
|
||||
@mock.patch.object(flat_interface, 'LOG')
|
||||
def test_init_incorrect_cleaning_net(self, mock_log):
|
||||
def test_init_no_cleaning_network(self, mock_log):
|
||||
self.config(cleaning_network=None, group='neutron')
|
||||
flat_interface.FlatNetwork()
|
||||
self.assertTrue(mock_log.warning.called)
|
||||
|
||||
Reference in New Issue
Block a user