From: ChangBo Guo(gcb) Date: Mon, 10 Nov 2014 06:32:44 +0000 (+0800) Subject: Switch to oslo.serialization X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=69548a0b9f434c0bfc3e0f48859381435b68cd23;p=openstack-build%2Fcinder-build.git Switch to oslo.serialization Very simple import change in each file, just touches a whole lot of files. jsonutils has graduated into a standalone library and has been removed from the oslo-incubator repository. We should be using the library for all projects. This commit doesn't change files synced from oslo-incubator, and doesn't remove the 'module=jsonutils' in openstack-common.conf. Another sync commit will cover that. Change-Id: I56ea380a85e8a3c1b42b2425430fc28409937365 --- diff --git a/cinder/api/middleware/auth.py b/cinder/api/middleware/auth.py index 74d3afbbf..cf898c9b0 100644 --- a/cinder/api/middleware/auth.py +++ b/cinder/api/middleware/auth.py @@ -21,13 +21,13 @@ Common Auth Middleware. import os from oslo.config import cfg +from oslo.serialization import jsonutils import webob.dec import webob.exc from cinder.api.openstack import wsgi from cinder import context from cinder.i18n import _ -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder.openstack.common.middleware import request_id from cinder import wsgi as base_wsgi diff --git a/cinder/api/openstack/wsgi.py b/cinder/api/openstack/wsgi.py index ff744f67d..46762d273 100644 --- a/cinder/api/openstack/wsgi.py +++ b/cinder/api/openstack/wsgi.py @@ -21,13 +21,13 @@ from xml.dom import minidom from xml.parsers import expat from lxml import etree +from oslo.serialization import jsonutils import six import webob from cinder import exception from cinder import i18n from cinder.i18n import _, _LI -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder import utils from cinder import wsgi diff --git a/cinder/api/v1/limits.py b/cinder/api/v1/limits.py index cf9be30ad..de45e99aa 100644 --- a/cinder/api/v1/limits.py +++ b/cinder/api/v1/limits.py @@ -24,6 +24,7 @@ import math import re import time +from oslo.serialization import jsonutils import webob.dec import webob.exc @@ -32,7 +33,6 @@ from cinder.api.views import limits as limits_views from cinder.api import xmlutil from cinder.i18n import _ from cinder.openstack.common import importutils -from cinder.openstack.common import jsonutils from cinder import quota from cinder import wsgi as base_wsgi diff --git a/cinder/api/v2/limits.py b/cinder/api/v2/limits.py index b285b08b5..5fba22076 100644 --- a/cinder/api/v2/limits.py +++ b/cinder/api/v2/limits.py @@ -24,6 +24,7 @@ import math import re import time +from oslo.serialization import jsonutils import webob.dec import webob.exc @@ -32,7 +33,6 @@ from cinder.api.views import limits as limits_views from cinder.api import xmlutil from cinder.i18n import _ from cinder.openstack.common import importutils -from cinder.openstack.common import jsonutils from cinder import quota from cinder import wsgi as base_wsgi diff --git a/cinder/backup/driver.py b/cinder/backup/driver.py index f844e0ad3..c235c52b8 100644 --- a/cinder/backup/driver.py +++ b/cinder/backup/driver.py @@ -18,12 +18,12 @@ import abc from oslo.config import cfg +from oslo.serialization import jsonutils import six from cinder.db import base from cinder import exception from cinder.i18n import _, _LI -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging service_opts = [ diff --git a/cinder/image/glance.py b/cinder/image/glance.py index 19876ed19..60f9fe09d 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -28,11 +28,11 @@ import time import glanceclient.exc from oslo.config import cfg +from oslo.serialization import jsonutils import six.moves.urllib.parse as urlparse from cinder import exception from cinder.i18n import _ -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder.openstack.common import timeutils diff --git a/cinder/rpc.py b/cinder/rpc.py index 67d3b3d2c..f07cf0545 100644 --- a/cinder/rpc.py +++ b/cinder/rpc.py @@ -28,11 +28,11 @@ __all__ = [ from oslo.config import cfg from oslo import messaging +from oslo.serialization import jsonutils from osprofiler import profiler import cinder.context import cinder.exception -from cinder.openstack.common import jsonutils CONF = cfg.CONF TRANSPORT = None diff --git a/cinder/scheduler/rpcapi.py b/cinder/scheduler/rpcapi.py index f6cab644b..53fadad84 100644 --- a/cinder/scheduler/rpcapi.py +++ b/cinder/scheduler/rpcapi.py @@ -18,8 +18,8 @@ Client side of the scheduler manager RPC API. from oslo.config import cfg from oslo import messaging +from oslo.serialization import jsonutils -from cinder.openstack.common import jsonutils from cinder import rpc diff --git a/cinder/tests/api/contrib/test_admin_actions.py b/cinder/tests/api/contrib/test_admin_actions.py index 64963f9e3..e9da48fde 100644 --- a/cinder/tests/api/contrib/test_admin_actions.py +++ b/cinder/tests/api/contrib/test_admin_actions.py @@ -14,6 +14,7 @@ import ast import tempfile from oslo.config import cfg +from oslo.serialization import jsonutils import webob from webob import exc @@ -22,7 +23,6 @@ from cinder.brick.local_dev import lvm as brick_lvm from cinder import context from cinder import db from cinder import exception -from cinder.openstack.common import jsonutils from cinder.openstack.common import timeutils from cinder import test from cinder.tests.api import fakes diff --git a/cinder/tests/api/contrib/test_extended_snapshot_attributes.py b/cinder/tests/api/contrib/test_extended_snapshot_attributes.py index 88a47e17c..4007695ce 100644 --- a/cinder/tests/api/contrib/test_extended_snapshot_attributes.py +++ b/cinder/tests/api/contrib/test_extended_snapshot_attributes.py @@ -15,10 +15,10 @@ from lxml import etree +from oslo.serialization import jsonutils import webob from cinder.api.contrib import extended_snapshot_attributes -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes from cinder import volume diff --git a/cinder/tests/api/contrib/test_scheduler_hints.py b/cinder/tests/api/contrib/test_scheduler_hints.py index ae5c17abc..42a611575 100644 --- a/cinder/tests/api/contrib/test_scheduler_hints.py +++ b/cinder/tests/api/contrib/test_scheduler_hints.py @@ -15,9 +15,10 @@ import datetime +from oslo.serialization import jsonutils + import cinder from cinder.api.openstack import wsgi -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes from cinder.tests.api.v2 import stubs diff --git a/cinder/tests/api/contrib/test_snapshot_actions.py b/cinder/tests/api/contrib/test_snapshot_actions.py index 37b4d1971..b35d9af47 100644 --- a/cinder/tests/api/contrib/test_snapshot_actions.py +++ b/cinder/tests/api/contrib/test_snapshot_actions.py @@ -12,10 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. +from oslo.serialization import jsonutils import webob from cinder import db -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes from cinder.tests.api.v2 import stubs diff --git a/cinder/tests/api/contrib/test_volume_actions.py b/cinder/tests/api/contrib/test_volume_actions.py index 65c51c77f..a8c0cecd9 100644 --- a/cinder/tests/api/contrib/test_volume_actions.py +++ b/cinder/tests/api/contrib/test_volume_actions.py @@ -19,12 +19,12 @@ import uuid import mock from oslo.config import cfg from oslo import messaging +from oslo.serialization import jsonutils import webob from cinder.api.contrib import volume_actions from cinder import exception from cinder.image.glance import GlanceImageService -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes from cinder.tests.api.v2 import stubs diff --git a/cinder/tests/api/contrib/test_volume_manage.py b/cinder/tests/api/contrib/test_volume_manage.py index 82bad3c10..54e312c7f 100644 --- a/cinder/tests/api/contrib/test_volume_manage.py +++ b/cinder/tests/api/contrib/test_volume_manage.py @@ -13,11 +13,11 @@ # under the License. import mock +from oslo.serialization import jsonutils import webob from cinder import context from cinder import exception -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes diff --git a/cinder/tests/api/contrib/test_volume_unmanage.py b/cinder/tests/api/contrib/test_volume_unmanage.py index 6538cbb15..c80c00d48 100644 --- a/cinder/tests/api/contrib/test_volume_unmanage.py +++ b/cinder/tests/api/contrib/test_volume_unmanage.py @@ -13,11 +13,11 @@ # under the License. import mock +from oslo.serialization import jsonutils import webob from cinder import context from cinder import exception -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes diff --git a/cinder/tests/api/middleware/test_faults.py b/cinder/tests/api/middleware/test_faults.py index 4464cb949..af7a7fd50 100644 --- a/cinder/tests/api/middleware/test_faults.py +++ b/cinder/tests/api/middleware/test_faults.py @@ -18,6 +18,7 @@ from xml.dom import minidom import mock from oslo.i18n import _lazy +from oslo.serialization import jsonutils import webob.dec import webob.exc @@ -26,7 +27,6 @@ from cinder.api.openstack import wsgi from cinder import exception from cinder import i18n as cinder_i18n from cinder.i18n import _ -from cinder.openstack.common import jsonutils from cinder import test diff --git a/cinder/tests/api/test_extensions.py b/cinder/tests/api/test_extensions.py index 22a9e2215..a875c8541 100644 --- a/cinder/tests/api/test_extensions.py +++ b/cinder/tests/api/test_extensions.py @@ -17,12 +17,12 @@ import iso8601 from lxml import etree from oslo.config import cfg +from oslo.serialization import jsonutils import webob from cinder.api import extensions from cinder.api.v1 import router from cinder.api import xmlutil -from cinder.openstack.common import jsonutils from cinder import test diff --git a/cinder/tests/api/v1/test_limits.py b/cinder/tests/api/v1/test_limits.py index 935a1c394..4ab32200e 100644 --- a/cinder/tests/api/v1/test_limits.py +++ b/cinder/tests/api/v1/test_limits.py @@ -21,6 +21,7 @@ import httplib from xml.dom import minidom from lxml import etree +from oslo.serialization import jsonutils import six import webob @@ -28,7 +29,6 @@ from cinder.api.v1 import limits from cinder.api import views from cinder.api import xmlutil import cinder.context -from cinder.openstack.common import jsonutils from cinder import test diff --git a/cinder/tests/api/v1/test_snapshot_metadata.py b/cinder/tests/api/v1/test_snapshot_metadata.py index 7f254a16f..01c4321ae 100644 --- a/cinder/tests/api/v1/test_snapshot_metadata.py +++ b/cinder/tests/api/v1/test_snapshot_metadata.py @@ -16,6 +16,7 @@ import uuid from oslo.config import cfg +from oslo.serialization import jsonutils import webob from cinder.api import extensions @@ -23,7 +24,6 @@ from cinder.api.v1 import snapshot_metadata from cinder.api.v1 import snapshots import cinder.db from cinder import exception -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes diff --git a/cinder/tests/api/v1/test_volume_metadata.py b/cinder/tests/api/v1/test_volume_metadata.py index e6fe56fd5..0b1188f02 100644 --- a/cinder/tests/api/v1/test_volume_metadata.py +++ b/cinder/tests/api/v1/test_volume_metadata.py @@ -16,6 +16,7 @@ import uuid from oslo.config import cfg +from oslo.serialization import jsonutils import webob from cinder.api import extensions @@ -23,7 +24,6 @@ from cinder.api.v1 import volume_metadata from cinder.api.v1 import volumes import cinder.db from cinder import exception -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes from cinder.tests.api.v1 import stubs diff --git a/cinder/tests/api/v2/test_limits.py b/cinder/tests/api/v2/test_limits.py index 5d3777280..638b700cc 100644 --- a/cinder/tests/api/v2/test_limits.py +++ b/cinder/tests/api/v2/test_limits.py @@ -21,6 +21,7 @@ import httplib from xml.dom import minidom from lxml import etree +from oslo.serialization import jsonutils import six import webob @@ -28,7 +29,6 @@ from cinder.api.v2 import limits from cinder.api import views from cinder.api import xmlutil import cinder.context -from cinder.openstack.common import jsonutils from cinder import test diff --git a/cinder/tests/api/v2/test_snapshot_metadata.py b/cinder/tests/api/v2/test_snapshot_metadata.py index e27b25d88..28aa3eda6 100644 --- a/cinder/tests/api/v2/test_snapshot_metadata.py +++ b/cinder/tests/api/v2/test_snapshot_metadata.py @@ -16,6 +16,7 @@ import uuid from oslo.config import cfg +from oslo.serialization import jsonutils import webob from cinder.api import extensions @@ -23,7 +24,6 @@ from cinder.api.v2 import snapshot_metadata from cinder.api.v2 import snapshots import cinder.db from cinder import exception -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes diff --git a/cinder/tests/api/v2/test_volume_metadata.py b/cinder/tests/api/v2/test_volume_metadata.py index a5a999041..6e90c4495 100644 --- a/cinder/tests/api/v2/test_volume_metadata.py +++ b/cinder/tests/api/v2/test_volume_metadata.py @@ -16,6 +16,7 @@ import uuid from oslo.config import cfg +from oslo.serialization import jsonutils import webob from cinder.api import extensions @@ -23,7 +24,6 @@ from cinder.api.v2 import volume_metadata from cinder.api.v2 import volumes from cinder import db from cinder import exception -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.api import fakes from cinder.tests.api.v2 import stubs diff --git a/cinder/tests/integrated/api/client.py b/cinder/tests/integrated/api/client.py index b8d597018..795b933d2 100644 --- a/cinder/tests/integrated/api/client.py +++ b/cinder/tests/integrated/api/client.py @@ -13,11 +13,11 @@ # under the License. import netaddr +from oslo.serialization import jsonutils import requests import six.moves.urllib.parse as urlparse from cinder.i18n import _ -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging diff --git a/cinder/tests/scheduler/test_host_filters.py b/cinder/tests/scheduler/test_host_filters.py index d93cc7ec4..9736e093e 100644 --- a/cinder/tests/scheduler/test_host_filters.py +++ b/cinder/tests/scheduler/test_host_filters.py @@ -16,10 +16,10 @@ Tests For Scheduler Host Filters. """ import mock +from oslo.serialization import jsonutils from cinder import context from cinder import db -from cinder.openstack.common import jsonutils from cinder.openstack.common.scheduler import filters from cinder import test from cinder.tests.scheduler import fakes diff --git a/cinder/tests/scheduler/test_scheduler_options.py b/cinder/tests/scheduler/test_scheduler_options.py index c6e34395b..bd9bd052a 100644 --- a/cinder/tests/scheduler/test_scheduler_options.py +++ b/cinder/tests/scheduler/test_scheduler_options.py @@ -18,9 +18,9 @@ Tests For PickledScheduler. import datetime +from oslo.serialization import jsonutils import six -from cinder.openstack.common import jsonutils from cinder.scheduler import scheduler_options from cinder import test diff --git a/cinder/tests/test_backup_ceph.py b/cinder/tests/test_backup_ceph.py index 75fc6cc11..b161cc142 100644 --- a/cinder/tests/test_backup_ceph.py +++ b/cinder/tests/test_backup_ceph.py @@ -21,6 +21,7 @@ import tempfile import uuid import mock +from oslo.serialization import jsonutils import six from cinder.backup import driver @@ -29,7 +30,6 @@ from cinder import context from cinder import db from cinder import exception from cinder.i18n import _ -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder.openstack.common import processutils from cinder import test diff --git a/cinder/tests/test_backup_driver_base.py b/cinder/tests/test_backup_driver_base.py index 1fbb6797a..67a2d8f0d 100644 --- a/cinder/tests/test_backup_driver_base.py +++ b/cinder/tests/test_backup_driver_base.py @@ -17,12 +17,12 @@ import uuid import mock +from oslo.serialization import jsonutils from cinder.backup import driver from cinder import context from cinder import db from cinder import exception -from cinder.openstack.common import jsonutils from cinder import test from cinder.tests.backup import fake_service diff --git a/cinder/tests/test_coraid.py b/cinder/tests/test_coraid.py index 38eeb7ef5..bc528e1c9 100644 --- a/cinder/tests/test_coraid.py +++ b/cinder/tests/test_coraid.py @@ -19,11 +19,11 @@ import math import mock import mox from oslo.config import cfg +from oslo.serialization import jsonutils from cinder.brick.initiator import connector from cinder import exception from cinder.image import image_utils -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder.openstack.common import units from cinder import test diff --git a/cinder/tests/test_volume.py b/cinder/tests/test_volume.py index 4eaf8d47c..32628dbb6 100644 --- a/cinder/tests/test_volume.py +++ b/cinder/tests/test_volume.py @@ -30,6 +30,7 @@ import eventlet import mock import mox from oslo.config import cfg +from oslo.serialization import jsonutils from stevedore import extension from taskflow.engines.action_engine import engine @@ -43,7 +44,6 @@ from cinder.image import image_utils from cinder import keymgr from cinder.openstack.common import fileutils from cinder.openstack.common import importutils -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder.openstack.common import timeutils from cinder.openstack.common import units diff --git a/cinder/tests/test_volume_rpcapi.py b/cinder/tests/test_volume_rpcapi.py index 82fe6396d..a94ee5bcb 100644 --- a/cinder/tests/test_volume_rpcapi.py +++ b/cinder/tests/test_volume_rpcapi.py @@ -18,10 +18,10 @@ Unit Tests for cinder.volume.rpcapi import copy from oslo.config import cfg +from oslo.serialization import jsonutils from cinder import context from cinder import db -from cinder.openstack.common import jsonutils from cinder import test from cinder.volume import rpcapi as volume_rpcapi diff --git a/cinder/volume/drivers/coraid.py b/cinder/volume/drivers/coraid.py index caee1003f..4bafa7a15 100644 --- a/cinder/volume/drivers/coraid.py +++ b/cinder/volume/drivers/coraid.py @@ -27,11 +27,11 @@ import urllib import urllib2 from oslo.config import cfg +from oslo.serialization import jsonutils import six.moves.urllib.parse as urlparse from cinder import exception from cinder.i18n import _ -from cinder.openstack.common import jsonutils from cinder.openstack.common import lockutils from cinder.openstack.common import log as logging from cinder.openstack.common import units diff --git a/cinder/volume/drivers/emc/emc_vnx_cli.py b/cinder/volume/drivers/emc/emc_vnx_cli.py index 903d2161a..41fa66b49 100644 --- a/cinder/volume/drivers/emc/emc_vnx_cli.py +++ b/cinder/volume/drivers/emc/emc_vnx_cli.py @@ -22,13 +22,13 @@ import re import time from oslo.config import cfg +from oslo.serialization import jsonutils as json import six from cinder import exception from cinder.exception import EMCVnxCLICmdError from cinder.i18n import _ from cinder.openstack.common import excutils -from cinder.openstack.common import jsonutils as json from cinder.openstack.common import lockutils from cinder.openstack.common import log as logging from cinder.openstack.common import loopingcall diff --git a/cinder/volume/drivers/nexenta/jsonrpc.py b/cinder/volume/drivers/nexenta/jsonrpc.py index 54a9820fb..fc1152b58 100644 --- a/cinder/volume/drivers/nexenta/jsonrpc.py +++ b/cinder/volume/drivers/nexenta/jsonrpc.py @@ -23,8 +23,9 @@ import urllib2 +from oslo.serialization import jsonutils + from cinder.i18n import _, _LE, _LI -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder.volume.drivers import nexenta diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 05c18fe0e..def590c45 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -41,6 +41,7 @@ import time from oslo.config import cfg from oslo import messaging +from oslo.serialization import jsonutils from osprofiler import profiler from cinder import compute @@ -52,7 +53,6 @@ from cinder.image import glance from cinder import manager from cinder.openstack.common import excutils from cinder.openstack.common import importutils -from cinder.openstack.common import jsonutils from cinder.openstack.common import log as logging from cinder.openstack.common import periodic_task from cinder.openstack.common import timeutils diff --git a/cinder/volume/rpcapi.py b/cinder/volume/rpcapi.py index a48c5f075..544fc2a54 100644 --- a/cinder/volume/rpcapi.py +++ b/cinder/volume/rpcapi.py @@ -18,8 +18,8 @@ Client side of the volume RPC API. from oslo.config import cfg from oslo import messaging +from oslo.serialization import jsonutils -from cinder.openstack.common import jsonutils from cinder import rpc from cinder.volume import utils diff --git a/requirements.txt b/requirements.txt index eb6b6e65a..9507c57a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,6 +17,7 @@ oslo.config>=1.4.0 # Apache-2.0 oslo.db>=1.0.0 # Apache-2.0 oslo.messaging>=1.4.0 oslo.rootwrap>=1.3.0 +oslo.serialization>=1.0.0 # Apache-2.0 osprofiler>=0.3.0 # Apache-2.0 paramiko>=1.13.0 Paste