mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge branch '2.0' into 2.1
This commit is contained in:
335 files changed
+1000
-5777
No files matched your search
@@ -533,7 +533,7 @@ class BaseNode:
|
||||
|
||||
server_config = self._manager.config.get_section_config("Server")
|
||||
server_host = server_config.get("host")
|
||||
if not self._ubridge_hypervisor:
|
||||
if not self.ubridge:
|
||||
self._ubridge_hypervisor = Hypervisor(self._project, self.ubridge_path, self.working_dir, server_host)
|
||||
log.info("Starting new uBridge hypervisor {}:{}".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port))
|
||||
yield from self._ubridge_hypervisor.start()
|
||||
|
||||
@@ -81,7 +81,9 @@ class Cloud(BaseNode):
|
||||
"project_id": self.project.id,
|
||||
"ports_mapping": self._ports_mapping,
|
||||
"interfaces": host_interfaces,
|
||||
"status": self.status}
|
||||
"status": self.status,
|
||||
"node_directory": self.working_dir
|
||||
}
|
||||
|
||||
@property
|
||||
def ports_mapping(self):
|
||||
|
||||
@@ -935,6 +935,7 @@ class QemuVM(BaseNode):
|
||||
except OSError as e:
|
||||
raise QemuError("Could not start QEMU console {}\n".format(e))
|
||||
|
||||
@asyncio.coroutine
|
||||
def _termination_callback(self, returncode):
|
||||
"""
|
||||
Called when the process has stopped.
|
||||
@@ -944,9 +945,7 @@ class QemuVM(BaseNode):
|
||||
|
||||
if self.started:
|
||||
log.info("QEMU process has stopped, return code: %d", returncode)
|
||||
self.status = "stopped"
|
||||
self._hw_virtualization = False
|
||||
self._process = None
|
||||
yield from self.stop()
|
||||
# A return code of 1 seem fine on Windows
|
||||
if returncode != 0 and (returncode != 1 or not sys.platform.startswith("win")):
|
||||
self.project.emit("log.error", {"message": "QEMU process has stopped, return code: {}\n{}".format(returncode, self.read_stdout())})
|
||||
|
||||
Reference in new issue
Block a user