Enable JSON support for N1KV REST calls¶
Need to enable Cisco N1KV plugin to accept REST API responses in JSON.
Currently, Cisco N1KV Neutron plugin and VSM (controller) communicate using REST APIs. The VSM is capable of returning responses in XML and JSON. However, the plugin handles only XML responses.
The proposed change is to use the Requests library to support handling of REST API responses in JSON. The Requests library will replace the httplib2 library currently being used by the plugin.
Data model impact¶
REST API impact¶
Other end user impact¶
Other deployer impact¶
requests library version >= 1.1 (as per neutron requirements.txt)
- Primary assignee:
- Other contributors:
- Replace httplib2 library used in the plugin with Requests library.
- Modify all the methods in n1kvclient to use the Requests library.
- Replace the current XML parsing logic in the response handlers for policy profiles to handle JSON responses.
Currently, unit tests include coverage of XML responses. The test code will be modified to handle JSON responses.