Update json module to jsonutils
json is deprecated, should use oslo_serialization.jsonutils instead. Change-Id: Ib4b562c3f37a5c133f3a6ae8efa00a26c8b41846
This commit is contained in:
parent
f8f1b59b7b
commit
63b5e271e4
@ -14,13 +14,13 @@
|
|||||||
|
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import json
|
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
import six
|
import six
|
||||||
# PyCharm will not recognize queue. Puts red squiggle line under it. That's OK.
|
# PyCharm will not recognize queue. Puts red squiggle line under it. That's OK.
|
||||||
from six.moves import queue
|
from six.moves import queue
|
||||||
|
@ -18,13 +18,13 @@ import os
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
from freezer.common import client_manager
|
from freezer.common import client_manager
|
||||||
from freezer.engine import engine
|
from freezer.engine import engine
|
||||||
from freezer.engine.tar import tar
|
from freezer.engine.tar import tar
|
||||||
from freezer.utils import utils
|
from freezer.utils import utils
|
||||||
|
|
||||||
import json
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
@ -17,7 +17,6 @@ Freezer rsync incremental engine
|
|||||||
|
|
||||||
import getpass
|
import getpass
|
||||||
import grp
|
import grp
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import pwd
|
import pwd
|
||||||
import re
|
import re
|
||||||
@ -26,6 +25,7 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
from six.moves import cStringIO
|
from six.moves import cStringIO
|
||||||
from six.moves import queue
|
from six.moves import queue
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
Freezer main execution function
|
Freezer main execution function
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import prettytable
|
import prettytable
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -26,6 +25,7 @@ import sys
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
from freezer.common import client_manager
|
from freezer.common import client_manager
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
Freezer restore modes related functions
|
Freezer restore modes related functions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -25,6 +24,7 @@ import time
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
from freezer.utils import utils
|
from freezer.utils import utils
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -23,6 +22,7 @@ import time
|
|||||||
from freezer.utils import utils
|
from freezer.utils import utils
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
from six.moves import configparser
|
from six.moves import configparser
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,13 +13,13 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from freezerclient import exceptions
|
from freezerclient import exceptions
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import json
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from freezer.utils import utils
|
from freezer.utils import utils
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import json
|
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
from freezer.storage import physical
|
from freezer.storage import physical
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ limitations under the License.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import ftplib
|
import ftplib
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import socket
|
import socket
|
||||||
@ -25,6 +24,7 @@ import tempfile
|
|||||||
from freezer.storage import fslike
|
from freezer.storage import fslike
|
||||||
from freezer.utils import utils
|
from freezer.utils import utils
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
CHUNK_SIZE = 32768
|
CHUNK_SIZE = 32768
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
@ -12,15 +12,13 @@
|
|||||||
# 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 botocore
|
import botocore
|
||||||
import botocore.session
|
import botocore.session
|
||||||
import logging
|
import logging
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||||
|
|
||||||
from freezer.storage import physical
|
from freezer.storage import physical
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
import distutils.spawn
|
import distutils.spawn
|
||||||
import hashlib
|
import hashlib
|
||||||
import itertools
|
import itertools
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
@ -24,6 +23,8 @@ import subprocess
|
|||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
import paramiko
|
import paramiko
|
||||||
|
|
||||||
from six.moves import range
|
from six.moves import range
|
||||||
@ -295,7 +296,7 @@ class TestFS(unittest.TestCase):
|
|||||||
def get_file_list_openstack(self, container):
|
def get_file_list_openstack(self, container):
|
||||||
if self.openstack_executable:
|
if self.openstack_executable:
|
||||||
json_result = execute([self.openstack_executable, 'object', 'list',
|
json_result = execute([self.openstack_executable, 'object', 'list',
|
||||||
container, '-f', json])
|
container, '-f', 'json'])
|
||||||
result = json.loads(json_result)
|
result = json.loads(json_result)
|
||||||
return [x['Name'] for x in result]
|
return [x['Name'] for x in result]
|
||||||
if self.swift_executable:
|
if self.swift_executable:
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
# ========================================================================
|
# ========================================================================
|
||||||
|
|
||||||
from copy import copy
|
from copy import copy
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
|
|
||||||
from freezer.tests.integration import common
|
from freezer.tests.integration import common
|
||||||
|
@ -12,13 +12,13 @@
|
|||||||
# 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
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
from freezer.engine.nova import nova
|
from freezer.engine.nova import nova
|
||||||
from freezer.tests import commons
|
from freezer.tests import commons
|
||||||
|
|
||||||
|
@ -13,10 +13,11 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import ctypes
|
import ctypes
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from oslo_serialization import jsonutils as json
|
||||||
|
|
||||||
|
|
||||||
def is_windows():
|
def is_windows():
|
||||||
"""
|
"""
|
||||||
|
@ -11,6 +11,7 @@ python-keystoneclient>=3.8.0 # Apache-2.0
|
|||||||
python-novaclient>=9.1.0 # Apache-2.0
|
python-novaclient>=9.1.0 # Apache-2.0
|
||||||
python-neutronclient>=6.7.0 # Apache-2.0
|
python-neutronclient>=6.7.0 # Apache-2.0
|
||||||
python-freezerclient>=2.0.0 # Apache-2.0
|
python-freezerclient>=2.0.0 # Apache-2.0
|
||||||
|
oslo.serialization>=2.25.0 # Apache-2.0
|
||||||
oslo.utils>=3.33.0 # Apache-2.0
|
oslo.utils>=3.33.0 # Apache-2.0
|
||||||
oslo.log>=3.36.0 # Apache-2.0
|
oslo.log>=3.36.0 # Apache-2.0
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=5.2.0 # Apache-2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user