d9bd9328b2
Closes-Bug: #1190621 This fix improves test code coverage for the file: neutron/plugins/cisco/network_plugin.py from 34% to 98%. Some of the changes made to realize this code coverage improvements are the following: - Core API methods (create_network, update_network, etc.) have been removed from the core plugin (network_plugin.py). These methods are currently unused. Before this change, we relied on the underlying model layer to inform the core plugin whether or not the model layer was capable of handling these core API calls itself via a 'MANAGE_STATE' attribute. However, there is only one existing model layer implementation (i.e. for Nexus plugin; the N1KV plugin does not use network_plugin.py), and that model layer supports the core API calls. Given that it is unlikely that another model layer for the Cisco Nexus plugin will ever be developed (esp. with the availability of the ML2 plugin), so it makes more sense to delete this untested code. - Exception raising for non-existent credentials has been removed from get_credential_details and rename_credential methods since exceptions are already raised for this condition in lower-level credential database code. - The schedule_host, associate_port, and detach_port methods are deleted because these essentially do nothing useful (log a debug message and then return None), since these methods look for the same-named methods in the model layer, but these methods are not defined in the model layer. - The helper functions _invoke_device_plugins and _func_name are deleted because they are no longer used. - In unit test code for the Cisco QoS and credentials database, calls are now made indirectly through the core plugin (network_plugin.py) extension API methods, as a quick-and-easy way to provide code coverage for these core plugin methods. Change-Id: I0c0d9e2b251a7c0355d83e495912302c5cc4d032 |
||
---|---|---|
.. | ||
__init__.py | ||
virt_phy_sw_v2.py |