Catch an error in etherswitch when ubridge die

Fix #907
pull/916/head
Julien Duponchelle 7 years ago
parent 7407ab88b3
commit 132a7bfeb7
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -211,7 +211,8 @@ class EthernetSwitch(Device):
nio = self._nios[port_number]
if isinstance(nio, NIOUDP):
self.manager.port_manager.release_udp_port(nio.lport, self._project)
yield from self._hypervisor.send('ethsw remove_nio "{name}" {nio}'.format(name=self._name, nio=nio))
if self._hypervisor:
yield from self._hypervisor.send('ethsw remove_nio "{name}" {nio}'.format(name=self._name, nio=nio))
log.info('Ethernet switch "{name}" [{id}]: NIO {nio} removed from port {port}'.format(name=self._name,
id=self._id,

Loading…
Cancel
Save