Consistently use jsonutils instead of specific implementation
jsonutils have several benefits in comparison to pure json implementation, like enabling C boosted encoders and decoders for Python2.6 by using simplejson when available. Change-Id: I24d0cd442e8d9d89fac50e43fc97f7bb4a293c3d Closes-Bug: 1329496
This commit is contained in:
parent
7e90af1564
commit
156990150e
@ -33,7 +33,6 @@ The following functionality is handled by this module:
|
|||||||
"""
|
"""
|
||||||
import base64
|
import base64
|
||||||
import httplib
|
import httplib
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
import ssl
|
import ssl
|
||||||
@ -44,6 +43,7 @@ from oslo.config import cfg
|
|||||||
from neutron.common import exceptions
|
from neutron.common import exceptions
|
||||||
from neutron.common import utils
|
from neutron.common import utils
|
||||||
from neutron.openstack.common import excutils
|
from neutron.openstack.common import excutils
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log as logging
|
from neutron.openstack.common import log as logging
|
||||||
from neutron.plugins.bigswitch.db import consistency_db as cdb
|
from neutron.plugins.bigswitch.db import consistency_db as cdb
|
||||||
|
|
||||||
|
@ -24,12 +24,13 @@ Used for NeutronRestProxy tests
|
|||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import json
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from six import moves
|
from six import moves
|
||||||
from wsgiref import simple_server
|
from wsgiref import simple_server
|
||||||
|
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
|
|
||||||
|
|
||||||
class TestNetworkCtrl(object):
|
class TestNetworkCtrl(object):
|
||||||
|
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
# @author: Ryota MIBU
|
# @author: Ryota MIBU
|
||||||
|
|
||||||
import json
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from neutron.openstack.common import excutils
|
from neutron.openstack.common import excutils
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log as logging
|
from neutron.openstack.common import log as logging
|
||||||
from neutron.plugins.nec.common import config
|
from neutron.plugins.nec.common import config
|
||||||
from neutron.plugins.nec.common import exceptions as nexc
|
from neutron.plugins.nec.common import exceptions as nexc
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
import httplib
|
import httplib
|
||||||
import json
|
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log as logging
|
from neutron.openstack.common import log as logging
|
||||||
from neutron.plugins.vmware.api_client import request
|
from neutron.plugins.vmware.api_client import request
|
||||||
|
|
||||||
|
@ -13,9 +13,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
from neutron.common import exceptions as exception
|
from neutron.common import exceptions as exception
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log
|
from neutron.openstack.common import log
|
||||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
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 exceptions as nsx_exc
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
import json
|
from neutron.openstack.common import jsonutils as json
|
||||||
|
|
||||||
from neutron.openstack.common import log
|
from neutron.openstack.common import log
|
||||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
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 exceptions as nsx_exc
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
from neutron.common import exceptions as exception
|
from neutron.common import exceptions as exception
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log
|
from neutron.openstack.common import log
|
||||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
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 exceptions as nsx_exc
|
||||||
|
@ -13,11 +13,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
from neutron.common import constants
|
from neutron.common import constants
|
||||||
from neutron.common import exceptions
|
from neutron.common import exceptions
|
||||||
from neutron.openstack.common import excutils
|
from neutron.openstack.common import excutils
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log
|
from neutron.openstack.common import log
|
||||||
from neutron.plugins.vmware.common import utils
|
from neutron.plugins.vmware.common import utils
|
||||||
from neutron.plugins.vmware import nsxlib
|
from neutron.plugins.vmware import nsxlib
|
||||||
|
@ -14,12 +14,11 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from neutron.common import constants
|
from neutron.common import constants
|
||||||
from neutron.common import exceptions as exception
|
from neutron.common import exceptions as exception
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log
|
from neutron.openstack.common import log
|
||||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
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 exceptions as nsx_exc
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
# @author: Kevin Benton, <kevin.benton@bigswitch.com>
|
# @author: Kevin Benton, <kevin.benton@bigswitch.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
import json
|
from neutron.openstack.common import jsonutils as json
|
||||||
|
|
||||||
from neutron.openstack.common import log as logging
|
from neutron.openstack.common import log as logging
|
||||||
from neutron.plugins.bigswitch import servermanager
|
from neutron.plugins.bigswitch import servermanager
|
||||||
|
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
#
|
#
|
||||||
# @author: Akihiro Motoki
|
# @author: Akihiro Motoki
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.plugins.nec.common import config
|
from neutron.plugins.nec.common import config
|
||||||
from neutron.plugins.nec.common import exceptions as nexc
|
from neutron.plugins.nec.common import exceptions as nexc
|
||||||
from neutron.plugins.nec.common import ofc_client
|
from neutron.plugins.nec.common import ofc_client
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
"""Test of Policy Engine For Neutron"""
|
"""Test of Policy Engine For Neutron"""
|
||||||
|
|
||||||
import json
|
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
@ -28,6 +27,7 @@ from neutron.common import exceptions
|
|||||||
from neutron import context
|
from neutron import context
|
||||||
from neutron import manager
|
from neutron import manager
|
||||||
from neutron.openstack.common import importutils
|
from neutron.openstack.common import importutils
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import policy as common_policy
|
from neutron.openstack.common import policy as common_policy
|
||||||
from neutron import policy
|
from neutron import policy
|
||||||
from neutron.tests import base
|
from neutron.tests import base
|
||||||
|
@ -12,10 +12,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import log as logging
|
from neutron.openstack.common import log as logging
|
||||||
from neutron.openstack.common import uuidutils
|
from neutron.openstack.common import uuidutils
|
||||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
from neutron.plugins.vmware.api_client import exception as api_exc
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import json
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from neutron.common import exceptions
|
from neutron.common import exceptions
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.plugins.vmware.api_client import exception as api_exc
|
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 exceptions as nsx_exc
|
||||||
from neutron.plugins.vmware.common import utils
|
from neutron.plugins.vmware.common import utils
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import json
|
|
||||||
|
|
||||||
|
from neutron.openstack.common import jsonutils as json
|
||||||
from neutron.openstack.common import uuidutils
|
from neutron.openstack.common import uuidutils
|
||||||
from neutron.plugins.vmware.vshield.common import exceptions
|
from neutron.plugins.vmware.vshield.common import exceptions
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user