mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Functional cloud. Fixes #402.
This commit is contained in:
1 parent
39a3f2fae2
commit
59f22cd346
3 files changed
+207
-18
No files matched your search
@@ -415,6 +415,18 @@ class BaseNode:
|
||||
raise NodeError("uBridge is not installed")
|
||||
return path
|
||||
|
||||
@asyncio.coroutine
|
||||
def _ubridge_send(self, command):
|
||||
"""
|
||||
Sends a command to uBridge hypervisor.
|
||||
|
||||
:param command: command to send
|
||||
"""
|
||||
|
||||
if not self._ubridge_hypervisor or not self._ubridge_hypervisor.is_running():
|
||||
raise NodeError("Cannot send command '{}': uBridge is not running".format(command))
|
||||
yield from self._ubridge_hypervisor.send(command)
|
||||
|
||||
@asyncio.coroutine
|
||||
def _start_ubridge(self):
|
||||
"""
|
||||
@@ -433,6 +445,15 @@ class BaseNode:
|
||||
log.info("Hypervisor {}:{} has successfully started".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port))
|
||||
yield from self._ubridge_hypervisor.connect()
|
||||
|
||||
@asyncio.coroutine
|
||||
def _stop_ubridge(self):
|
||||
"""
|
||||
Stops uBridge.
|
||||
"""
|
||||
|
||||
if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running():
|
||||
yield from self._ubridge_hypervisor.stop()
|
||||
|
||||
@property
|
||||
def hw_virtualization(self):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user