Fix deprecation warnings with _ in _i18n

Deprecation warnings began popping up in tox tests. We needed
to import the _ function from neutron._i18n . We can no longer use
the built in _ function.

ATTR_NOT_SPECIFIED was moved from neutron.api.v2 to
neutron_lib.constants . Changed imports to resolve
the deprecation warning.

JIRA:NCP-2058
Change-Id: I78d66de235d827ab8eeb53e4c48f38c233b73d10
This commit is contained in:
Kyle Haley 2016-08-30 07:41:59 -07:00
parent 6a56ce2e60
commit 68af52752a
20 changed files with 21 additions and 4 deletions

View File

@ -17,6 +17,7 @@ import random
import sys
import time
from neutron._i18n import _
from neutron.common import config
from neutron.common import utils as n_utils
from oslo_config import cfg

View File

@ -14,6 +14,7 @@
# under the License.
import netaddr
from neutron._i18n import _
from neutron.common import exceptions as n_exc_ext
from oslo_log import log as logging

View File

@ -43,6 +43,7 @@ NOTE: assumes that the beginning of a billing cycle is midnight.
"""
import datetime
from neutron._i18n import _
from neutron.common import rpc as n_rpc
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -18,6 +18,7 @@ import json
import string
import netaddr
from neutron._i18n import _
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron._i18n import _
from oslo_config import cfg
from quark.drivers.registry import DriverRegistryBase

View File

@ -21,6 +21,7 @@ import contextlib
import random
import aiclib
from neutron._i18n import _
from neutron.extensions import securitygroup as sg_ext
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -20,6 +20,8 @@ Unicorn driver for Quark
import json
import requests
from neutron._i18n import _
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -12,6 +12,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron._i18n import _
from neutron_lib import exceptions as n_exc

View File

@ -24,6 +24,7 @@ import time
import uuid
import netaddr
from neutron._i18n import _
from neutron.common import exceptions as n_exc_ext
from neutron_lib import exceptions as n_exc
from oslo_concurrency import lockutils

View File

@ -15,6 +15,7 @@
import json
from neutron._i18n import _
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -17,6 +17,7 @@
v2 Neutron Plug-in API Quark Implementation
"""
from neutron._i18n import _
from neutron.extensions import securitygroup as sg_ext
from neutron import neutron_plugin_base_v2
from neutron.quota import resource as qres

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron._i18n import _
from neutron_lib import exceptions as n_exc
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron._i18n import _
from neutron_lib import exceptions as n_exc
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron._i18n import _
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -14,6 +14,7 @@
# under the License.
import netaddr
from neutron._i18n import _
from neutron.common import config as neutron_cfg
from neutron import quota
from neutron_lib import exceptions as n_exc

View File

@ -18,6 +18,7 @@ View Helpers for Quark Plugin
"""
import netaddr
from neutron._i18n import _
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -15,7 +15,7 @@
import mock
import netaddr
from neutron.api.v2 import attributes as neutron_attrs
from neutron_lib import constants as neutron_attrs
from neutron_lib import exceptions as n_exc
from oslo_config import cfg

View File

@ -18,7 +18,7 @@ import json
import mock
import netaddr
from neutron.api.v2 import attributes as neutron_attrs
from neutron_lib import constants as neutron_attrs
from neutron_lib import exceptions as n_exc
from oslo_config import cfg

View File

@ -20,8 +20,8 @@ import json
import uuid
import mock
from neutron.api.v2 import attributes as neutron_attrs
from neutron.common import exceptions as n_exc_ext
from neutron_lib import constants as neutron_attrs
from neutron_lib import exceptions as n_exc
from oslo_config import cfg

View File

@ -25,7 +25,7 @@ except Exception:
# Don't want to force pstats into the venv if it's not always used
pass
from neutron.api.v2 import attributes
from neutron_lib import constants as attributes
from neutron_lib import exceptions as n_exc
from oslo_log import log as logging
import webob