]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Use jsonutils instead of stdlib json
authorIhar Hrachyshka <ihrachys@redhat.com>
Thu, 7 Aug 2014 22:04:44 +0000 (00:04 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Thu, 14 Aug 2014 10:45:58 +0000 (12:45 +0200)
commit0a75865b1f9bb728d6c1efc8b49586537526ed88
treee1ce51083dcb30c656814da264dd3ae9cfdfd700
parent4b3547c28c244f70803de9dc47d767f80b7ec2dc
Use jsonutils instead of stdlib json

jsonutils provides multiple benefits in comparison to pure stdlib json
(like using simplejson on Python 2.6).

Similar patch was already merged before [1], but since it lacked hacking
rule to enforce jsonutils usage, new occurrences of stdlib json module
usage were introduced.

This patch switches all the code to using jsonutils and adds a hacking
rule to enforce the rule.

The hacking rule requires that jsonutils module does not mimic as 'json'
thru using import renames, so the code was updated not to rename the
module when doing import.

The hacking rule was shamelessly copied from the corresponding nova
review [2].

[1]: https://review.openstack.org/#/c/99760/
[2]: https://review.openstack.org/111296/

Change-Id: Ie7a5bb76445e15cde9fbf9ff3d2101a014637b37
28 files changed:
HACKING.rst
neutron/hacking/checks.py
neutron/plugins/bigswitch/servermanager.py
neutron/plugins/bigswitch/tests/test_server.py
neutron/plugins/cisco/cfg_agent/device_drivers/dummy_driver.py
neutron/plugins/ml2/drivers/cisco/apic/apic_client.py
neutron/plugins/nec/common/ofc_client.py
neutron/plugins/oneconvergence/lib/nvsdlib.py
neutron/plugins/oneconvergence/lib/plugin_helper.py
neutron/plugins/vmware/api_client/eventlet_request.py
neutron/plugins/vmware/nsxlib/__init__.py
neutron/plugins/vmware/nsxlib/l2gateway.py
neutron/plugins/vmware/nsxlib/lsn.py
neutron/plugins/vmware/nsxlib/secgroup.py
neutron/plugins/vmware/nsxlib/switch.py
neutron/services/firewall/agents/varmour/varmour_api.py
neutron/services/loadbalancer/drivers/radware/driver.py
neutron/tests/unit/bigswitch/fake_server.py
neutron/tests/unit/nec/test_ofc_client.py
neutron/tests/unit/oneconvergence/test_nvsdlib.py
neutron/tests/unit/oneconvergence/test_plugin_helper.py
neutron/tests/unit/services/loadbalancer/drivers/radware/test_plugin_driver.py
neutron/tests/unit/test_hacking.py
neutron/tests/unit/test_policy.py
neutron/tests/unit/vmware/apiclient/fake.py
neutron/tests/unit/vmware/nsxlib/test_lsn.py
neutron/tests/unit/vmware/test_nsx_sync.py
neutron/tests/unit/vmware/vshield/fake_vcns.py