mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-02-01 14:02:06 +01:00
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>
This commit is contained in:
parent
068020de3b
commit
1fd877f7c1
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user