Update json module to jsonutils

oslo project provide jsonutils, and we use it in many place[1],
this PS to update the remained json moudule to oslo jsonutils for
consistency.

[1]: 9594233ffd/tempest/lib/services/volume/v1/quotas_client.py (L15)

Change-Id: Ib8d9f49a1fdfa0f5e0cfb05a193dffb83e4cfe69
This commit is contained in:
zhulingjie 2019-02-21 01:05:54 +08:00
parent 6ffd90691b
commit 92b87a5a43
7 changed files with 8 additions and 11 deletions

View File

@ -12,9 +12,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 oslo_log import log as logging from oslo_log import log as logging
from oslo_serialization import jsonutils as json
from tempest.api.compute import base from tempest.api.compute import base
from tempest.common import utils from tempest.common import utils

View File

@ -78,11 +78,11 @@ Output file JSON structure
import argparse import argparse
import collections import collections
import io import io
import json
import os import os
import re import re
import sys import sys
from oslo_serialization import jsonutils as json
import subunit import subunit
import testtools import testtools

View File

@ -13,7 +13,7 @@
# 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 oslo_serialization import jsonutils as json
from tempest.common import utils from tempest.common import utils
from tempest.common import waiters from tempest.common import waiters

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
from oslo_log import log as logging from oslo_log import log as logging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils as json
import testtools import testtools
from tempest.common import utils from tempest.common import utils
@ -265,7 +265,7 @@ class TestVolumeBootPattern(manager.EncryptionScenarioTest):
bdms = image.get('block_device_mapping') bdms = image.get('block_device_mapping')
if not bdms: if not bdms:
bdms = image['properties']['block_device_mapping'] bdms = image['properties']['block_device_mapping']
bdms = jsonutils.loads(bdms) bdms = json.loads(bdms)
snapshot_id = bdms[0]['snapshot_id'] snapshot_id = bdms[0]['snapshot_id']
self._delete_snapshot(snapshot_id) self._delete_snapshot(snapshot_id)

View File

@ -13,10 +13,10 @@
# under the License. # under the License.
import copy import copy
import json
import fixtures import fixtures
import jsonschema import jsonschema
from oslo_serialization import jsonutils as json
import six import six
from tempest.lib.common import http from tempest.lib.common import http

View File

@ -12,9 +12,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
import mock import mock
from oslo_serialization import jsonutils as json
from tempest.lib.common import rest_client from tempest.lib.common import rest_client
from tempest.lib import exceptions from tempest.lib import exceptions

View File

@ -12,9 +12,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
import mock import mock
from oslo_serialization import jsonutils as json
from tempest.lib.common import rest_client from tempest.lib.common import rest_client
from tempest.lib import exceptions from tempest.lib import exceptions