]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix some plugins that don't check that nets + ports are owned by tenant
authorDan Wendlandt <dan@nicira.com>
Tue, 28 Feb 2012 20:34:49 +0000 (12:34 -0800)
committerDan Wendlandt <dan@nicira.com>
Tue, 28 Feb 2012 20:34:49 +0000 (12:34 -0800)
commitc029777dd7523c5216fee5d48dd9f9ca4bf3b84d
treebc47c0f91349cd586b1cb069f104779940a139b5
parent8853f470a58cbc2f4651c919cb0fb605588b9ed2
Fix some plugins that don't check that nets + ports are owned by tenant

bug 942713. This bug confuses the validate_networks() method of
QuantumManager in Nova, causing it to believe that it is valid for a
tenant to plug into a particular network when in fact that network is not
owned by the tenant, nor the "provider".

The patch also adds unit tests to confirm correct plugin behavior.

This patch fixes the issue for the Sample Plugin, the OVS plugin,
the Linux Bridge plugin, and the Ryu plugin, all of which has the
same DB model.  Validated the fix with the unit tests.

I couldn't run the unit tests for the NVP plugin standalone, but by
inspection, the code seems to handle this case.  I wasn't able to run
the Cisco plugin unit tests, and that code uses its own DB model, so I
am uncertain whether this issue exists in that plugin.

Change-Id: I8c4a5f3eb151b91a1076821dc1916842510dfb90
quantum/db/api.py
quantum/plugins/linuxbridge/LinuxBridgePlugin.py
quantum/plugins/openvswitch/ovs_quantum_plugin.py
quantum/plugins/ryu/ovs_quantum_plugin_base.py
quantum/plugins/sample/SamplePlugin.py
quantum/tests/unit/_test_api.py