Implements uBridge hypervisor.

This commit is contained in:
grossmj
2015-07-19 22:55:10 -06:00
parent 5125ddcde4
commit 1f890b4cad
7 changed files with 582 additions and 149 deletions

View File

@ -24,6 +24,7 @@ import subprocess
import tempfile
import asyncio
from gns3server.utils.asyncio import wait_for_process_termination
from .dynamips_hypervisor import DynamipsHypervisor
from .dynamips_error import DynamipsError
@ -146,7 +147,7 @@ class Hypervisor(DynamipsHypervisor):
# time to delete UNIX NIOs for instance.
yield from asyncio.sleep(0.01)
try:
yield from asyncio.wait_for(self._process.wait(), timeout=3)
yield from wait_for_process_termination(self._process, timeout=3)
except asyncio.TimeoutError:
if self._process.returncode is None:
log.warn("Dynamips process {} is still running... killing it".format(self._process.pid))