From: Kevin Benton Date: Tue, 11 Aug 2015 13:01:25 +0000 (-0700) Subject: Replace 'import json' with oslo_serialization X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=eef7983d4ec829ba910a6c1000e8dac95efe50d3;p=openstack-build%2Fneutron-build.git Replace 'import json' with oslo_serialization Replace remaining occurences of 'import json' with 'from oslo_serialization import jsonutils as json' so pylint doesn't complain every time someone happens to make a change to one of the modules that still uses it. Change-Id: Ife9f0fc54ad36887bdb939028f8903be16e590d6 --- diff --git a/bin/neutron-rootwrap-xen-dom0 b/bin/neutron-rootwrap-xen-dom0 index 8e92d33fe..b4e2e31b5 100755 --- a/bin/neutron-rootwrap-xen-dom0 +++ b/bin/neutron-rootwrap-xen-dom0 @@ -24,7 +24,8 @@ responsible determining whether a command is safe to execute. from __future__ import print_function from six.moves import configparser as ConfigParser -import json +from oslo_serialization import jsonutils as json + import os import select import sys diff --git a/neutron/tests/tempest/common/glance_http.py b/neutron/tests/tempest/common/glance_http.py index 0a6f985e7..3d8c8aaf8 100644 --- a/neutron/tests/tempest/common/glance_http.py +++ b/neutron/tests/tempest/common/glance_http.py @@ -17,7 +17,6 @@ import copy import hashlib -import json import posixpath import re import socket @@ -28,6 +27,7 @@ import urlparse import OpenSSL from oslo_log import log as logging +from oslo_serialization import jsonutils as json from six import moves from six.moves import http_client as httplib from tempest_lib import exceptions as lib_exc diff --git a/neutron/tests/tempest/services/identity/v2/json/identity_client.py b/neutron/tests/tempest/services/identity/v2/json/identity_client.py index 7efda1feb..46e8f8781 100644 --- a/neutron/tests/tempest/services/identity/v2/json/identity_client.py +++ b/neutron/tests/tempest/services/identity/v2/json/identity_client.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from tempest_lib import exceptions as lib_exc from neutron.tests.tempest.common import service_client diff --git a/neutron/tests/tempest/services/identity/v2/json/token_client.py b/neutron/tests/tempest/services/identity/v2/json/token_client.py index 51d9db02b..e8b33ea80 100644 --- a/neutron/tests/tempest/services/identity/v2/json/token_client.py +++ b/neutron/tests/tempest/services/identity/v2/json/token_client.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from tempest_lib.common import rest_client from tempest_lib import exceptions as lib_exc diff --git a/neutron/tests/tempest/services/identity/v3/json/credentials_client.py b/neutron/tests/tempest/services/identity/v3/json/credentials_client.py index 4300c0fc7..07e230ac4 100644 --- a/neutron/tests/tempest/services/identity/v3/json/credentials_client.py +++ b/neutron/tests/tempest/services/identity/v3/json/credentials_client.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from neutron.tests.tempest.common import service_client diff --git a/neutron/tests/tempest/services/identity/v3/json/endpoints_client.py b/neutron/tests/tempest/services/identity/v3/json/endpoints_client.py index b60dd260b..27ac3e54d 100644 --- a/neutron/tests/tempest/services/identity/v3/json/endpoints_client.py +++ b/neutron/tests/tempest/services/identity/v3/json/endpoints_client.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from neutron.tests.tempest.common import service_client diff --git a/neutron/tests/tempest/services/identity/v3/json/identity_client.py b/neutron/tests/tempest/services/identity/v3/json/identity_client.py index a7db46a57..a090acf9a 100644 --- a/neutron/tests/tempest/services/identity/v3/json/identity_client.py +++ b/neutron/tests/tempest/services/identity/v3/json/identity_client.py @@ -13,8 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json - +from oslo_serialization import jsonutils as json from six.moves.urllib import parse from neutron.tests.tempest.common import service_client diff --git a/neutron/tests/tempest/services/identity/v3/json/policy_client.py b/neutron/tests/tempest/services/identity/v3/json/policy_client.py index 2e44185dd..2d247afec 100644 --- a/neutron/tests/tempest/services/identity/v3/json/policy_client.py +++ b/neutron/tests/tempest/services/identity/v3/json/policy_client.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from neutron.tests.tempest.common import service_client diff --git a/neutron/tests/tempest/services/identity/v3/json/region_client.py b/neutron/tests/tempest/services/identity/v3/json/region_client.py index d2fa53b75..0effae881 100644 --- a/neutron/tests/tempest/services/identity/v3/json/region_client.py +++ b/neutron/tests/tempest/services/identity/v3/json/region_client.py @@ -13,8 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json - +from oslo_serialization import jsonutils as json from six.moves.urllib import parse from neutron.tests.tempest.common import service_client diff --git a/neutron/tests/tempest/services/identity/v3/json/service_client.py b/neutron/tests/tempest/services/identity/v3/json/service_client.py index 529693e34..75a5cf815 100644 --- a/neutron/tests/tempest/services/identity/v3/json/service_client.py +++ b/neutron/tests/tempest/services/identity/v3/json/service_client.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from neutron.tests.tempest.common import service_client diff --git a/neutron/tests/tempest/services/identity/v3/json/token_client.py b/neutron/tests/tempest/services/identity/v3/json/token_client.py index c60b24c56..77ecf8423 100644 --- a/neutron/tests/tempest/services/identity/v3/json/token_client.py +++ b/neutron/tests/tempest/services/identity/v3/json/token_client.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from tempest_lib.common import rest_client from tempest_lib import exceptions as lib_exc diff --git a/neutron/tests/tempest/services/network/json/network_client.py b/neutron/tests/tempest/services/network/json/network_client.py index 4958bc51c..4badd9623 100644 --- a/neutron/tests/tempest/services/network/json/network_client.py +++ b/neutron/tests/tempest/services/network/json/network_client.py @@ -10,9 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. -import json import time +from oslo_serialization import jsonutils as json from six.moves.urllib import parse from tempest_lib.common.utils import misc from tempest_lib import exceptions as lib_exc diff --git a/neutron/tests/tempest/test.py b/neutron/tests/tempest/test.py index d95174bd8..3abf826b2 100644 --- a/neutron/tests/tempest/test.py +++ b/neutron/tests/tempest/test.py @@ -15,7 +15,6 @@ import atexit import functools -import json import os import re import sys @@ -24,6 +23,7 @@ import uuid import fixtures from oslo_log import log as logging +from oslo_serialization import jsonutils as json from oslo_utils import importutils import six from six.moves.urllib import parse