mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 14:31:13 +02:00
Fix Qemu VM state support after closing a project and check for JSON data returned by qemu-img. Fixes #1591
This commit is contained in:
1 parent
424db843ca
commit
e8b8554c1a
3 files changed
+48
-23
No files matched your search
@@ -27,6 +27,9 @@ import itertools
|
||||
from .topology import load_topology
|
||||
from ..utils.asyncio import wait_run_in_executor
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
"""
|
||||
Handle the import of project from a .gns3project
|
||||
"""
|
||||
@@ -126,6 +129,14 @@ async def import_project(controller, project_id, stream, location=None, name=Non
|
||||
node["compute_id"] = "vm"
|
||||
else:
|
||||
# Round-robin through available compute resources.
|
||||
# computes = []
|
||||
# for compute_id in controller.computes:
|
||||
# compute = controller.get_compute(compute_id)
|
||||
# # only use the local compute or any connected compute
|
||||
# if compute_id == "local" or compute.connected:
|
||||
# computes.append(compute_id)
|
||||
# else:
|
||||
# log.warning(compute.name, "is not connected!")
|
||||
compute_nodes = itertools.cycle(controller.computes)
|
||||
for node in topology["topology"]["nodes"]:
|
||||
node["compute_id"] = next(compute_nodes)
|
||||
|
||||
Reference in new issue
Block a user