Retire deprecations for constants, exceptions, attributes
Subprojects have had enough time to switch to neutron-lib for the deprecated items from these modules. Change-Id: Ib2f4acf7e0153667389c57a52f2db33a23758b24
This commit is contained in:
parent
efe87156c5
commit
b0e56ac646
@ -20,14 +20,11 @@ import six
|
||||
import webob.exc
|
||||
|
||||
from neutron._i18n import _
|
||||
from neutron.common import _deprecate
|
||||
|
||||
|
||||
# Defining a constant to avoid repeating string literal in several modules
|
||||
SHARED = 'shared'
|
||||
|
||||
_deprecate._moved_global('UNLIMITED', new_module=lib_validators)
|
||||
|
||||
# TODO(HenryG): use DB field sizes (neutron-lib 0.1.1)
|
||||
NAME_MAX_LEN = 255
|
||||
TENANT_ID_MAX_LEN = 255
|
||||
@ -36,11 +33,6 @@ LONG_DESCRIPTION_MAX_LEN = 1024
|
||||
DEVICE_ID_MAX_LEN = 255
|
||||
DEVICE_OWNER_MAX_LEN = 255
|
||||
|
||||
_deprecate._moved_global('MAC_PATTERN', new_module=lib_validators)
|
||||
|
||||
_deprecate._moved_global('validators', new_module=lib_validators)
|
||||
|
||||
|
||||
# Define constants for base resource name
|
||||
NETWORK = 'network'
|
||||
NETWORKS = '%ss' % NETWORK
|
||||
@ -433,14 +425,3 @@ def verify_attributes(res_dict, attr_info):
|
||||
if extra_keys:
|
||||
msg = _("Unrecognized attribute(s) '%s'") % ', '.join(extra_keys)
|
||||
raise webob.exc.HTTPBadRequest(msg)
|
||||
|
||||
|
||||
# Shim added to move the following to neutron_lib.constants:
|
||||
# ATTR_NOT_SPECIFIED
|
||||
# HEX_ELEM
|
||||
# UUID_PATTERN
|
||||
#
|
||||
# Neutron-lib migration shim. This will emit a deprecation warning on any
|
||||
# reference to constants that have been moved out of this module and into
|
||||
# the neutron_lib.constants module.
|
||||
_deprecate._MovedGlobals(constants)
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
from neutron_lib import constants as lib_constants
|
||||
|
||||
from neutron.common import _deprecate
|
||||
|
||||
|
||||
ROUTER_PORT_OWNERS = lib_constants.ROUTER_INTERFACE_OWNERS_SNAT + \
|
||||
(lib_constants.DEVICE_OWNER_ROUTER_GW,)
|
||||
@ -137,9 +135,3 @@ PRIVATE_CIDR_RANGE = '169.254.0.0/16'
|
||||
DVR_FIP_LL_CIDR = '169.254.64.0/18'
|
||||
L3_HA_NET_CIDR = '169.254.192.0/18'
|
||||
METADATA_CIDR = '169.254.169.254/32'
|
||||
|
||||
|
||||
# Neutron-lib migration shim. This will emit a deprecation warning on any
|
||||
# reference to constants that have been moved out of this module and into
|
||||
# the neutron_lib.constants module.
|
||||
_deprecate._MovedGlobals(lib_constants)
|
||||
|
@ -16,7 +16,6 @@
|
||||
from neutron_lib import exceptions as e
|
||||
|
||||
from neutron._i18n import _
|
||||
from neutron.common import _deprecate
|
||||
|
||||
|
||||
class SubnetPoolNotFound(e.NotFound):
|
||||
@ -310,9 +309,3 @@ class TenantQuotaNotFound(e.NotFound):
|
||||
|
||||
class TenantIdProjectIdFilterConflict(e.BadRequest):
|
||||
message = _("Both tenant_id and project_id passed as filters.")
|
||||
|
||||
|
||||
# Neutron-lib migration shim. This will emit a deprecation warning on any
|
||||
# reference to exceptions that have been moved out of this module and into
|
||||
# the neutron_lib.exceptions module.
|
||||
_deprecate._MovedGlobals(e)
|
||||
|
@ -22,7 +22,7 @@ from neutron._i18n import _, _LE, _LI
|
||||
from neutron.agent.common import config
|
||||
from neutron.agent.linux import interface
|
||||
from neutron.agent.linux import iptables_manager
|
||||
from neutron.common import constants as constants
|
||||
from neutron.common import constants
|
||||
from neutron.common import ipv6_utils
|
||||
from neutron.services.metering.drivers import abstract_driver
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
from neutron_lib import constants
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest import test
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.tests.tempest.api import base
|
||||
from neutron.tests.tempest import config
|
||||
|
||||
|
@ -18,12 +18,6 @@ Check for globals that are now available in neutron-lib
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from neutron_lib import constants as lconst
|
||||
from neutron_lib import exceptions as lexc
|
||||
|
||||
from neutron.common import constants as nconst
|
||||
from neutron.common import exceptions as nexc
|
||||
|
||||
|
||||
def check_globals(things, nmod, lmod):
|
||||
core = vars(nmod)['_mg__my_globals']
|
||||
@ -41,8 +35,7 @@ def check_globals(things, nmod, lmod):
|
||||
|
||||
|
||||
def main():
|
||||
check_globals('constants', nconst, lconst)
|
||||
check_globals('exceptions', nexc, lexc)
|
||||
"""Currently no globals are deprecated."""
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user