From eef7983d4ec829ba910a6c1000e8dac95efe50d3 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Tue, 11 Aug 2015 06:01:25 -0700 Subject: [PATCH] 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 --- bin/neutron-rootwrap-xen-dom0 | 3 ++- neutron/tests/tempest/common/glance_http.py | 2 +- .../tests/tempest/services/identity/v2/json/identity_client.py | 2 +- .../tests/tempest/services/identity/v2/json/token_client.py | 2 +- .../tempest/services/identity/v3/json/credentials_client.py | 2 +- .../tempest/services/identity/v3/json/endpoints_client.py | 2 +- .../tests/tempest/services/identity/v3/json/identity_client.py | 3 +-- .../tests/tempest/services/identity/v3/json/policy_client.py | 2 +- .../tests/tempest/services/identity/v3/json/region_client.py | 3 +-- .../tests/tempest/services/identity/v3/json/service_client.py | 2 +- .../tests/tempest/services/identity/v3/json/token_client.py | 2 +- neutron/tests/tempest/services/network/json/network_client.py | 2 +- neutron/tests/tempest/test.py | 2 +- 13 files changed, 14 insertions(+), 15 deletions(-) diff --git a/bin/neutron-rootwrap-xen-dom0 b/bin/neutron-rootwrap-xen-dom0 index 8e92d33fed1..b4e2e31b5cf 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 0a6f985e7c6..3d8c8aaf8c3 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 7efda1febdf..46e8f8781ab 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 51d9db02bd2..e8b33ea8007 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 4300c0fc7db..07e230ac49c 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 b60dd260bfd..27ac3e54d03 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 a7db46a5785..a090acf9a03 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 2e44185ddb7..2d247afec84 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 d2fa53b7561..0effae881d5 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 529693e34b1..75a5cf8150e 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 c60b24c56f9..77ecf8423e6 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 4958bc51c03..4badd962346 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 d95174bd886..3abf826b2c3 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