From 44266f8d881ff3a04e21fea63845cfb0ea80347e Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 12 Apr 2018 15:40:29 -0700 Subject: [PATCH] Renamed subnet_service_type_db_models module Since it doesn't contain any models anymore, renamed it into subnet_service_type_mixin. Change-Id: I8146c39b8c9bb6c3fde318316122fa215fce2935 --- ...service_type_db_models.py => subnet_service_type_mixin.py} | 3 --- neutron/plugins/ml2/plugin.py | 4 ++-- neutron/tests/unit/extensions/test_subnet_service_types.py | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) rename neutron/db/{subnet_service_type_db_models.py => subnet_service_type_mixin.py} (92%) diff --git a/neutron/db/subnet_service_type_db_models.py b/neutron/db/subnet_service_type_mixin.py similarity index 92% rename from neutron/db/subnet_service_type_db_models.py rename to neutron/db/subnet_service_type_mixin.py index a95a3e969f7..4bd52a1371f 100644 --- a/neutron/db/subnet_service_type_db_models.py +++ b/neutron/db/subnet_service_type_mixin.py @@ -13,9 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -# TODO(ihrachys): consider renaming the module since now it does not contain -# any models at all - from neutron_lib.api.definitions import subnet as subnet_def from neutron.db import _resource_extend as resource_extend diff --git a/neutron/plugins/ml2/plugin.py b/neutron/plugins/ml2/plugin.py index 3b2a72fe53a..bd1953f8b19 100644 --- a/neutron/plugins/ml2/plugin.py +++ b/neutron/plugins/ml2/plugin.py @@ -81,7 +81,7 @@ from neutron.db import provisioning_blocks from neutron.db.quota import driver # noqa from neutron.db import securitygroups_rpc_base as sg_db_rpc from neutron.db import segments_db -from neutron.db import subnet_service_type_db_models as service_type_db +from neutron.db import subnet_service_type_mixin from neutron.db import vlantransparent_db from neutron.extensions import providernet as provider from neutron.extensions import vlantransparent @@ -126,7 +126,7 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2, vlantransparent_db.Vlantransparent_db_mixin, extradhcpopt_db.ExtraDhcpOptMixin, address_scope_db.AddressScopeDbMixin, - service_type_db.SubnetServiceTypeMixin): + subnet_service_type_mixin.SubnetServiceTypeMixin): """Implement the Neutron L2 abstractions using modules. diff --git a/neutron/tests/unit/extensions/test_subnet_service_types.py b/neutron/tests/unit/extensions/test_subnet_service_types.py index d2edadc237f..194a65d1580 100644 --- a/neutron/tests/unit/extensions/test_subnet_service_types.py +++ b/neutron/tests/unit/extensions/test_subnet_service_types.py @@ -15,7 +15,7 @@ import webob.exc from neutron_lib.api.definitions import portbindings from neutron.db import db_base_plugin_v2 -from neutron.db import subnet_service_type_db_models +from neutron.db import subnet_service_type_mixin from neutron.extensions import subnet_service_types from neutron.tests.unit.db import test_db_base_plugin_v2 @@ -38,7 +38,7 @@ class SubnetServiceTypesExtensionManager(object): class SubnetServiceTypesExtensionTestPlugin( db_base_plugin_v2.NeutronDbPluginV2, - subnet_service_type_db_models.SubnetServiceTypeMixin): + subnet_service_type_mixin.SubnetServiceTypeMixin): """Test plugin to mixin the subnet service_types extension. """