diff --git a/freezerclient/exceptions.py b/freezerclient/exceptions.py index 9028f19..e3af04f 100644 --- a/freezerclient/exceptions.py +++ b/freezerclient/exceptions.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json +from oslo_serialization import jsonutils as json class ApiClientException(Exception): diff --git a/freezerclient/tests/unit/v1/test_client_jobs.py b/freezerclient/tests/unit/v1/test_client_jobs.py index 9b011f0..c1c5d43 100644 --- a/freezerclient/tests/unit/v1/test_client_jobs.py +++ b/freezerclient/tests/unit/v1/test_client_jobs.py @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import unittest import mock +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient.v1.managers import jobs diff --git a/freezerclient/tests/unit/v1/test_client_sessions.py b/freezerclient/tests/unit/v1/test_client_sessions.py index 74bf718..2a83cef 100644 --- a/freezerclient/tests/unit/v1/test_client_sessions.py +++ b/freezerclient/tests/unit/v1/test_client_sessions.py @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import unittest import mock +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient.v1.managers import sessions diff --git a/freezerclient/tests/unit/v2/test_client_jobs.py b/freezerclient/tests/unit/v2/test_client_jobs.py index c4373f8..ab04426 100644 --- a/freezerclient/tests/unit/v2/test_client_jobs.py +++ b/freezerclient/tests/unit/v2/test_client_jobs.py @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import unittest import mock +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient.v2.managers import jobs diff --git a/freezerclient/tests/unit/v2/test_client_sessions.py b/freezerclient/tests/unit/v2/test_client_sessions.py index 21f1f24..6c3df24 100644 --- a/freezerclient/tests/unit/v2/test_client_sessions.py +++ b/freezerclient/tests/unit/v2/test_client_sessions.py @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import unittest import mock +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient.v2.managers import sessions diff --git a/freezerclient/utils.py b/freezerclient/utils.py index 9337166..4e13b5e 100644 --- a/freezerclient/utils.py +++ b/freezerclient/utils.py @@ -13,10 +13,10 @@ # limitations under the License. -import json import logging import os +from oslo_serialization import jsonutils as json from oslo_utils import importutils logging = logging.getLogger(__name__) diff --git a/freezerclient/v1/managers/actions.py b/freezerclient/v1/managers/actions.py index a73b5ba..ac080b1 100644 --- a/freezerclient/v1/managers/actions.py +++ b/freezerclient/v1/managers/actions.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v1/managers/backups.py b/freezerclient/v1/managers/backups.py index f41a10c..f7dd302 100644 --- a/freezerclient/v1/managers/backups.py +++ b/freezerclient/v1/managers/backups.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v1/managers/clients.py b/freezerclient/v1/managers/clients.py index 7a555c1..7a680d4 100644 --- a/freezerclient/v1/managers/clients.py +++ b/freezerclient/v1/managers/clients.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v1/managers/jobs.py b/freezerclient/v1/managers/jobs.py index 483d712..50d3b3b 100644 --- a/freezerclient/v1/managers/jobs.py +++ b/freezerclient/v1/managers/jobs.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v1/managers/sessions.py b/freezerclient/v1/managers/sessions.py index d6eb120..adb5140 100644 --- a/freezerclient/v1/managers/sessions.py +++ b/freezerclient/v1/managers/sessions.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v2/managers/actions.py b/freezerclient/v2/managers/actions.py index 3d375c3..2a79f26 100644 --- a/freezerclient/v2/managers/actions.py +++ b/freezerclient/v2/managers/actions.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v2/managers/backups.py b/freezerclient/v2/managers/backups.py index 4bf9a33..f8769b9 100644 --- a/freezerclient/v2/managers/backups.py +++ b/freezerclient/v2/managers/backups.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v2/managers/clients.py b/freezerclient/v2/managers/clients.py index 8716065..1b4289e 100644 --- a/freezerclient/v2/managers/clients.py +++ b/freezerclient/v2/managers/clients.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v2/managers/jobs.py b/freezerclient/v2/managers/jobs.py index f0fd79e..0bbaf84 100644 --- a/freezerclient/v2/managers/jobs.py +++ b/freezerclient/v2/managers/jobs.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/freezerclient/v2/managers/sessions.py b/freezerclient/v2/managers/sessions.py index 3669273..1e2f390 100644 --- a/freezerclient/v2/managers/sessions.py +++ b/freezerclient/v2/managers/sessions.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import requests +from oslo_serialization import jsonutils as json + from freezerclient import exceptions from freezerclient import utils diff --git a/lower-constraints.txt b/lower-constraints.txt index f7eec08..b251d23 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -25,6 +25,7 @@ netaddr==0.7.18 netifaces==0.10.4 openstackdocstheme==1.18.1 oslo.i18n==3.15.3 +oslo.serialization==2.25.0 oslo.utils==3.33.0 pbr==2.0.0 pep8==1.7.1 diff --git a/requirements.txt b/requirements.txt index ff21bc5..e1834d9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2. pbr!=2.1.0,>=2.0.0 # Apache-2.0 keystoneauth1>=3.4.0 # Apache-2.0 cliff!=2.9.0,>=2.8.0 # Apache-2.0 +oslo.serialization>=2.25.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0