Functional cloud. Fixes #402.

This commit is contained in:
grossmj
2016-05-29 16:35:07 -06:00
parent 39a3f2fae2
commit 59f22cd346
3 changed files with 207 additions and 18 deletions

View File

@ -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):
"""