diff --git a/mypy.ini b/mypy.ini index 66fa6ba8dd3..0d613f8dd1c 100644 --- a/mypy.ini +++ b/mypy.ini @@ -79,7 +79,6 @@ exclude = (?x)( | ^neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/commands.py$ | ^neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py$ | ^neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py$ - | ^neutron/services/logapi/drivers/openvswitch/ovs_firewall_log.py$ | ^neutron/tests/$ ) diff --git a/neutron/services/logapi/agent/log_extension.py b/neutron/services/logapi/agent/log_extension.py index d9396f25bd0..757f65cfdea 100644 --- a/neutron/services/logapi/agent/log_extension.py +++ b/neutron/services/logapi/agent/log_extension.py @@ -37,7 +37,7 @@ class LoggingDriver(object, metaclass=abc.ABCMeta): """Defines abstract interface for logging driver""" # specific logging types are supported - SUPPORTED_LOGGING_TYPES = None + SUPPORTED_LOGGING_TYPES = tuple() @abc.abstractmethod def initialize(self, resource_rpc, **kwargs): diff --git a/neutron/services/logapi/drivers/openvswitch/driver.py b/neutron/services/logapi/drivers/openvswitch/driver.py index 2c2d26f0b8a..aba11232838 100644 --- a/neutron/services/logapi/drivers/openvswitch/driver.py +++ b/neutron/services/logapi/drivers/openvswitch/driver.py @@ -28,7 +28,7 @@ LOG = logging.getLogger(__name__) DRIVER = None -SUPPORTED_LOGGING_TYPES = ['security_group'] +SUPPORTED_LOGGING_TYPES = ('security_group',) class OVSDriver(base.DriverBase): diff --git a/neutron/services/logapi/drivers/openvswitch/ovs_firewall_log.py b/neutron/services/logapi/drivers/openvswitch/ovs_firewall_log.py index 14e652258d6..55aa0c2b22e 100644 --- a/neutron/services/logapi/drivers/openvswitch/ovs_firewall_log.py +++ b/neutron/services/logapi/drivers/openvswitch/ovs_firewall_log.py @@ -131,7 +131,7 @@ class OFPortLog(object): class OVSFirewallLoggingDriver(log_ext.LoggingDriver): - SUPPORTED_LOGGING_TYPES = ['security_group'] + SUPPORTED_LOGGING_TYPES = ('security_group',) REQUIRED_PROTOCOLS = [ ovs_consts.OPENFLOW13, ovs_consts.OPENFLOW14, diff --git a/neutron/services/logapi/drivers/ovn/driver.py b/neutron/services/logapi/drivers/ovn/driver.py index 4d66fa5f621..0fa198b9c78 100644 --- a/neutron/services/logapi/drivers/ovn/driver.py +++ b/neutron/services/logapi/drivers/ovn/driver.py @@ -41,7 +41,7 @@ DRIVER = None log_cfg.register_log_driver_opts() MAX_INT_LABEL = 2**32 -SUPPORTED_LOGGING_TYPES = [log_const.SECURITY_GROUP] +SUPPORTED_LOGGING_TYPES = (log_const.SECURITY_GROUP,) class LoggingNotSupported(n_exceptions.NeutronException): diff --git a/neutron/tests/unit/services/logapi/agent/l3/test_base.py b/neutron/tests/unit/services/logapi/agent/l3/test_base.py index ca4529aa264..184e52cad5d 100644 --- a/neutron/tests/unit/services/logapi/agent/l3/test_base.py +++ b/neutron/tests/unit/services/logapi/agent/l3/test_base.py @@ -32,7 +32,7 @@ _uuid = uuidutils.generate_uuid class FakeLogDriver(log_ext.LoggingDriver): - SUPPORTED_LOGGING_TYPES = ['fake_resource'] + SUPPORTED_LOGGING_TYPES = ('fake_resource',) def initialize(self, resource_rpc, **kwargs): pass diff --git a/neutron/tests/unit/services/logapi/agent/test_log_extension.py b/neutron/tests/unit/services/logapi/agent/test_log_extension.py index e7dbf18ef14..ee08251090b 100644 --- a/neutron/tests/unit/services/logapi/agent/test_log_extension.py +++ b/neutron/tests/unit/services/logapi/agent/test_log_extension.py @@ -33,7 +33,7 @@ from neutron.tests import base class FakeLogDriver(log_ext.LoggingDriver): - SUPPORTED_LOGGING_TYPES = ['security_group'] + SUPPORTED_LOGGING_TYPES = ('security_group',) def initialize(self, resource_rpc, **kwargs): pass diff --git a/neutron/tests/unit/services/logapi/drivers/openvswitch/test_ovs_firewall_log.py b/neutron/tests/unit/services/logapi/drivers/openvswitch/test_ovs_firewall_log.py index bc47954952a..265c41714c2 100644 --- a/neutron/tests/unit/services/logapi/drivers/openvswitch/test_ovs_firewall_log.py +++ b/neutron/tests/unit/services/logapi/drivers/openvswitch/test_ovs_firewall_log.py @@ -112,7 +112,7 @@ class TestOVSFirewallLoggingDriver(base.BaseTestCase): agent_rpc, 'LoggingApiStub', autospec=True).start() self.log_driver.start_logapp = mock.Mock() self.log_driver.initialize(resource_rpc_mock) - self.log_driver.SUPPORTED_LOGGING_TYPES = ['security_group'] + self.log_driver.SUPPORTED_LOGGING_TYPES = ('security_group',) self.mock_bridge = self.log_driver.int_br self.mock_bridge.reset_mock() self.fake_ovs_port = FakeOVSPort('port', 1, '00:00:00:00:00:00') diff --git a/neutron/tests/unit/services/logapi/drivers/test_base.py b/neutron/tests/unit/services/logapi/drivers/test_base.py index 0ece2d85fbd..684517d2580 100644 --- a/neutron/tests/unit/services/logapi/drivers/test_base.py +++ b/neutron/tests/unit/services/logapi/drivers/test_base.py @@ -18,7 +18,7 @@ from neutron_lib.api.definitions import portbindings from neutron.services.logapi.drivers import base as log_base_driver from neutron.tests import base -SUPPORTED_LOGGING_TYPES = ['security_group'] +SUPPORTED_LOGGING_TYPES = ('security_group',) class FakeDriver(log_base_driver.DriverBase): diff --git a/neutron/tests/unit/services/logapi/test_logging_plugin.py b/neutron/tests/unit/services/logapi/test_logging_plugin.py index 859829af46c..f4bb8652c9e 100644 --- a/neutron/tests/unit/services/logapi/test_logging_plugin.py +++ b/neutron/tests/unit/services/logapi/test_logging_plugin.py @@ -30,7 +30,7 @@ from neutron.services.logapi.common import sg_validate from neutron.tests.unit.services.logapi import base DB_PLUGIN_KLASS = 'neutron.db.db_base_plugin_v2.NeutronDbPluginV2' -SUPPORTED_LOGGING_TYPES = ['security_group'] +SUPPORTED_LOGGING_TYPES = ('security_group',) class TestLoggingPlugin(base.BaseLogTestCase):