use service type constants from neutron_lib plugins
The well known service type constants are in neutron_lib.plugins.constants, but for legacy reasons a few still exist and are referenced from neutron_lib.constants [1] that we'd like to remove. This patch switches references over to neutron_lib's plugin constants. [1] https://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L353 Change-Id: Ib44f6fb67a1232eceb300e0c8c65b9beb0a899af
This commit is contained in:
parent
eaf4bfabbd
commit
9b0f35e1d0
|
@ -464,7 +464,7 @@ class VPNPluginDbTestCase(VPNTestMixin,
|
||||||
self.plugin = vpn_plugin.VPNPlugin()
|
self.plugin = vpn_plugin.VPNPlugin()
|
||||||
ext_mgr = api_extensions.PluginAwareExtensionManager(
|
ext_mgr = api_extensions.PluginAwareExtensionManager(
|
||||||
extensions_path,
|
extensions_path,
|
||||||
{lib_constants.CORE: self.core_plugin,
|
{nconstants.CORE: self.core_plugin,
|
||||||
nconstants.VPN: self.plugin}
|
nconstants.VPN: self.plugin}
|
||||||
)
|
)
|
||||||
app = config.load_paste_app('extensions_test_app')
|
app = config.load_paste_app('extensions_test_app')
|
||||||
|
@ -1763,7 +1763,7 @@ class TestVpnDatabase(base.NeutronDbPluginV2TestCase, NeutronResourcesMixin):
|
||||||
super(TestVpnDatabase, self).setUp(self.plugin_str)
|
super(TestVpnDatabase, self).setUp(self.plugin_str)
|
||||||
# Get the plugins
|
# Get the plugins
|
||||||
self.core_plugin = directory.get_plugin()
|
self.core_plugin = directory.get_plugin()
|
||||||
self.l3_plugin = directory.get_plugin(lib_constants.L3)
|
self.l3_plugin = directory.get_plugin(nconstants.L3)
|
||||||
|
|
||||||
# Create VPN database instance
|
# Create VPN database instance
|
||||||
self.plugin = vpn_db.VPNPluginDb()
|
self.plugin = vpn_db.VPNPluginDb()
|
||||||
|
|
|
@ -18,7 +18,6 @@ import socket
|
||||||
|
|
||||||
from neutron.db import l3_db
|
from neutron.db import l3_db
|
||||||
from neutron.db import servicetype_db as st_db
|
from neutron.db import servicetype_db as st_db
|
||||||
from neutron_lib import constants as lconstants
|
|
||||||
from neutron_lib import context as n_ctx
|
from neutron_lib import context as n_ctx
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
from neutron_lib.plugins import constants as nconstants
|
from neutron_lib.plugins import constants as nconstants
|
||||||
|
@ -77,8 +76,8 @@ class TestIPsecDriverValidation(base.BaseTestCase):
|
||||||
super(TestIPsecDriverValidation, self).setUp()
|
super(TestIPsecDriverValidation, self).setUp()
|
||||||
self.l3_plugin = mock.Mock()
|
self.l3_plugin = mock.Mock()
|
||||||
self.core_plugin = mock.Mock()
|
self.core_plugin = mock.Mock()
|
||||||
directory.add_plugin(lconstants.CORE, self.core_plugin)
|
directory.add_plugin(nconstants.CORE, self.core_plugin)
|
||||||
directory.add_plugin(lconstants.L3, self.l3_plugin)
|
directory.add_plugin(nconstants.L3, self.l3_plugin)
|
||||||
self.context = n_ctx.Context('some_user', 'some_tenant')
|
self.context = n_ctx.Context('some_user', 'some_tenant')
|
||||||
self.service_plugin = mock.Mock()
|
self.service_plugin = mock.Mock()
|
||||||
self.validator = vpn_validator.IpsecVpnValidator(self.service_plugin)
|
self.validator = vpn_validator.IpsecVpnValidator(self.service_plugin)
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from neutron_lib import constants
|
|
||||||
from neutron_lib import context as n_ctx
|
from neutron_lib import context as n_ctx
|
||||||
|
from neutron_lib.plugins import constants
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from neutron_lib import constants
|
|
||||||
from neutron_lib import context as n_ctx
|
from neutron_lib import context as n_ctx
|
||||||
|
from neutron_lib.plugins import constants
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue