Fix switching console type from telnet to VNC throws error.

pull/1351/head
grossmj 6 years ago
parent 6caf38206c
commit 34fcbd68f3

@ -118,7 +118,8 @@ class QEMUHandler:
qemu_manager = Qemu.instance()
vm = qemu_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
# update the console first to avoid issue if updating console type
vm.console = request.json.pop("console", vm.console)
for name, value in request.json.items():
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)

Loading…
Cancel
Save