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:
Boden R 2017-06-27 12:35:40 -06:00
parent eaf4bfabbd
commit 9b0f35e1d0
4 changed files with 6 additions and 7 deletions

View File

@ -464,7 +464,7 @@ class VPNPluginDbTestCase(VPNTestMixin,
self.plugin = vpn_plugin.VPNPlugin()
ext_mgr = api_extensions.PluginAwareExtensionManager(
extensions_path,
{lib_constants.CORE: self.core_plugin,
{nconstants.CORE: self.core_plugin,
nconstants.VPN: self.plugin}
)
app = config.load_paste_app('extensions_test_app')
@ -1763,7 +1763,7 @@ class TestVpnDatabase(base.NeutronDbPluginV2TestCase, NeutronResourcesMixin):
super(TestVpnDatabase, self).setUp(self.plugin_str)
# Get the plugins
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
self.plugin = vpn_db.VPNPluginDb()

View File

@ -18,7 +18,6 @@ import socket
from neutron.db import l3_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 exceptions as nexception
from neutron_lib.plugins import constants as nconstants
@ -77,8 +76,8 @@ class TestIPsecDriverValidation(base.BaseTestCase):
super(TestIPsecDriverValidation, self).setUp()
self.l3_plugin = mock.Mock()
self.core_plugin = mock.Mock()
directory.add_plugin(lconstants.CORE, self.core_plugin)
directory.add_plugin(lconstants.L3, self.l3_plugin)
directory.add_plugin(nconstants.CORE, self.core_plugin)
directory.add_plugin(nconstants.L3, self.l3_plugin)
self.context = n_ctx.Context('some_user', 'some_tenant')
self.service_plugin = mock.Mock()
self.validator = vpn_validator.IpsecVpnValidator(self.service_plugin)

View File

@ -15,8 +15,8 @@
import mock
from neutron_lib import constants
from neutron_lib import context as n_ctx
from neutron_lib.plugins import constants
from neutron_lib.plugins import directory
from oslo_utils import uuidutils

View File

@ -15,8 +15,8 @@
#
import mock
from neutron_lib import constants
from neutron_lib import context as n_ctx
from neutron_lib.plugins import constants
from neutron_lib.plugins import directory
from oslo_utils import uuidutils