Replace jsonutils by common json package
This PS is going to following item: - Remove dependency oslo.serialization which only use at one test-case and use build-in python package that is json[1] in the code-base. - Ignore N521 check in the flake which no longer need to check when we change into json. [1] https://docs.python.org/3.6/library/json.html Change-Id: I22cf66d1ea5666a072a06456213a7964c5deced8
This commit is contained in:
parent
cef88d227d
commit
d75663961d
|
@ -14,11 +14,11 @@
|
||||||
# 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 subprocess
|
import subprocess
|
||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
from oslo_serialization import jsonutils
|
|
||||||
from oslo_utils import netutils
|
from oslo_utils import netutils
|
||||||
|
|
||||||
from tempest.common import compute
|
from tempest.common import compute
|
||||||
|
@ -472,7 +472,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||||
|
|
||||||
bdm = image_props.get('block_device_mapping')
|
bdm = image_props.get('block_device_mapping')
|
||||||
if bdm:
|
if bdm:
|
||||||
bdm = jsonutils.loads(bdm)
|
bdm = json.loads(bdm)
|
||||||
if bdm and 'snapshot_id' in bdm[0]:
|
if bdm and 'snapshot_id' in bdm[0]:
|
||||||
snapshot_id = bdm[0]['snapshot_id']
|
snapshot_id = bdm[0]['snapshot_id']
|
||||||
self.addCleanup(
|
self.addCleanup(
|
||||||
|
|
|
@ -13,7 +13,6 @@ oslo.config>=5.1.0 # Apache-2.0
|
||||||
oslo.db>=4.27.0 # Apache-2.0
|
oslo.db>=4.27.0 # Apache-2.0
|
||||||
oslo.log>=3.30.0 # Apache-2.0
|
oslo.log>=3.30.0 # Apache-2.0
|
||||||
oslo.messaging>=5.29.0 # Apache-2.0
|
oslo.messaging>=5.29.0 # Apache-2.0
|
||||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
|
||||||
oslo.service>=1.24.0 # Apache-2.0
|
oslo.service>=1.24.0 # Apache-2.0
|
||||||
oslo.utils>=3.31.0 # Apache-2.0
|
oslo.utils>=3.31.0 # Apache-2.0
|
||||||
oslo.privsep>=1.23.0 # Apache-2.0
|
oslo.privsep>=1.23.0 # Apache-2.0
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -94,7 +94,8 @@ commands = python setup.py build_sphinx
|
||||||
# H106: Do not put vim configuration in source files
|
# H106: Do not put vim configuration in source files
|
||||||
# H203: Use assertIs(Not)None to check for None
|
# H203: Use assertIs(Not)None to check for None
|
||||||
# H904: Delay string interpolations at logging calls
|
# H904: Delay string interpolations at logging calls
|
||||||
ignore = E125,E126,E128,E129,E265,H404,H405,N530
|
# N521: jsonutils.loads must be used instead of json.loads
|
||||||
|
ignore = E125,E126,E128,E129,E265,H404,H405,N530,N521
|
||||||
enable-extensions=H106,H203,H904
|
enable-extensions=H106,H203,H904
|
||||||
show-source = true
|
show-source = true
|
||||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,.tmp,*egg,build,tools,.ropeproject,rally-scenarios
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,.tmp,*egg,build,tools,.ropeproject,rally-scenarios
|
||||||
|
|
Loading…
Reference in New Issue