mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-15 22:08:17 +00:00
Functional cloud. Fixes #402.
This commit is contained in:
@ -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