summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2013-07-10 18:35:06 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-07-13 08:17:16 +0900
commit1fd877f7c18455aee7202e55856f287e40fcd4ab (patch)
tree63e61385b065daacda224d85dfecd45fa6b38047
parent068020de3b1da72814a8ca07ae9a3dac254c7242 (diff)
network.py: exception in Networks.remove_port()
Neutron plugin can call remove_port after network deletion for automatic delete port like router/dhcp port. So ignore NetworkNotFound exception. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/controller/network.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ryu/controller/network.py b/ryu/controller/network.py
index f70da080..5c04e5fc 100644
--- a/ryu/controller/network.py
+++ b/ryu/controller/network.py
@@ -368,7 +368,12 @@ class Network(app_manager.RyuApp):
old_mac_address = self._get_old_mac(network_id, dpid, port_no)
self.dpids.remove_port(dpid, port_no)
- self.networks.remove(network_id, dpid, port_no)
+ try:
+ self.networks.remove(network_id, dpid, port_no)
+ except NetworkNotFound:
+ # port deletion can be called after network deletion
+ # due to Openstack auto deletion port.(dhcp/router port)
+ pass
if old_mac_address is not None:
self.mac_addresses.remove_port(network_id, dpid, port_no,
old_mac_address)