switch to oslo.serialization
jsonutils has been moved to the oslo.serialization library. in this patch we bring in oslo.serialization and switch all references to the new library. Closes-Bug: #1385353 Change-Id: I2898c4040abb2f208959049708e7bc093cfbaba7
This commit is contained in:
parent
6c70b50cae
commit
736858b3e7
@ -23,6 +23,7 @@ import sys
|
||||
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import six
|
||||
|
||||
from neutron.agent.linux import ip_lib
|
||||
@ -31,7 +32,6 @@ from neutron.common import constants
|
||||
from neutron.common import exceptions
|
||||
from neutron.common import utils as commonutils
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import uuidutils
|
||||
|
||||
|
@ -17,13 +17,13 @@ import itertools
|
||||
import operator
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common.gettextutils import _LI, _LW
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions
|
||||
@ -23,7 +24,6 @@ from neutron import context as neutron_context
|
||||
from neutron.extensions import l3
|
||||
from neutron.extensions import portbindings
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants as plugin_constants
|
||||
|
||||
|
@ -17,6 +17,7 @@ from eventlet import greenthread
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.db import exception as db_exc
|
||||
from oslo.serialization import jsonutils
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.orm import exc
|
||||
from sqlalchemy import sql
|
||||
@ -27,7 +28,6 @@ from neutron.db import models_v2
|
||||
from neutron.extensions import agent as ext_agent
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import timeutils
|
||||
|
||||
|
@ -1,186 +0,0 @@
|
||||
# Copyright 2010 United States Government as represented by the
|
||||
# Administrator of the National Aeronautics and Space Administration.
|
||||
# Copyright 2011 Justin Santa Barbara
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
'''
|
||||
JSON related utilities.
|
||||
|
||||
This module provides a few things:
|
||||
|
||||
1) A handy function for getting an object down to something that can be
|
||||
JSON serialized. See to_primitive().
|
||||
|
||||
2) Wrappers around loads() and dumps(). The dumps() wrapper will
|
||||
automatically use to_primitive() for you if needed.
|
||||
|
||||
3) This sets up anyjson to use the loads() and dumps() wrappers if anyjson
|
||||
is available.
|
||||
'''
|
||||
|
||||
|
||||
import codecs
|
||||
import datetime
|
||||
import functools
|
||||
import inspect
|
||||
import itertools
|
||||
import sys
|
||||
|
||||
if sys.version_info < (2, 7):
|
||||
# On Python <= 2.6, json module is not C boosted, so try to use
|
||||
# simplejson module if available
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
import json
|
||||
else:
|
||||
import json
|
||||
|
||||
import six
|
||||
import six.moves.xmlrpc_client as xmlrpclib
|
||||
|
||||
from neutron.openstack.common import gettextutils
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import strutils
|
||||
from neutron.openstack.common import timeutils
|
||||
|
||||
netaddr = importutils.try_import("netaddr")
|
||||
|
||||
_nasty_type_tests = [inspect.ismodule, inspect.isclass, inspect.ismethod,
|
||||
inspect.isfunction, inspect.isgeneratorfunction,
|
||||
inspect.isgenerator, inspect.istraceback, inspect.isframe,
|
||||
inspect.iscode, inspect.isbuiltin, inspect.isroutine,
|
||||
inspect.isabstract]
|
||||
|
||||
_simple_types = (six.string_types + six.integer_types
|
||||
+ (type(None), bool, float))
|
||||
|
||||
|
||||
def to_primitive(value, convert_instances=False, convert_datetime=True,
|
||||
level=0, max_depth=3):
|
||||
"""Convert a complex object into primitives.
|
||||
|
||||
Handy for JSON serialization. We can optionally handle instances,
|
||||
but since this is a recursive function, we could have cyclical
|
||||
data structures.
|
||||
|
||||
To handle cyclical data structures we could track the actual objects
|
||||
visited in a set, but not all objects are hashable. Instead we just
|
||||
track the depth of the object inspections and don't go too deep.
|
||||
|
||||
Therefore, convert_instances=True is lossy ... be aware.
|
||||
|
||||
"""
|
||||
# handle obvious types first - order of basic types determined by running
|
||||
# full tests on nova project, resulting in the following counts:
|
||||
# 572754 <type 'NoneType'>
|
||||
# 460353 <type 'int'>
|
||||
# 379632 <type 'unicode'>
|
||||
# 274610 <type 'str'>
|
||||
# 199918 <type 'dict'>
|
||||
# 114200 <type 'datetime.datetime'>
|
||||
# 51817 <type 'bool'>
|
||||
# 26164 <type 'list'>
|
||||
# 6491 <type 'float'>
|
||||
# 283 <type 'tuple'>
|
||||
# 19 <type 'long'>
|
||||
if isinstance(value, _simple_types):
|
||||
return value
|
||||
|
||||
if isinstance(value, datetime.datetime):
|
||||
if convert_datetime:
|
||||
return timeutils.strtime(value)
|
||||
else:
|
||||
return value
|
||||
|
||||
# value of itertools.count doesn't get caught by nasty_type_tests
|
||||
# and results in infinite loop when list(value) is called.
|
||||
if type(value) == itertools.count:
|
||||
return six.text_type(value)
|
||||
|
||||
# FIXME(vish): Workaround for LP bug 852095. Without this workaround,
|
||||
# tests that raise an exception in a mocked method that
|
||||
# has a @wrap_exception with a notifier will fail. If
|
||||
# we up the dependency to 0.5.4 (when it is released) we
|
||||
# can remove this workaround.
|
||||
if getattr(value, '__module__', None) == 'mox':
|
||||
return 'mock'
|
||||
|
||||
if level > max_depth:
|
||||
return '?'
|
||||
|
||||
# The try block may not be necessary after the class check above,
|
||||
# but just in case ...
|
||||
try:
|
||||
recursive = functools.partial(to_primitive,
|
||||
convert_instances=convert_instances,
|
||||
convert_datetime=convert_datetime,
|
||||
level=level,
|
||||
max_depth=max_depth)
|
||||
if isinstance(value, dict):
|
||||
return dict((k, recursive(v)) for k, v in six.iteritems(value))
|
||||
elif isinstance(value, (list, tuple)):
|
||||
return [recursive(lv) for lv in value]
|
||||
|
||||
# It's not clear why xmlrpclib created their own DateTime type, but
|
||||
# for our purposes, make it a datetime type which is explicitly
|
||||
# handled
|
||||
if isinstance(value, xmlrpclib.DateTime):
|
||||
value = datetime.datetime(*tuple(value.timetuple())[:6])
|
||||
|
||||
if convert_datetime and isinstance(value, datetime.datetime):
|
||||
return timeutils.strtime(value)
|
||||
elif isinstance(value, gettextutils.Message):
|
||||
return value.data
|
||||
elif hasattr(value, 'iteritems'):
|
||||
return recursive(dict(value.iteritems()), level=level + 1)
|
||||
elif hasattr(value, '__iter__'):
|
||||
return recursive(list(value))
|
||||
elif convert_instances and hasattr(value, '__dict__'):
|
||||
# Likely an instance of something. Watch for cycles.
|
||||
# Ignore class member vars.
|
||||
return recursive(value.__dict__, level=level + 1)
|
||||
elif netaddr and isinstance(value, netaddr.IPAddress):
|
||||
return six.text_type(value)
|
||||
else:
|
||||
if any(test(value) for test in _nasty_type_tests):
|
||||
return six.text_type(value)
|
||||
return value
|
||||
except TypeError:
|
||||
# Class objects are tricky since they may define something like
|
||||
# __iter__ defined but it isn't callable as list().
|
||||
return six.text_type(value)
|
||||
|
||||
|
||||
def dumps(value, default=to_primitive, **kwargs):
|
||||
return json.dumps(value, default=default, **kwargs)
|
||||
|
||||
|
||||
def loads(s, encoding='utf-8', **kwargs):
|
||||
return json.loads(strutils.safe_decode(s, encoding), **kwargs)
|
||||
|
||||
|
||||
def load(fp, encoding='utf-8', **kwargs):
|
||||
return json.load(codecs.getreader(encoding)(fp), **kwargs)
|
||||
|
||||
|
||||
try:
|
||||
import anyjson
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
anyjson._modules.append((__name__, 'dumps', TypeError,
|
||||
'loads', ValueError, 'load'))
|
||||
anyjson.force_implementation(__name__)
|
@ -37,11 +37,11 @@ import weakref
|
||||
import eventlet
|
||||
import eventlet.corolocal
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import exceptions
|
||||
from neutron.common import utils
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.bigswitch.db import consistency_db as cdb
|
||||
|
||||
|
@ -22,11 +22,10 @@ from __future__ import print_function
|
||||
|
||||
import re
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from six import moves
|
||||
from wsgiref import simple_server
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
|
||||
|
||||
class TestNetworkCtrl(object):
|
||||
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
import logging
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.plugins.cisco.cfg_agent.device_drivers import devicedriver_api
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -12,11 +12,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.common import utils
|
||||
from neutron import context as neutron_context
|
||||
from neutron.extensions import portbindings
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -13,13 +13,14 @@
|
||||
# under the License.
|
||||
|
||||
import base64
|
||||
|
||||
import eventlet
|
||||
import netaddr
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.common import exceptions as n_exc
|
||||
from neutron.extensions import providernet
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.cisco.common import cisco_constants as c_const
|
||||
from neutron.plugins.cisco.common import cisco_credentials_v2 as c_cred
|
||||
|
@ -13,9 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.extensions import portbindings
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.ml2 import db
|
||||
from neutron.plugins.ml2 import driver_api as api
|
||||
|
||||
|
@ -13,13 +13,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from sqlalchemy import sql
|
||||
|
||||
from neutron.common import constants as const
|
||||
from neutron.db import agents_db
|
||||
from neutron.db import common_db_mixin as base_db
|
||||
from neutron.db import models_v2
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import timeutils
|
||||
from neutron.plugins.ml2.drivers.l2pop import constants as l2_const
|
||||
from neutron.plugins.ml2 import models as ml2_models
|
||||
|
@ -16,9 +16,9 @@
|
||||
import re
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.ml2 import driver_api as api
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
import time
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.common import constants as n_const
|
||||
@ -23,7 +24,6 @@ from neutron.common import exceptions as n_exc
|
||||
from neutron.common import utils
|
||||
from neutron.extensions import portbindings
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.plugins.ml2 import driver_api as api
|
||||
|
@ -18,6 +18,7 @@ from eventlet import greenthread
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.db import exception as os_db_exception
|
||||
from oslo.serialization import jsonutils
|
||||
from sqlalchemy import exc as sql_exc
|
||||
from sqlalchemy.orm import exc as sa_exc
|
||||
|
||||
@ -53,7 +54,6 @@ from neutron import manager
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common.gettextutils import _LI
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import lockutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.openstack.common import uuidutils
|
||||
|
@ -13,8 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.mlnx.common import comm_utils
|
||||
from neutron.plugins.mlnx.common import exceptions
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
import time
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.nec.common import config
|
||||
from neutron.plugins.nec.common import exceptions as nexc
|
||||
|
@ -14,8 +14,9 @@
|
||||
|
||||
"""Intermidiate NVSD Library."""
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
import neutron.plugins.oneconvergence.lib.exception as nvsdexception
|
||||
from neutron.plugins.oneconvergence.lib import plugin_helper
|
||||
|
@ -18,10 +18,10 @@ import httplib
|
||||
import time
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
from six.moves.urllib import parse
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
import neutron.plugins.oneconvergence.lib.exception as exception
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.api.v2 import attributes as attr
|
||||
@ -23,7 +24,6 @@ from neutron.extensions import external_net
|
||||
from neutron.extensions import portbindings
|
||||
from neutron.extensions import securitygroup
|
||||
from neutron import neutron_plugin_base_v2
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.opencontrail.common import exceptions as c_exc
|
||||
|
||||
|
@ -14,11 +14,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import eventlet
|
||||
import httplib
|
||||
import urllib
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
import eventlet
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.vmware.api_client import request
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
import random
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions
|
||||
from neutron import context
|
||||
@ -22,7 +24,6 @@ from neutron.db import external_net_db
|
||||
from neutron.db import l3_db
|
||||
from neutron.db import models_v2
|
||||
from neutron.extensions import l3
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.openstack.common import loopingcall
|
||||
from neutron.openstack.common import timeutils
|
||||
|
@ -13,8 +13,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import exceptions as exception
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
from neutron.plugins.vmware.common import exceptions as nsx_exc
|
||||
|
@ -14,7 +14,8 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
from neutron.plugins.vmware.common import exceptions as nsx_exc
|
||||
|
@ -13,8 +13,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import exceptions as exception
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
from neutron.plugins.vmware.common import exceptions as nsx_exc
|
||||
|
@ -13,10 +13,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.api.v2 import attributes as attr
|
||||
from neutron.common import exceptions as exception
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
from neutron.plugins.vmware.common import utils
|
||||
|
@ -14,10 +14,10 @@
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import exceptions as exception
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
from neutron.plugins.vmware.common import exceptions as nsx_exc
|
||||
|
@ -13,10 +13,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.common import utils
|
||||
from neutron.plugins.vmware import nsxlib
|
||||
|
@ -15,10 +15,10 @@
|
||||
#
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions as exception
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
from neutron.plugins.vmware.common import exceptions as nsx_exc
|
||||
|
@ -15,8 +15,8 @@
|
||||
import base64
|
||||
|
||||
import eventlet
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.vmware.vshield.common import exceptions
|
||||
|
||||
httplib2 = eventlet.import_patched('httplib2')
|
||||
|
@ -12,8 +12,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.vmware.common import utils
|
||||
from neutron.plugins.vmware.vshield.common import constants as vcns_const
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.vmware.vshield.common import VcnsApiClient
|
||||
|
||||
|
@ -17,8 +17,8 @@ import base64
|
||||
|
||||
import httplib2
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.services.firewall.agents.varmour import varmour_utils as va_utils
|
||||
|
||||
|
@ -13,10 +13,11 @@
|
||||
# under the License.
|
||||
|
||||
import base64
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.common import exceptions as n_exc
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -24,6 +24,7 @@ import eventlet
|
||||
eventlet.monkey_patch(thread=True)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from six.moves import queue as Queue
|
||||
|
||||
from neutron.api.v2 import attributes
|
||||
@ -32,7 +33,6 @@ from neutron import context
|
||||
from neutron.db.loadbalancer import loadbalancer_db as lb_db
|
||||
from neutron.extensions import loadbalancer
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.services.loadbalancer.drivers import abstract_driver
|
||||
|
@ -15,10 +15,10 @@
|
||||
import time
|
||||
|
||||
import netaddr
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
from requests import exceptions as r_exc
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common.gettextutils import _LE, _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
@ -15,12 +15,12 @@
|
||||
import collections
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import testtools
|
||||
|
||||
from neutron.agent.linux import ovs_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import uuidutils
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.tests import base
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.bigswitch import servermanager
|
||||
|
||||
|
@ -18,11 +18,11 @@ import ssl
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron import context
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import importutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.bigswitch import servermanager
|
||||
from neutron.tests.unit.bigswitch import test_restproxy_plugin as test_rp
|
||||
|
||||
|
@ -15,8 +15,9 @@
|
||||
|
||||
import abc
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.api import extensions
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron import wsgi
|
||||
|
||||
|
||||
|
@ -18,11 +18,11 @@ import contextlib
|
||||
import functools
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron import context as neutron_context
|
||||
from neutron.extensions import portbindings
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.bigswitch import servermanager
|
||||
from neutron.plugins.ml2 import config as ml2_config
|
||||
from neutron.plugins.ml2.drivers.mech_bigswitch import driver as bsn_driver
|
||||
|
@ -14,9 +14,9 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.plugins.ml2 import config as config
|
||||
from neutron.plugins.ml2 import driver_api as api
|
||||
|
@ -14,9 +14,9 @@
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.nec.common import config
|
||||
from neutron.plugins.nec.common import exceptions as nexc
|
||||
from neutron.plugins.nec.common import ofc_client
|
||||
|
@ -14,8 +14,8 @@
|
||||
#
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.oneconvergence.lib import nvsdlib
|
||||
from neutron.tests import base
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
import requests
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.oneconvergence.lib import config # noqa
|
||||
from neutron.plugins.oneconvergence.lib import plugin_helper as client
|
||||
from neutron.tests import base
|
||||
|
@ -20,6 +20,7 @@ import uuid
|
||||
import mock
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from testtools import matchers
|
||||
import webob.exc
|
||||
|
||||
@ -34,7 +35,6 @@ from neutron.db import l3_db
|
||||
from neutron.db import securitygroups_db
|
||||
from neutron.extensions import portbindings
|
||||
from neutron.extensions import securitygroup as ext_sg
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.tests.unit import _test_extension_portbindings as test_bindings
|
||||
from neutron.tests.unit import test_db_plugin as test_plugin
|
||||
from neutron.tests.unit import test_extension_security_group as test_sg
|
||||
|
@ -17,13 +17,13 @@ import re
|
||||
import contextlib
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from six.moves import queue as Queue
|
||||
|
||||
from neutron.api.v2 import attributes
|
||||
from neutron import context
|
||||
from neutron.extensions import loadbalancer
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.services.loadbalancer.drivers.radware import driver
|
||||
from neutron.services.loadbalancer.drivers.radware import exceptions as r_exc
|
||||
|
@ -16,6 +16,7 @@
|
||||
import abc
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
import routes
|
||||
import webob
|
||||
import webtest
|
||||
@ -24,7 +25,6 @@ from neutron.api import extensions
|
||||
from neutron.common import config
|
||||
from neutron.common import exceptions
|
||||
from neutron.db import db_base_plugin_v2
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.tests import base
|
||||
|
@ -12,9 +12,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import uuidutils
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
|
@ -15,8 +15,8 @@
|
||||
#
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.vmware.api_client import exception
|
||||
from neutron.plugins.vmware.common import utils as nsx_utils
|
||||
from neutron.plugins.vmware import nsxlib
|
||||
|
@ -14,9 +14,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
from neutron.plugins.vmware.common import exceptions as nsx_exc
|
||||
from neutron.plugins.vmware.common import utils
|
||||
|
@ -19,13 +19,13 @@ import time
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.api.v2 import attributes as attr
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions as n_exc
|
||||
from neutron import context
|
||||
from neutron.extensions import l3
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log
|
||||
from neutron.plugins.vmware.api_client import client
|
||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
import copy
|
||||
|
||||
from neutron.openstack.common import jsonutils
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from neutron.openstack.common import uuidutils
|
||||
from neutron.plugins.vmware.vshield.common import exceptions
|
||||
|
||||
|
@ -28,6 +28,7 @@ import time
|
||||
import eventlet.wsgi
|
||||
eventlet.patcher.monkey_patch(all=False, socket=True, thread=True)
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
import routes.middleware
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
@ -37,7 +38,6 @@ from neutron import context
|
||||
from neutron.db import api
|
||||
from neutron.openstack.common import excutils
|
||||
from neutron.openstack.common import gettextutils
|
||||
from neutron.openstack.common import jsonutils
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import service as common_service
|
||||
from neutron.openstack.common import systemd
|
||||
|
@ -9,7 +9,6 @@ module=fixture
|
||||
module=gettextutils
|
||||
module=importutils
|
||||
module=install_venv_common
|
||||
module=jsonutils
|
||||
module=local
|
||||
module=lockutils
|
||||
module=log
|
||||
|
Loading…
Reference in New Issue
Block a user