mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Refresh mounted media after ISO switch.
This commit is contained in:
1 parent
61c87e57a4
commit
b7af2e4d5c
2 files changed
+28
-5
No files matched your search
@@ -116,7 +116,7 @@ class QEMUHandler:
|
||||
description="Update a Qemu VM instance",
|
||||
input=QEMU_UPDATE_SCHEMA,
|
||||
output=QEMU_OBJECT_SCHEMA)
|
||||
def update(request, response):
|
||||
async def update(request, response):
|
||||
|
||||
qemu_manager = Qemu.instance()
|
||||
vm = qemu_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
||||
@@ -125,6 +125,9 @@ class QEMUHandler:
|
||||
for name, value in request.json.items():
|
||||
if hasattr(vm, name) and getattr(vm, name) != value:
|
||||
setattr(vm, name, value)
|
||||
if name == "cdrom_image":
|
||||
# let the guest know about the new cdrom image
|
||||
await vm.update_cdrom_image()
|
||||
|
||||
vm.updated()
|
||||
response.json(vm)
|
||||
|
||||
Reference in new issue
Block a user