From ec829f9384547864aebb56390da8e17df7051aac Mon Sep 17 00:00:00 2001 From: Boden R Date: Mon, 8 Jan 2018 09:56:31 -0700 Subject: [PATCH] remove CORE and L3 from neutron_lib.constants The CORE and L3 service type name constants are defined in both neutron_lib.constants and neutron_lib.plugin.constants. The later is the desired location for them and this patch formalizes that by removing them from the former. Change-Id: I5cbe779b401e5214f414ab1c732867fdd4d75651 --- neutron_lib/constants.py | 11 ----------- neutron_lib/plugins/directory.py | 2 +- .../notes/rm-dup-pluginconst-085d0fcee4e931b8.yaml | 5 +++++ 3 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 releasenotes/notes/rm-dup-pluginconst-085d0fcee4e931b8.yaml diff --git a/neutron_lib/constants.py b/neutron_lib/constants.py index 03b1e4e49..09673f425 100644 --- a/neutron_lib/constants.py +++ b/neutron_lib/constants.py @@ -367,14 +367,3 @@ VHOST_USER_DEVICE_PREFIX = 'vhu' VETH_DEVICE_PREFIX = 'qvo' # prefix for SNAT interface in DVR SNAT_INT_DEV_PREFIX = 'sg-' - - -########################## -# Plugin related constants -########################## -# Plugin constants that are universally used across all neutron repos. -# The alias for the core plugin. -# TODO(boden): remove and replace consumer usage with plugins/constants.py -CORE = 'CORE' -# The alias for the L3 plugin. -L3 = 'L3_ROUTER_NAT' diff --git a/neutron_lib/plugins/directory.py b/neutron_lib/plugins/directory.py index 498556c97..fa75016ca 100644 --- a/neutron_lib/plugins/directory.py +++ b/neutron_lib/plugins/directory.py @@ -16,7 +16,7 @@ import weakref from oslo_concurrency import lockutils -from neutron_lib import constants +from neutron_lib.plugins import constants _synchronized = lockutils.synchronized_with_prefix("neutron-") diff --git a/releasenotes/notes/rm-dup-pluginconst-085d0fcee4e931b8.yaml b/releasenotes/notes/rm-dup-pluginconst-085d0fcee4e931b8.yaml new file mode 100644 index 000000000..eb9dfc7df --- /dev/null +++ b/releasenotes/notes/rm-dup-pluginconst-085d0fcee4e931b8.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - The ``CORE`` and ``L3`` service type name constants have been removed + from ``neutron_lib.constants``. These constants are duplicates of those + in ``neutron_lib.plugin.constants`` and consumers should use the latter.