mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 16:28:11 +00:00
parent
2e592d3199
commit
cf17176bfc
@ -92,6 +92,8 @@ class NIOUDP(NIO):
|
||||
@asyncio.coroutine
|
||||
def close(self):
|
||||
if self._local_tunnel_lport:
|
||||
name = 'DYNAMIPS-{}-{}'.format(self._local_tunnel_lport, self._local_tunnel_rport)
|
||||
yield from self._node.ubridge_delete_bridge(name)
|
||||
self._node.manager.port_manager.release_udp_port(self._local_tunnel_lport, self ._node.project)
|
||||
if self._local_tunnel_rport:
|
||||
self._node.manager.port_manager.release_udp_port(self._local_tunnel_rport, self._node.project)
|
||||
|
@ -1281,6 +1281,17 @@ class Router(BaseNode):
|
||||
yield from self.slot_enable_nio(slot_number, port_number)
|
||||
adapter.add_nio(port_number, nio)
|
||||
|
||||
@asyncio.coroutine
|
||||
def slot_update_nio_binding(self, slot_number, port_number, nio):
|
||||
"""
|
||||
Update a slot NIO binding.
|
||||
|
||||
:param slot_number: slot number
|
||||
:param port_number: port number
|
||||
:param nio: NIO instance to add to the slot/port
|
||||
"""
|
||||
pass
|
||||
|
||||
@asyncio.coroutine
|
||||
def slot_remove_nio_binding(self, slot_number, port_number):
|
||||
"""
|
||||
@ -1313,8 +1324,7 @@ class Router(BaseNode):
|
||||
nio = adapter.get_nio(port_number)
|
||||
if nio is None:
|
||||
return
|
||||
if isinstance(nio, NIOUDP):
|
||||
self.manager.port_manager.release_udp_port(nio.lport, self._project)
|
||||
yield from nio.close()
|
||||
adapter.remove_nio(port_number)
|
||||
|
||||
log.info('Router "{name}" [{id}]: NIO {nio_name} removed from port {slot_number}/{port_number}'.format(name=self._name,
|
||||
|
Loading…
Reference in New Issue
Block a user