1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-11 08:30:57 +00:00

Fixes adapter bug with VirtualBox.

This commit is contained in:
Jeremy 2015-03-04 18:24:15 -07:00
parent bae5b6edb4
commit 7a6136ed14

View File

@ -124,17 +124,17 @@ class VirtualBoxHandler:
if "enable_remote_console" in request.json:
yield from vm.set_enable_remote_console(request.json.pop("enable_remote_console"))
if "adapters" in request.json:
adapters = int(request.json.pop("adapters"))
if adapters != vm.adapters:
yield from vm.set_adapters(adapters)
for name, value in request.json.items():
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
if name == "vmname":
yield from vm.rename_in_virtualbox()
if "adapters" in request.json:
adapters = int(request.json["adapters"])
if adapters != vm.adapters:
yield from vm.set_adapters(adapters)
response.json(vm)
@classmethod