1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00

Fixes Qemu networking.

This commit is contained in:
Jeremy 2015-03-02 16:34:28 -07:00
parent 7ace6fc7e9
commit f269ec9527

View File

@ -254,7 +254,7 @@ class QEMUHandler:
qemu_manager = Qemu.instance() qemu_manager = Qemu.instance()
vm = qemu_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"]) vm = qemu_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"])
nio = qemu_manager.create_nio(vm.qemu_path, request.json) nio = qemu_manager.create_nio(vm.qemu_path, request.json)
vm.adapter_add_nio_binding(int(request.match_info["adapter_number"]), int(request.match_info["port_number"]), nio) yield from vm.adapter_add_nio_binding(int(request.match_info["adapter_number"]), int(request.match_info["port_number"]), nio)
response.set_status(201) response.set_status(201)
response.json(nio) response.json(nio)
@ -277,7 +277,7 @@ class QEMUHandler:
qemu_manager = Qemu.instance() qemu_manager = Qemu.instance()
vm = qemu_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"]) vm = qemu_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"])
vm.adapter_remove_nio_binding(int(request.match_info["adapter_number"]), int(request.match_info["port_number"])) yield from vm.adapter_remove_nio_binding(int(request.match_info["adapter_number"]), int(request.match_info["port_number"]))
response.set_status(204) response.set_status(204)
@classmethod @classmethod