Rename imports based on neutron tests reorganization.
Co-Authored-By: Doug Wiegley <dougw@a10networks.com> Change-Id: Ieaacc08e27567afe3710a6836bc42810f184ce73 Depends-On: If307593259139171be21a71c58e3a34bf148cc7f Related-Bug: #1440834
This commit is contained in:
parent
5dc8fe6c3b
commit
f759bf0027
|
@ -15,9 +15,9 @@
|
|||
#
|
||||
|
||||
from neutron.tests import base as n_base
|
||||
from neutron.tests.unit import test_api_v2_extension
|
||||
from neutron.tests.unit import test_db_plugin
|
||||
from neutron.tests.unit import test_quota_ext
|
||||
from neutron.tests.unit.db import test_db_base_plugin_v2
|
||||
from neutron.tests.unit.extensions import base as ext_base
|
||||
from neutron.tests.unit.extensions import test_quotasv2
|
||||
from neutron.tests.unit import testlib_api
|
||||
from testtools import matchers
|
||||
|
||||
|
@ -26,7 +26,9 @@ class BaseTestCase(n_base.BaseTestCase):
|
|||
pass
|
||||
|
||||
|
||||
class NeutronDbPluginV2TestCase(test_db_plugin.NeutronDbPluginV2TestCase):
|
||||
class NeutronDbPluginV2TestCase(
|
||||
test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
|
||||
|
||||
def new_list_request(self, resource, fmt=None, params=None, id=None,
|
||||
subresource=None):
|
||||
return self._req(
|
||||
|
@ -177,9 +179,9 @@ class NeutronDbPluginV2TestCase(test_db_plugin.NeutronDbPluginV2TestCase):
|
|||
self.assertEqual(expected_res, [n['id'] for n in item_res])
|
||||
|
||||
|
||||
class ExtensionTestCase(test_api_v2_extension.ExtensionTestCase):
|
||||
class ExtensionTestCase(ext_base.ExtensionTestCase):
|
||||
pass
|
||||
|
||||
|
||||
class QuotaExtensionTestCase(test_quota_ext.QuotaExtensionTestCase):
|
||||
class QuotaExtensionTestCase(test_quotasv2.QuotaExtensionTestCase):
|
||||
pass
|
||||
|
|
|
@ -24,7 +24,7 @@ from neutron.db import servicetype_db as sdb
|
|||
from neutron import manager
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.services import provider_configuration as pconf
|
||||
from neutron.tests.unit import test_db_plugin
|
||||
from neutron.tests.unit.db import test_db_base_plugin_v2
|
||||
from oslo_config import cfg
|
||||
import testtools
|
||||
import webob.exc
|
||||
|
@ -200,8 +200,11 @@ class LoadBalancerTestMixin(object):
|
|||
if not fmt:
|
||||
fmt = self.fmt
|
||||
|
||||
with test_db_plugin.optional_ctx(subnet, self.subnet) as tmp_subnet:
|
||||
with test_db_plugin.optional_ctx(pool, self.pool) as tmp_pool:
|
||||
with test_db_base_plugin_v2.optional_ctx(
|
||||
subnet, self.subnet) as tmp_subnet:
|
||||
with test_db_base_plugin_v2.optional_ctx(
|
||||
pool, self.pool) as tmp_pool:
|
||||
|
||||
pool_id = tmp_pool['pool']['id']
|
||||
res = self._create_vip(fmt,
|
||||
name,
|
||||
|
|
|
@ -26,7 +26,7 @@ import neutron.db.l3_db # noqa
|
|||
from neutron.db import servicetype_db as sdb
|
||||
from neutron.openstack.common import uuidutils
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.tests.unit import test_db_plugin
|
||||
from neutron.tests.unit.db import test_db_base_plugin_v2
|
||||
from oslo_config import cfg
|
||||
import testtools
|
||||
import webob.exc
|
||||
|
@ -180,7 +180,9 @@ class LbaasTestMixin(object):
|
|||
if not fmt:
|
||||
fmt = self.fmt
|
||||
|
||||
with test_db_plugin.optional_ctx(subnet, self.subnet) as tmp_subnet:
|
||||
with test_db_base_plugin_v2.optional_ctx(
|
||||
subnet, self.subnet) as tmp_subnet:
|
||||
|
||||
res = self._create_loadbalancer(fmt,
|
||||
tmp_subnet['subnet']['id'],
|
||||
**kwargs)
|
||||
|
@ -240,7 +242,9 @@ class LbaasTestMixin(object):
|
|||
if not fmt:
|
||||
fmt = self.fmt
|
||||
subnet = subnet or self.test_subnet
|
||||
with test_db_plugin.optional_ctx(subnet, self.subnet) as tmp_subnet:
|
||||
with test_db_base_plugin_v2.optional_ctx(
|
||||
subnet, self.subnet) as tmp_subnet:
|
||||
|
||||
res = self._create_member(fmt,
|
||||
pool_id=pool_id,
|
||||
address=address,
|
||||
|
|
|
@ -22,9 +22,9 @@ from neutron.db import servicetype_db as st_db
|
|||
from neutron.extensions import agent
|
||||
from neutron import manager
|
||||
from neutron.plugins.common import constants as plugin_const
|
||||
from neutron.tests.unit.openvswitch import test_agent_scheduler
|
||||
from neutron.tests.unit import test_agent_ext_plugin
|
||||
from neutron.tests.unit import test_extensions
|
||||
from neutron.tests.unit.api import test_extensions
|
||||
from neutron.tests.unit.extensions import test_agent
|
||||
from neutron.tests.unit.plugins.openvswitch import test_agent_scheduler
|
||||
from oslo_config import cfg
|
||||
from webob import exc
|
||||
|
||||
|
@ -56,7 +56,7 @@ class AgentSchedulerTestMixIn(test_agent_scheduler.AgentSchedulerTestMixIn):
|
|||
admin_context=admin_context)
|
||||
|
||||
|
||||
class LBaaSAgentSchedulerTestCase(test_agent_ext_plugin.AgentDBTestMixIn,
|
||||
class LBaaSAgentSchedulerTestCase(test_agent.AgentDBTestMixIn,
|
||||
AgentSchedulerTestMixIn,
|
||||
test_db_loadbalancer.LoadBalancerTestMixin,
|
||||
base.NeutronDbPluginV2TestCase):
|
||||
|
|
|
@ -19,7 +19,7 @@ import mock
|
|||
from neutron.api.v2 import attributes as attr
|
||||
from neutron.openstack.common import uuidutils
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.tests.unit import test_api_v2
|
||||
from neutron.tests.unit.api.v2 import test_base
|
||||
from webob import exc
|
||||
|
||||
from neutron_lbaas.extensions import loadbalancer
|
||||
|
@ -28,7 +28,7 @@ from neutron_lbaas.tests import base
|
|||
|
||||
|
||||
_uuid = uuidutils.generate_uuid
|
||||
_get_path = test_api_v2._get_path
|
||||
_get_path = test_base._get_path
|
||||
|
||||
|
||||
class LoadBalancerExtensionTestCase(base.ExtensionTestCase):
|
||||
|
@ -831,8 +831,8 @@ class LoadBalancerExtensionV2TestCase(base.ExtensionTestCase):
|
|||
def test_pool_member_delete(self):
|
||||
entity_id = _uuid()
|
||||
res = self.api.delete(
|
||||
test_api_v2._get_path('lbaas/pools/pid1/members',
|
||||
id=entity_id, fmt=self.fmt))
|
||||
test_base._get_path('lbaas/pools/pid1/members',
|
||||
id=entity_id, fmt=self.fmt))
|
||||
delete_entity = getattr(self.plugin.return_value,
|
||||
"delete_pool_member")
|
||||
delete_entity.assert_called_with(mock.ANY, entity_id,
|
||||
|
@ -949,8 +949,8 @@ class LoadBalancerExtensionV2TestCase(base.ExtensionTestCase):
|
|||
def test_health_monitor_delete(self):
|
||||
entity_id = _uuid()
|
||||
res = self.api.delete(
|
||||
test_api_v2._get_path('lbaas/healthmonitors',
|
||||
id=entity_id, fmt=self.fmt))
|
||||
test_base._get_path('lbaas/healthmonitors',
|
||||
id=entity_id, fmt=self.fmt))
|
||||
delete_entity = getattr(self.plugin.return_value,
|
||||
"delete_healthmonitor")
|
||||
delete_entity.assert_called_with(mock.ANY, entity_id)
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
|
||||
from neutron import context
|
||||
from neutron import quota
|
||||
from neutron.tests.unit import test_api_v2
|
||||
from neutron.tests.unit.api.v2 import test_base
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron_lbaas.tests import base
|
||||
|
||||
_get_path = test_api_v2._get_path
|
||||
_get_path = test_base._get_path
|
||||
|
||||
|
||||
class LBaaSQuotaExtensionTestCase(base.QuotaExtensionTestCase):
|
||||
|
|
|
@ -25,10 +25,10 @@ from neutron.db import servicetype_db as st_db
|
|||
from neutron.extensions import agent
|
||||
from neutron import manager
|
||||
from neutron.plugins.common import constants as plugin_const
|
||||
from neutron.tests.unit.api import test_extensions
|
||||
import neutron.tests.unit.extensions
|
||||
from neutron.tests.unit.openvswitch import test_agent_scheduler
|
||||
from neutron.tests.unit import test_agent_ext_plugin
|
||||
from neutron.tests.unit import test_extensions
|
||||
from neutron.tests.unit.extensions import test_agent
|
||||
from neutron.tests.unit.plugins.openvswitch import test_agent_scheduler
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import timeutils
|
||||
from webob import exc
|
||||
|
@ -63,7 +63,7 @@ class AgentSchedulerTestMixIn(test_agent_scheduler.AgentSchedulerTestMixIn):
|
|||
admin_context=admin_context)
|
||||
|
||||
|
||||
class LBaaSAgentSchedulerTestCase(test_agent_ext_plugin.AgentDBTestMixIn,
|
||||
class LBaaSAgentSchedulerTestCase(test_agent.AgentDBTestMixIn,
|
||||
AgentSchedulerTestMixIn,
|
||||
test_db_loadbalancerv2.LbaasTestMixin,
|
||||
base.NeutronDbPluginV2TestCase):
|
||||
|
@ -76,13 +76,13 @@ class LBaaSAgentSchedulerTestCase(test_agent_ext_plugin.AgentDBTestMixIn,
|
|||
if lbaas_agents:
|
||||
lbaas_hosta = {
|
||||
'binary': 'neutron-loadbalancer-agent',
|
||||
'host': test_agent_ext_plugin.LBAAS_HOSTA,
|
||||
'host': test_agent.LBAAS_HOSTA,
|
||||
'topic': 'LOADBALANCER_AGENT',
|
||||
'configurations': {'device_drivers': [
|
||||
plugin_driver.HaproxyOnHostPluginDriver.device_driver]},
|
||||
'agent_type': lb_const.AGENT_TYPE_LOADBALANCERV2}
|
||||
lbaas_hostb = copy.deepcopy(lbaas_hosta)
|
||||
lbaas_hostb['host'] = test_agent_ext_plugin.LBAAS_HOSTB
|
||||
lbaas_hostb['host'] = test_agent.LBAAS_HOSTB
|
||||
callback = agents_db.AgentExtRpcCallback()
|
||||
callback.report_state(self.adminContext,
|
||||
agent_state={'agent_state': lbaas_hosta},
|
||||
|
|
Loading…
Reference in New Issue