mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-16 06:18:19 +00:00
Prevent connect a node to himself
Fix https://github.com/GNS3/gns3-gui/issues/1553
This commit is contained in:
@ -463,6 +463,7 @@ class BaseNode:
|
||||
:param command: command to send
|
||||
"""
|
||||
|
||||
print(self._ubridge_hypervisor)
|
||||
if not self._ubridge_hypervisor or not self._ubridge_hypervisor.is_running():
|
||||
raise NodeError("Cannot send command '{}': uBridge is not running".format(command))
|
||||
try:
|
||||
@ -498,6 +499,7 @@ class BaseNode:
|
||||
"""
|
||||
|
||||
if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running():
|
||||
log.info("Stopping uBridge hypervisor {}:{}".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port))
|
||||
yield from self._ubridge_hypervisor.stop()
|
||||
|
||||
@asyncio.coroutine
|
||||
|
Reference in New Issue
Block a user