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: Ia06bf40009b69b4d3cd91057e474dee0f089ad92
This commit is contained in:
parent
359ad4131e
commit
5d0eed5dd7
|
@ -26,6 +26,7 @@ from neutron_lib.api.definitions import portbindings
|
||||||
from neutron_lib.api.definitions import provider_net
|
from neutron_lib.api.definitions import provider_net
|
||||||
import neutron_lib.constants as q_constants
|
import neutron_lib.constants as q_constants
|
||||||
import neutron_lib.exceptions as q_lib_exc
|
import neutron_lib.exceptions as q_lib_exc
|
||||||
|
from neutron_lib.plugins import constants as plugin_constants
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
|
|
||||||
import neutron.conf.common as q_config
|
import neutron.conf.common as q_config
|
||||||
|
@ -780,7 +781,7 @@ def fake_get_instance(cls, subnet_pool, context):
|
||||||
return FakePool(subnet_pool, context)
|
return FakePool(subnet_pool, context)
|
||||||
|
|
||||||
|
|
||||||
def fake_get_plugin(alias=q_constants.CORE):
|
def fake_get_plugin(alias=plugin_constants.CORE):
|
||||||
return FakePlugin()
|
return FakePlugin()
|
||||||
|
|
||||||
|
|
||||||
|
@ -833,7 +834,7 @@ class PluginTest(unittest.TestCase,
|
||||||
TOP_VXLANALLOCATIONS.append(
|
TOP_VXLANALLOCATIONS.append(
|
||||||
test_utils.DotDict({'vxlan_vni': vxlan, 'allocated': False}))
|
test_utils.DotDict({'vxlan_vni': vxlan, 'allocated': False}))
|
||||||
|
|
||||||
def fake_get_plugin(alias=q_constants.CORE):
|
def fake_get_plugin(alias=plugin_constants.CORE):
|
||||||
if alias == 'trunk':
|
if alias == 'trunk':
|
||||||
return FakeTrunkPlugin()
|
return FakeTrunkPlugin()
|
||||||
return FakePlugin()
|
return FakePlugin()
|
||||||
|
|
Loading…
Reference in New Issue