From f28a158b9f64f4df6acabfc8658310d059a288e7 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Tue, 5 Nov 2024 17:32:36 -0500 Subject: [PATCH] tests: move test_db_base_plugin_v2.py to common It's imported from functional suite, so changes to the file should trigger relevant gate checks. Change-Id: If855c32b1a7287c24e7b2ddbdca2a169207acb12 --- neutron/tests/{unit/db => common}/test_db_base_plugin_v2.py | 0 neutron/tests/functional/scheduler/test_l3_agent_scheduler.py | 2 +- neutron/tests/unit/_test_extension_portbindings.py | 2 +- neutron/tests/unit/api/rpc/handlers/test_l3_rpc.py | 2 +- neutron/tests/unit/db/metering/test_metering_db.py | 2 +- neutron/tests/unit/db/test_agentschedulers_db.py | 2 +- neutron/tests/unit/db/test_allowedaddresspairs_db.py | 2 +- neutron/tests/unit/db/test_ipam_backend_mixin.py | 2 +- neutron/tests/unit/db/test_ipam_pluggable_backend.py | 2 +- neutron/tests/unit/db/test_l3_db.py | 2 +- neutron/tests/unit/db/test_l3_dvr_db.py | 2 +- neutron/tests/unit/db/test_ovn_l3_hamode_db.py | 2 +- neutron/tests/unit/db/test_ovn_revision_numbers_db.py | 2 +- neutron/tests/unit/db/test_rbac_db_mixin.py | 2 +- neutron/tests/unit/extensions/test_address_group.py | 2 +- neutron/tests/unit/extensions/test_address_scope.py | 2 +- neutron/tests/unit/extensions/test_agent.py | 2 +- neutron/tests/unit/extensions/test_availability_zone.py | 2 +- neutron/tests/unit/extensions/test_data_plane_status.py | 2 +- neutron/tests/unit/extensions/test_default_subnetpools.py | 2 +- neutron/tests/unit/extensions/test_dns.py | 2 +- .../tests/unit/extensions/test_expose_port_forwarding_in_fip.py | 2 +- neutron/tests/unit/extensions/test_external_net.py | 2 +- neutron/tests/unit/extensions/test_extra_dhcp_opt.py | 2 +- neutron/tests/unit/extensions/test_flavors.py | 2 +- neutron/tests/unit/extensions/test_l3.py | 2 +- neutron/tests/unit/extensions/test_l3_ext_gw_mode.py | 2 +- neutron/tests/unit/extensions/test_local_ip.py | 2 +- neutron/tests/unit/extensions/test_network_ip_availability.py | 2 +- neutron/tests/unit/extensions/test_network_segment_range.py | 2 +- neutron/tests/unit/extensions/test_port_device_profile.py | 2 +- .../tests/unit/extensions/test_port_hardware_offload_type.py | 2 +- neutron/tests/unit/extensions/test_port_hints.py | 2 +- neutron/tests/unit/extensions/test_port_numa_affinity_policy.py | 2 +- .../unit/extensions/test_port_numa_affinity_policy_socket.py | 2 +- neutron/tests/unit/extensions/test_port_trusted_vif.py | 2 +- neutron/tests/unit/extensions/test_portsecurity.py | 2 +- neutron/tests/unit/extensions/test_securitygroup.py | 2 +- neutron/tests/unit/extensions/test_segment.py | 2 +- neutron/tests/unit/extensions/test_servicetype.py | 2 +- neutron/tests/unit/extensions/test_subnet_service_types.py | 2 +- neutron/tests/unit/extensions/test_timestamp.py | 2 +- neutron/tests/unit/extensions/test_uplink_status_propagation.py | 2 +- neutron/tests/unit/extensions/test_vlantransparent.py | 2 +- neutron/tests/unit/ipam/drivers/neutrondb_ipam/test_driver.py | 2 +- neutron/tests/unit/ipam/test_subnet_alloc.py | 2 +- neutron/tests/unit/objects/test_base.py | 2 +- neutron/tests/unit/plugins/ml2/test_plugin.py | 2 +- neutron/tests/unit/plugins/ml2/test_port_binding.py | 2 +- neutron/tests/unit/plugins/ml2/test_tracked_resources.py | 2 +- neutron/tests/unit/scheduler/test_l3_agent_scheduler.py | 2 +- neutron/tests/unit/services/metering/test_metering_plugin.py | 2 +- .../tests/unit/services/network_segment_range/test_plugin.py | 2 +- neutron/tests/unit/services/qos/test_qos_plugin.py | 2 +- 54 files changed, 53 insertions(+), 53 deletions(-) rename neutron/tests/{unit/db => common}/test_db_base_plugin_v2.py (100%) diff --git a/neutron/tests/unit/db/test_db_base_plugin_v2.py b/neutron/tests/common/test_db_base_plugin_v2.py similarity index 100% rename from neutron/tests/unit/db/test_db_base_plugin_v2.py rename to neutron/tests/common/test_db_base_plugin_v2.py diff --git a/neutron/tests/functional/scheduler/test_l3_agent_scheduler.py b/neutron/tests/functional/scheduler/test_l3_agent_scheduler.py index c40531273e0..9b8769c366d 100644 --- a/neutron/tests/functional/scheduler/test_l3_agent_scheduler.py +++ b/neutron/tests/functional/scheduler/test_l3_agent_scheduler.py @@ -29,8 +29,8 @@ from neutron.objects import network as net_obj from neutron.scheduler import l3_agent_scheduler from neutron.services.l3_router import l3_router_plugin from neutron.tests.common import helpers +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.functional import base -from neutron.tests.unit.db import test_db_base_plugin_v2 _uuid = uuidutils.generate_uuid diff --git a/neutron/tests/unit/_test_extension_portbindings.py b/neutron/tests/unit/_test_extension_portbindings.py index dca28ce6b67..7caab97a2ef 100644 --- a/neutron/tests/unit/_test_extension_portbindings.py +++ b/neutron/tests/unit/_test_extension_portbindings.py @@ -20,7 +20,7 @@ from neutron_lib import context from neutron_lib.plugins import directory from webob import exc -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit import dummy_plugin diff --git a/neutron/tests/unit/api/rpc/handlers/test_l3_rpc.py b/neutron/tests/unit/api/rpc/handlers/test_l3_rpc.py index a00ed2d0e72..fd0dbbd1a76 100644 --- a/neutron/tests/unit/api/rpc/handlers/test_l3_rpc.py +++ b/neutron/tests/unit/api/rpc/handlers/test_l3_rpc.py @@ -20,7 +20,7 @@ from neutron_lib.plugins import directory from oslo_config import cfg from neutron.api.rpc.handlers import l3_rpc -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/db/metering/test_metering_db.py b/neutron/tests/unit/db/metering/test_metering_db.py index d5c47fbb236..dfd0aa4f07b 100644 --- a/neutron/tests/unit/db/metering/test_metering_db.py +++ b/neutron/tests/unit/db/metering/test_metering_db.py @@ -25,7 +25,7 @@ from neutron.api import extensions from neutron.common import config import neutron.extensions from neutron.services.metering import metering_plugin -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 DB_METERING_PLUGIN_KLASS = ( "neutron.services.metering." diff --git a/neutron/tests/unit/db/test_agentschedulers_db.py b/neutron/tests/unit/db/test_agentschedulers_db.py index 9d04470929d..b53d0ae9b5c 100644 --- a/neutron/tests/unit/db/test_agentschedulers_db.py +++ b/neutron/tests/unit/db/test_agentschedulers_db.py @@ -49,8 +49,8 @@ from neutron.objects import agent as ag_obj from neutron.objects import l3agent as rb_obj from neutron import policy from neutron.tests.common import helpers +from neutron.tests.common import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit.api import test_extensions -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit.extensions import test_agent from neutron.tests.unit.extensions import test_l3 from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/db/test_allowedaddresspairs_db.py b/neutron/tests/unit/db/test_allowedaddresspairs_db.py index 5be6d1fae11..45e8c75c356 100644 --- a/neutron/tests/unit/db/test_allowedaddresspairs_db.py +++ b/neutron/tests/unit/db/test_allowedaddresspairs_db.py @@ -25,7 +25,7 @@ from neutron.db import allowedaddresspairs_db as addr_pair_db from neutron.db import db_base_plugin_v2 from neutron.db import portsecurity_db from neutron.extensions import securitygroup as secgroup -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 DB_PLUGIN_KLASS = ('neutron.tests.unit.db.test_allowedaddresspairs_db.' diff --git a/neutron/tests/unit/db/test_ipam_backend_mixin.py b/neutron/tests/unit/db/test_ipam_backend_mixin.py index ec5c21511d9..ea90f16077a 100644 --- a/neutron/tests/unit/db/test_ipam_backend_mixin.py +++ b/neutron/tests/unit/db/test_ipam_backend_mixin.py @@ -29,7 +29,7 @@ from neutron.objects import subnet as subnet_obj from neutron.plugins.ml2 import plugin as ml2_plugin from neutron.services.segments import db as segments_db from neutron.tests import base -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class TestIpamBackendMixin(base.BaseTestCase): diff --git a/neutron/tests/unit/db/test_ipam_pluggable_backend.py b/neutron/tests/unit/db/test_ipam_pluggable_backend.py index 6ba141da744..f04669ea08c 100644 --- a/neutron/tests/unit/db/test_ipam_pluggable_backend.py +++ b/neutron/tests/unit/db/test_ipam_pluggable_backend.py @@ -35,7 +35,7 @@ from neutron.ipam import requests as ipam_req from neutron.objects import network as network_obj from neutron.objects import ports as port_obj from neutron.objects import subnet as obj_subnet -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_base +from neutron.tests.common import test_db_base_plugin_v2 as test_db_base class UseIpamMixin: diff --git a/neutron/tests/unit/db/test_l3_db.py b/neutron/tests/unit/db/test_l3_db.py index a299404b9a4..f159512a4f4 100644 --- a/neutron/tests/unit/db/test_l3_db.py +++ b/neutron/tests/unit/db/test_l3_db.py @@ -46,7 +46,7 @@ from neutron.objects import ports as port_obj from neutron.objects import router as l3_obj from neutron.objects import subnet as subnet_obj from neutron.tests import base -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 @ddt.ddt diff --git a/neutron/tests/unit/db/test_l3_dvr_db.py b/neutron/tests/unit/db/test_l3_dvr_db.py index 5771c96ffe5..d4f0c37be2e 100644 --- a/neutron/tests/unit/db/test_l3_dvr_db.py +++ b/neutron/tests/unit/db/test_l3_dvr_db.py @@ -39,7 +39,7 @@ from neutron.objects import agent as agent_obj from neutron.objects import l3agent as rb_obj from neutron.objects import ports as port_obj from neutron.objects import router as router_obj -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_l3 _uuid = uuidutils.generate_uuid diff --git a/neutron/tests/unit/db/test_ovn_l3_hamode_db.py b/neutron/tests/unit/db/test_ovn_l3_hamode_db.py index 475340baad5..0d2671f66d3 100644 --- a/neutron/tests/unit/db/test_ovn_l3_hamode_db.py +++ b/neutron/tests/unit/db/test_ovn_l3_hamode_db.py @@ -20,7 +20,7 @@ from neutron_lib.plugins import directory from neutron.db import ovn_l3_hamode_db from neutron.objects import router as router_obj -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin +from neutron.tests.common import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit.db import test_l3_dvr_db diff --git a/neutron/tests/unit/db/test_ovn_revision_numbers_db.py b/neutron/tests/unit/db/test_ovn_revision_numbers_db.py index f28ec2ec330..f68d8e51b75 100644 --- a/neutron/tests/unit/db/test_ovn_revision_numbers_db.py +++ b/neutron/tests/unit/db/test_ovn_revision_numbers_db.py @@ -29,7 +29,7 @@ from neutron.db.models import ovn as ovn_models from neutron.db import ovn_revision_numbers_db as ovn_rn_db import neutron.extensions from neutron.services.revisions import revision_plugin -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_address_group from neutron.tests.unit.extensions import test_l3 from neutron.tests.unit.extensions import test_securitygroup diff --git a/neutron/tests/unit/db/test_rbac_db_mixin.py b/neutron/tests/unit/db/test_rbac_db_mixin.py index 7189b41fab6..a115facd13a 100644 --- a/neutron/tests/unit/db/test_rbac_db_mixin.py +++ b/neutron/tests/unit/db/test_rbac_db_mixin.py @@ -26,7 +26,7 @@ from neutron.db import rbac_db_models from neutron.extensions import rbac as ext_rbac from neutron.objects import network as network_obj from neutron.objects.qos import policy as qos_policy_obj -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin +from neutron.tests.common import test_db_base_plugin_v2 as test_plugin class NetworkRbacTestcase(test_plugin.NeutronDbPluginV2TestCase): diff --git a/neutron/tests/unit/extensions/test_address_group.py b/neutron/tests/unit/extensions/test_address_group.py index efda7a6c2f0..2e69eea7e77 100644 --- a/neutron/tests/unit/extensions/test_address_group.py +++ b/neutron/tests/unit/extensions/test_address_group.py @@ -19,7 +19,7 @@ import webob.exc from neutron.db import address_group_db from neutron.db import db_base_plugin_v2 from neutron.extensions import address_group as ag_ext -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 DB_PLUGIN_KLASS = ('neutron.tests.unit.extensions.test_address_group.' diff --git a/neutron/tests/unit/extensions/test_address_scope.py b/neutron/tests/unit/extensions/test_address_scope.py index 12bb27b9d86..21887a49c29 100644 --- a/neutron/tests/unit/extensions/test_address_scope.py +++ b/neutron/tests/unit/extensions/test_address_scope.py @@ -28,7 +28,7 @@ import webob.exc from neutron.db import address_scope_db from neutron.db import db_base_plugin_v2 from neutron.extensions import address_scope as ext_address_scope -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 DB_PLUGIN_KLASS = ('neutron.tests.unit.extensions.test_address_scope.' 'AddressScopeTestPlugin') diff --git a/neutron/tests/unit/extensions/test_agent.py b/neutron/tests/unit/extensions/test_agent.py index ced71e9150e..9348e7a9cf2 100644 --- a/neutron/tests/unit/extensions/test_agent.py +++ b/neutron/tests/unit/extensions/test_agent.py @@ -26,8 +26,8 @@ from neutron.db import agents_db from neutron.db import db_base_plugin_v2 from neutron.extensions import agent from neutron.tests.common import helpers +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.api.v2 import test_base -from neutron.tests.unit.db import test_db_base_plugin_v2 _uuid = uuidutils.generate_uuid diff --git a/neutron/tests/unit/extensions/test_availability_zone.py b/neutron/tests/unit/extensions/test_availability_zone.py index 95d1da458b1..d91a0dd5fdf 100644 --- a/neutron/tests/unit/extensions/test_availability_zone.py +++ b/neutron/tests/unit/extensions/test_availability_zone.py @@ -23,7 +23,7 @@ from neutron.db import db_base_plugin_v2 from neutron.extensions import agent from neutron.extensions import availability_zone as az_ext from neutron.tests.common import helpers -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class AZExtensionManager: diff --git a/neutron/tests/unit/extensions/test_data_plane_status.py b/neutron/tests/unit/extensions/test_data_plane_status.py index a2d9f9fb902..eeab1f5854f 100644 --- a/neutron/tests/unit/extensions/test_data_plane_status.py +++ b/neutron/tests/unit/extensions/test_data_plane_status.py @@ -24,7 +24,7 @@ from neutron_lib.tests.unit import fake_notifier from neutron.db import data_plane_status_db as dps_db from neutron.db import db_base_plugin_v2 from neutron.extensions import data_plane_status as dps_ext -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class DataPlaneStatusTestExtensionManager: diff --git a/neutron/tests/unit/extensions/test_default_subnetpools.py b/neutron/tests/unit/extensions/test_default_subnetpools.py index 43d2aee4ce0..a3a45c2cabe 100644 --- a/neutron/tests/unit/extensions/test_default_subnetpools.py +++ b/neutron/tests/unit/extensions/test_default_subnetpools.py @@ -18,7 +18,7 @@ import webob.exc from neutron.db import db_base_plugin_v2 from neutron.extensions import default_subnetpools -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class DefaultSubnetpoolsExtensionManager: diff --git a/neutron/tests/unit/extensions/test_dns.py b/neutron/tests/unit/extensions/test_dns.py index 2a56ec1e7a2..b725c4b3b31 100644 --- a/neutron/tests/unit/extensions/test_dns.py +++ b/neutron/tests/unit/extensions/test_dns.py @@ -26,7 +26,7 @@ from oslo_config import cfg from neutron.common import utils from neutron.db import db_base_plugin_v2 from neutron.extensions import dns -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.plugins.ml2 import test_plugin diff --git a/neutron/tests/unit/extensions/test_expose_port_forwarding_in_fip.py b/neutron/tests/unit/extensions/test_expose_port_forwarding_in_fip.py index d400d4a9ddc..b96908df86e 100644 --- a/neutron/tests/unit/extensions/test_expose_port_forwarding_in_fip.py +++ b/neutron/tests/unit/extensions/test_expose_port_forwarding_in_fip.py @@ -30,7 +30,7 @@ from neutron.db import l3_fip_qos from neutron.extensions import floating_ip_port_forwarding as pf_ext from neutron.extensions import l3 from neutron.objects.qos import policy -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_l3 diff --git a/neutron/tests/unit/extensions/test_external_net.py b/neutron/tests/unit/extensions/test_external_net.py index 8c1795b32c2..cc76709eb1e 100644 --- a/neutron/tests/unit/extensions/test_external_net.py +++ b/neutron/tests/unit/extensions/test_external_net.py @@ -38,7 +38,7 @@ from neutron.tests.unit.api.v2 import test_base rname = subnet_apidef.COLLECTION_NAME attributes.RESOURCES[rname].update( extsnet_apidef.RESOURCE_ATTRIBUTE_MAP[rname]) -from neutron.tests.unit.db import test_db_base_plugin_v2 # noqa: E402 +from neutron.tests.common import test_db_base_plugin_v2 # noqa: E402 _uuid = uuidutils.generate_uuid diff --git a/neutron/tests/unit/extensions/test_extra_dhcp_opt.py b/neutron/tests/unit/extensions/test_extra_dhcp_opt.py index 01c8e109029..9cfe101a517 100644 --- a/neutron/tests/unit/extensions/test_extra_dhcp_opt.py +++ b/neutron/tests/unit/extensions/test_extra_dhcp_opt.py @@ -22,7 +22,7 @@ import webob.exc from neutron.db import db_base_plugin_v2 from neutron.db import extradhcpopt_db as edo_db -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 DB_PLUGIN_KLASS = ( diff --git a/neutron/tests/unit/extensions/test_flavors.py b/neutron/tests/unit/extensions/test_flavors.py index 48661b76254..46119983dd2 100644 --- a/neutron/tests/unit/extensions/test_flavors.py +++ b/neutron/tests/unit/extensions/test_flavors.py @@ -32,8 +32,8 @@ from neutron.objects import flavor as flavor_obj from neutron.services.flavors import flavors_plugin from neutron.services import provider_configuration as provconf from neutron.tests import base +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.api.v2 import test_base -from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit import dummy_plugin from neutron.tests.unit.extensions import base as extension diff --git a/neutron/tests/unit/extensions/test_l3.py b/neutron/tests/unit/extensions/test_l3.py index 03c6b786c49..812401a0c98 100644 --- a/neutron/tests/unit/extensions/test_l3.py +++ b/neutron/tests/unit/extensions/test_l3.py @@ -61,9 +61,9 @@ from neutron.extensions import l3 from neutron.objects import network as network_obj from neutron.services.revisions import revision_plugin from neutron.tests import base +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.api import test_extensions from neutron.tests.unit.api.v2 import test_base -from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit.extensions import base as test_extensions_base from neutron.tests.unit.extensions import test_agent from neutron.tests.unit.plugins.ml2 import base as ml2_base diff --git a/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py b/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py index 71afabc10ae..41241063eab 100644 --- a/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py +++ b/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py @@ -40,7 +40,7 @@ from neutron.objects import ports as port_obj from neutron.objects import router as l3_obj from neutron.objects import subnet as subnet_obj from neutron.tests import base -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_l3 from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/extensions/test_local_ip.py b/neutron/tests/unit/extensions/test_local_ip.py index ce1e35038dd..bacc2cc70fd 100644 --- a/neutron/tests/unit/extensions/test_local_ip.py +++ b/neutron/tests/unit/extensions/test_local_ip.py @@ -22,7 +22,7 @@ from neutron_lib import constants import webob.exc from neutron.extensions import local_ip as lip_ext -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class LocalIPTestExtensionManager: diff --git a/neutron/tests/unit/extensions/test_network_ip_availability.py b/neutron/tests/unit/extensions/test_network_ip_availability.py index a9a81b14ebb..1f5c793260d 100644 --- a/neutron/tests/unit/extensions/test_network_ip_availability.py +++ b/neutron/tests/unit/extensions/test_network_ip_availability.py @@ -20,7 +20,7 @@ from neutron.api import extensions as api_ext from neutron.common import config from neutron import extensions from neutron.services.network_ip_availability import plugin as plugin_module -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 API_RESOURCE = 'network-ip-availabilities' IP_AVAIL_KEY = 'network_ip_availability' diff --git a/neutron/tests/unit/extensions/test_network_segment_range.py b/neutron/tests/unit/extensions/test_network_segment_range.py index e8475a184a2..36e3fcbfe05 100644 --- a/neutron/tests/unit/extensions/test_network_segment_range.py +++ b/neutron/tests/unit/extensions/test_network_segment_range.py @@ -24,7 +24,7 @@ from neutron.db import db_base_plugin_v2 from neutron.db import segments_db from neutron.extensions import network_segment_range as ext_range from neutron.services.network_segment_range import plugin as plugin_range -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 SERVICE_PLUGIN_KLASS = ('neutron.services.network_segment_range.plugin.' 'NetworkSegmentRangePlugin') diff --git a/neutron/tests/unit/extensions/test_port_device_profile.py b/neutron/tests/unit/extensions/test_port_device_profile.py index 47b6fc7d6f5..f1c79277d72 100644 --- a/neutron/tests/unit/extensions/test_port_device_profile.py +++ b/neutron/tests/unit/extensions/test_port_device_profile.py @@ -18,7 +18,7 @@ from neutron_lib.db import api as db_api from neutron.db import db_base_plugin_v2 from neutron.db import port_device_profile_db as pdp_db -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class PortDeviceProfileExtensionTestPlugin( diff --git a/neutron/tests/unit/extensions/test_port_hardware_offload_type.py b/neutron/tests/unit/extensions/test_port_hardware_offload_type.py index bc9e5f66194..2caabb143b6 100644 --- a/neutron/tests/unit/extensions/test_port_hardware_offload_type.py +++ b/neutron/tests/unit/extensions/test_port_hardware_offload_type.py @@ -21,7 +21,7 @@ from oslo_config import cfg from neutron.db import port_hardware_offload_type_db as phot_db from neutron.objects import ports as ports_obj from neutron.plugins.ml2 import plugin -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class PortHardwareOffloadTypeExtensionTestPlugin( diff --git a/neutron/tests/unit/extensions/test_port_hints.py b/neutron/tests/unit/extensions/test_port_hints.py index 9ebe2de5ab5..07a8eb26cab 100644 --- a/neutron/tests/unit/extensions/test_port_hints.py +++ b/neutron/tests/unit/extensions/test_port_hints.py @@ -18,7 +18,7 @@ from neutron_lib.db import api as db_api from neutron.db import db_base_plugin_v2 from neutron.db import port_hints_db as phints_db -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 HINTS_LIST = [ None, diff --git a/neutron/tests/unit/extensions/test_port_numa_affinity_policy.py b/neutron/tests/unit/extensions/test_port_numa_affinity_policy.py index 72973746a80..0b64c3f93d6 100644 --- a/neutron/tests/unit/extensions/test_port_numa_affinity_policy.py +++ b/neutron/tests/unit/extensions/test_port_numa_affinity_policy.py @@ -20,7 +20,7 @@ from neutron_lib.db import api as db_api from neutron.db import db_base_plugin_v2 from neutron.db import port_numa_affinity_policy_db as pnap_db -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 TESTED_POLICIES = (constants.PORT_NUMA_POLICY_REQUIRED, diff --git a/neutron/tests/unit/extensions/test_port_numa_affinity_policy_socket.py b/neutron/tests/unit/extensions/test_port_numa_affinity_policy_socket.py index 6717c21658a..ecc9bab218e 100644 --- a/neutron/tests/unit/extensions/test_port_numa_affinity_policy_socket.py +++ b/neutron/tests/unit/extensions/test_port_numa_affinity_policy_socket.py @@ -17,7 +17,7 @@ from neutron_lib.api.definitions import port_numa_affinity_policy_socket as \ apidef from neutron_lib import constants -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_port_numa_affinity_policy diff --git a/neutron/tests/unit/extensions/test_port_trusted_vif.py b/neutron/tests/unit/extensions/test_port_trusted_vif.py index bc6fec60702..85c6658eea7 100644 --- a/neutron/tests/unit/extensions/test_port_trusted_vif.py +++ b/neutron/tests/unit/extensions/test_port_trusted_vif.py @@ -20,7 +20,7 @@ from oslo_config import cfg from neutron.db import port_trusted_db from neutron.extensions import port_trusted_vif as apidef from neutron.plugins.ml2 import plugin -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class PortTrustedExtensionTestPlugin( diff --git a/neutron/tests/unit/extensions/test_portsecurity.py b/neutron/tests/unit/extensions/test_portsecurity.py index 62d3277aa65..d320a0f9798 100644 --- a/neutron/tests/unit/extensions/test_portsecurity.py +++ b/neutron/tests/unit/extensions/test_portsecurity.py @@ -30,7 +30,7 @@ from neutron.db import portsecurity_db from neutron.db import securitygroups_db from neutron.extensions import securitygroup as ext_sg from neutron import quota -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_securitygroup DB_PLUGIN_KLASS = ('neutron.tests.unit.extensions.test_portsecurity.' diff --git a/neutron/tests/unit/extensions/test_securitygroup.py b/neutron/tests/unit/extensions/test_securitygroup.py index 65e8b2b6b3d..3b038febb4c 100644 --- a/neutron/tests/unit/extensions/test_securitygroup.py +++ b/neutron/tests/unit/extensions/test_securitygroup.py @@ -43,7 +43,7 @@ from neutron.extensions import security_groups_default_rules as \ from neutron.extensions import securitygroup as ext_sg from neutron.extensions import standardattrdescription from neutron.tests import base -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_address_group DB_PLUGIN_KLASS = ('neutron.tests.unit.extensions.test_securitygroup.' diff --git a/neutron/tests/unit/extensions/test_segment.py b/neutron/tests/unit/extensions/test_segment.py index 7204a75ee35..e64e3615c12 100644 --- a/neutron/tests/unit/extensions/test_segment.py +++ b/neutron/tests/unit/extensions/test_segment.py @@ -52,7 +52,7 @@ from neutron.services.segments import db from neutron.services.segments import exceptions as segment_exc from neutron.services.segments import plugin as seg_plugin from neutron.tests.common import helpers -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 SERVICE_PLUGIN_KLASS = 'neutron.services.segments.plugin.Plugin' TEST_PLUGIN_KLASS = ( diff --git a/neutron/tests/unit/extensions/test_servicetype.py b/neutron/tests/unit/extensions/test_servicetype.py index d10170cb18c..65fc4a32d3d 100644 --- a/neutron/tests/unit/extensions/test_servicetype.py +++ b/neutron/tests/unit/extensions/test_servicetype.py @@ -30,9 +30,9 @@ from neutron.db import servicetype_db as st_db from neutron.extensions import servicetype from neutron.objects import servicetype as servicetype_obj from neutron.services import provider_configuration as provconf +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.api import test_extensions from neutron.tests.unit.api.v2 import test_base -from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit import dummy_plugin as dp from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/extensions/test_subnet_service_types.py b/neutron/tests/unit/extensions/test_subnet_service_types.py index fb4680517ef..bce47e06cf6 100644 --- a/neutron/tests/unit/extensions/test_subnet_service_types.py +++ b/neutron/tests/unit/extensions/test_subnet_service_types.py @@ -19,7 +19,7 @@ from neutron_lib.api.definitions import subnet_service_types \ from neutron.db import db_base_plugin_v2 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 +from neutron.tests.common import test_db_base_plugin_v2 class SubnetServiceTypesExtensionManager: diff --git a/neutron/tests/unit/extensions/test_timestamp.py b/neutron/tests/unit/extensions/test_timestamp.py index 3d86667b47e..64f3aec131e 100644 --- a/neutron/tests/unit/extensions/test_timestamp.py +++ b/neutron/tests/unit/extensions/test_timestamp.py @@ -26,7 +26,7 @@ from neutron.extensions import timestamp from neutron import manager from neutron.objects import network as net_obj from neutron.objects import tag as tag_obj -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class TimeStampExtensionManager: diff --git a/neutron/tests/unit/extensions/test_uplink_status_propagation.py b/neutron/tests/unit/extensions/test_uplink_status_propagation.py index e69d8dd1f90..a489b416b37 100644 --- a/neutron/tests/unit/extensions/test_uplink_status_propagation.py +++ b/neutron/tests/unit/extensions/test_uplink_status_propagation.py @@ -17,7 +17,7 @@ from neutron_lib.db import resource_extend from neutron.db import db_base_plugin_v2 from neutron.db import uplink_status_propagation_db as usp_db -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 class UplinkStatusPropagationExtensionTestPlugin( diff --git a/neutron/tests/unit/extensions/test_vlantransparent.py b/neutron/tests/unit/extensions/test_vlantransparent.py index c103958e935..a27797d0288 100644 --- a/neutron/tests/unit/extensions/test_vlantransparent.py +++ b/neutron/tests/unit/extensions/test_vlantransparent.py @@ -22,7 +22,7 @@ from neutron.db import db_base_plugin_v2 from neutron.db import vlantransparent_db as vlt_db from neutron.extensions import vlantransparent as vlt from neutron import quota -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/ipam/drivers/neutrondb_ipam/test_driver.py b/neutron/tests/unit/ipam/drivers/neutrondb_ipam/test_driver.py index ad469e9d6bc..80abb78bc0c 100644 --- a/neutron/tests/unit/ipam/drivers/neutrondb_ipam/test_driver.py +++ b/neutron/tests/unit/ipam/drivers/neutrondb_ipam/test_driver.py @@ -26,7 +26,7 @@ from neutron.ipam.drivers.neutrondb_ipam import driver from neutron.ipam import exceptions as ipam_exc from neutron.ipam import requests as ipam_req from neutron.objects import ipam as ipam_obj -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_plugin +from neutron.tests.common import test_db_base_plugin_v2 as test_db_plugin from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/ipam/test_subnet_alloc.py b/neutron/tests/unit/ipam/test_subnet_alloc.py index 46544b867f2..e090aec3bf2 100644 --- a/neutron/tests/unit/ipam/test_subnet_alloc.py +++ b/neutron/tests/unit/ipam/test_subnet_alloc.py @@ -26,7 +26,7 @@ from oslo_utils import uuidutils from neutron.ipam import requests as ipam_req from neutron.ipam import subnet_alloc -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/objects/test_base.py b/neutron/tests/unit/objects/test_base.py index 167b0d48065..e1a9cad8b2c 100644 --- a/neutron/tests/unit/objects/test_base.py +++ b/neutron/tests/unit/objects/test_base.py @@ -58,8 +58,8 @@ from neutron.objects import stdattrs from neutron.objects import subnet from neutron.objects import subnetpool from neutron.tests import base as test_base +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests import tools -from neutron.tests.unit.db import test_db_base_plugin_v2 SQLALCHEMY_COMMIT = 'sqlalchemy.engine.Connection._commit_impl' diff --git a/neutron/tests/unit/plugins/ml2/test_plugin.py b/neutron/tests/unit/plugins/ml2/test_plugin.py index 4983a0eb018..ffee79ef675 100644 --- a/neutron/tests/unit/plugins/ml2/test_plugin.py +++ b/neutron/tests/unit/plugins/ml2/test_plugin.py @@ -74,10 +74,10 @@ from neutron.services.revisions import revision_plugin from neutron.services.segments import db as segments_plugin_db from neutron.services.segments import plugin as segments_plugin from neutron.tests.common import helpers +from neutron.tests.common import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit import _test_extension_portbindings as test_bindings from neutron.tests.unit.agent import test_securitygroups_rpc as test_sg_rpc from neutron.tests.unit.db import test_allowedaddresspairs_db as test_pair -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit.db import test_ipam_pluggable_backend as test_ipam from neutron.tests.unit.extensions import test_extra_dhcp_opt as test_dhcpopts from neutron.tests.unit.plugins.ml2.drivers import mechanism_logger as \ diff --git a/neutron/tests/unit/plugins/ml2/test_port_binding.py b/neutron/tests/unit/plugins/ml2/test_port_binding.py index 3a81e244066..7169210cf0f 100644 --- a/neutron/tests/unit/plugins/ml2/test_port_binding.py +++ b/neutron/tests/unit/plugins/ml2/test_port_binding.py @@ -34,7 +34,7 @@ from neutron.conf.plugins.ml2.drivers import driver_type from neutron.plugins.ml2 import driver_context from neutron.plugins.ml2 import models as ml2_models from neutron.plugins.ml2 import plugin as ml2_plugin -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin +from neutron.tests.common import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit.plugins.ml2.drivers import mechanism_test diff --git a/neutron/tests/unit/plugins/ml2/test_tracked_resources.py b/neutron/tests/unit/plugins/ml2/test_tracked_resources.py index 1ecf0751117..f320667a2a3 100644 --- a/neutron/tests/unit/plugins/ml2/test_tracked_resources.py +++ b/neutron/tests/unit/plugins/ml2/test_tracked_resources.py @@ -20,8 +20,8 @@ from oslo_utils import uuidutils from neutron.conf import quota as quota_conf from neutron.db.quota import api as quota_db_api from neutron import quota +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.api import test_extensions -from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_l3 from neutron.tests.unit.extensions import test_securitygroup from neutron.tests.unit.plugins.ml2 import base as ml2_base diff --git a/neutron/tests/unit/scheduler/test_l3_agent_scheduler.py b/neutron/tests/unit/scheduler/test_l3_agent_scheduler.py index 1d5dfa48ecc..da9df7bb084 100644 --- a/neutron/tests/unit/scheduler/test_l3_agent_scheduler.py +++ b/neutron/tests/unit/scheduler/test_l3_agent_scheduler.py @@ -57,7 +57,7 @@ from neutron import quota from neutron.scheduler import l3_agent_scheduler from neutron.tests import base from neutron.tests.common import helpers -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_l3 from neutron.tests.unit import testlib_api diff --git a/neutron/tests/unit/services/metering/test_metering_plugin.py b/neutron/tests/unit/services/metering/test_metering_plugin.py index 1bcb5c96493..218bb4d4391 100644 --- a/neutron/tests/unit/services/metering/test_metering_plugin.py +++ b/neutron/tests/unit/services/metering/test_metering_plugin.py @@ -32,8 +32,8 @@ from neutron.extensions import l3 as ext_l3 from neutron.extensions import metering as ext_metering from neutron.objects import agent as agent_obj from neutron.tests.common import helpers +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.db.metering import test_metering_db -from neutron.tests.unit.db import test_db_base_plugin_v2 from neutron.tests.unit.extensions import test_l3 diff --git a/neutron/tests/unit/services/network_segment_range/test_plugin.py b/neutron/tests/unit/services/network_segment_range/test_plugin.py index e0415b6e97b..f5c2e41028f 100644 --- a/neutron/tests/unit/services/network_segment_range/test_plugin.py +++ b/neutron/tests/unit/services/network_segment_range/test_plugin.py @@ -22,7 +22,7 @@ from oslo_config import cfg from neutron.db import segments_db from neutron.services.network_segment_range import plugin as range_plugin -from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin +from neutron.tests.common import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit import testlib_api SERVICE_PLUGIN_KLASS = ('neutron.services.network_segment_range.plugin.' diff --git a/neutron/tests/unit/services/qos/test_qos_plugin.py b/neutron/tests/unit/services/qos/test_qos_plugin.py index 0fcaf8e6f54..8b459aea5e1 100644 --- a/neutron/tests/unit/services/qos/test_qos_plugin.py +++ b/neutron/tests/unit/services/qos/test_qos_plugin.py @@ -43,7 +43,7 @@ from neutron.objects import ports as ports_object from neutron.objects.qos import policy as policy_object from neutron.objects.qos import rule as rule_object from neutron.services.qos import qos_plugin -from neutron.tests.unit.db import test_db_base_plugin_v2 +from neutron.tests.common import test_db_base_plugin_v2 from neutron.tests.unit.services.qos import base