Browse Source

Update json module to jsonutils

oslo project provide jsonutils, and the others project use it now,
this PS to update json moudule to oslo jsonutils for consistency.

Change-Id: I51bcac143d3750aa991aeed6e95e011389f011d8
zhulingjie 2 months ago
parent
commit
35112fc7c7

+ 2
- 1
freezer_tempest_plugin/common.py View File

@@ -16,7 +16,6 @@
16 16
 import distutils.spawn
17 17
 import hashlib
18 18
 import itertools
19
-import json
20 19
 import os
21 20
 import random
22 21
 import shutil
@@ -26,6 +25,8 @@ import unittest
26 25
 
27 26
 import paramiko
28 27
 
28
+from oslo_serialization import jsonutils as json
29
+
29 30
 from six.moves import range
30 31
 
31 32
 FREEZERC = distutils.spawn.find_executable('freezer-agent')

+ 2
- 1
freezer_tempest_plugin/tests/freezer/agent/base.py View File

@@ -14,7 +14,6 @@
14 14
 
15 15
 from datetime import datetime
16 16
 from datetime import timedelta
17
-import json
18 17
 import os
19 18
 import subprocess
20 19
 
@@ -22,6 +21,8 @@ from time import mktime
22 21
 
23 22
 from tempest import test
24 23
 
24
+from oslo_serialization import jsonutils as json
25
+
25 26
 from freezer_tempest_plugin.common import Temp_Tree
26 27
 
27 28
 

+ 2
- 1
freezer_tempest_plugin/tests/freezer/agent/test_backup_compress.py View File

@@ -12,12 +12,13 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-import json
16 15
 import os
17 16
 import subprocess
18 17
 
19 18
 from tempest.lib import decorators
20 19
 
20
+from oslo_serialization import jsonutils as json
21
+
21 22
 from freezer_tempest_plugin import common
22 23
 from freezer_tempest_plugin.tests.freezer.agent import base
23 24
 

+ 2
- 1
freezer_tempest_plugin/tests/freezer/scenario/test_backups.py View File

@@ -13,7 +13,6 @@
13 13
 # under the License.
14 14
 
15 15
 import hashlib
16
-import json
17 16
 import os
18 17
 import shutil
19 18
 import tempfile
@@ -22,6 +21,8 @@ import time
22 21
 from tempest.lib.cli import base as cli_base
23 22
 from tempest.lib.cli import output_parser
24 23
 
24
+from oslo_serialization import jsonutils as json
25
+
25 26
 from freezer_tempest_plugin.tests.freezer.agent import base
26 27
 
27 28
 JOB_TABLE_RESULT_COLUMN = 3

+ 2
- 2
freezer_tempest_plugin/tests/freezer_api/api/test_api_actions.py View File

@@ -12,11 +12,11 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-import json
16
-
17 15
 from tempest.lib import decorators
18 16
 from tempest.lib import exceptions
19 17
 
18
+from oslo_serialization import jsonutils as json
19
+
20 20
 from freezer_tempest_plugin.tests.freezer_api.api import base
21 21
 
22 22
 

+ 2
- 2
freezer_tempest_plugin/tests/freezer_api/api/test_api_backups.py View File

@@ -12,11 +12,11 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-import json
16
-
17 15
 import tempest
18 16
 from tempest.lib import decorators
19 17
 
18
+from oslo_serialization import jsonutils as json
19
+
20 20
 from freezer_tempest_plugin.tests.freezer_api.api import base
21 21
 
22 22
 

+ 2
- 1
freezer_tempest_plugin/tests/freezer_api/api/test_api_clients.py View File

@@ -12,12 +12,13 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-import json
16 15
 import time
17 16
 
18 17
 from tempest.lib import decorators
19 18
 from tempest.lib import exceptions
20 19
 
20
+from oslo_serialization import jsonutils as json
21
+
21 22
 from freezer_tempest_plugin.tests.freezer_api.api import base
22 23
 
23 24
 

+ 2
- 2
freezer_tempest_plugin/tests/freezer_api/api/test_api_jobs.py View File

@@ -12,11 +12,11 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-import json
16
-
17 15
 from tempest.lib import decorators
18 16
 from tempest.lib import exceptions
19 17
 
18
+from oslo_serialization import jsonutils as json
19
+
20 20
 from freezer_tempest_plugin.tests.freezer_api.api import base
21 21
 
22 22
 fake_job = {

+ 2
- 2
freezer_tempest_plugin/tests/freezer_api/api/test_api_sessions.py View File

@@ -12,11 +12,11 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-import json
16
-
17 15
 from tempest.lib import decorators
18 16
 from tempest.lib import exceptions
19 17
 
18
+from oslo_serialization import jsonutils as json
19
+
20 20
 from freezer_tempest_plugin.tests.freezer_api.api import base
21 21
 
22 22
 

+ 2
- 2
freezer_tempest_plugin/tests/freezer_api/api/test_api_version.py View File

@@ -12,10 +12,10 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-import json
16
-
17 15
 from tempest.lib import decorators
18 16
 
17
+from oslo_serialization import jsonutils as json
18
+
19 19
 from freezer_tempest_plugin.tests.freezer_api.api import base
20 20
 
21 21
 

+ 1
- 0
requirements.txt View File

@@ -3,6 +3,7 @@
3 3
 # process, which may cause wedges in the gate later.
4 4
 
5 5
 pbr!=2.1.0,>=2.0.0 # Apache-2.0
6
+oslo.serialization>=2.25.0 # Apache-2.0
6 7
 oslo.utils>=3.33.0 # Apache-2.0
7 8
 oslo.config>=5.2.0 # Apache-2.0
8 9
 paramiko>=2.0.0 # LGPLv2.1+

Loading…
Cancel
Save