]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove the reference to non existing exception by linuxbridgeplugin.
authorYong Sheng Gong <gongysh@cn.ibm.com>
Wed, 30 May 2012 05:59:52 +0000 (13:59 +0800)
committerYong Sheng Gong <gongysh@cn.ibm.com>
Wed, 30 May 2012 23:51:25 +0000 (07:51 +0800)
commit93ee2838a2937e346e78c2e3ee21f5fed478d66f
treee53abede452fa17d76132117d561a2e3ce972155
parent76b2d851af70adc52f53241e8bc864674ce9cfba
Remove the reference to non existing exception by linuxbridgeplugin.

Bug #1006221

According to plugin api of QuantumPluginBase, unplug_interface
should only raise exception.NetworkNotFound and exception.PortNotFound.
To unplug a non-attached port should not raise Exception.
After this modification, to unplug an non-attached port will have no impact.
In addition, I remove the 'network = db.network_get(net_id)' since
 'db.validate_port_ownership(tenant_id, net_id, port_id)' statement has taken
care of the check.

patch 2: split test case to test it exclusively compared to patch 1.
patch 3: remove added test statement in previous test case

Change-Id: I437c3f13fa7a81aeabcdfca7ba03e94a0a7aa32b
quantum/plugins/linuxbridge/LinuxBridgePlugin.py
quantum/plugins/linuxbridge/tests/unit/_test_linuxbridgeAgent.py