mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
parent
5f15667ad1
commit
fd18458588
@ -300,7 +300,6 @@ class DockerHandler:
|
|||||||
docker_manager = Docker.instance()
|
docker_manager = Docker.instance()
|
||||||
vm = docker_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"])
|
vm = docker_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"])
|
||||||
adapter_number = int(request.match_info["adapter_number"])
|
adapter_number = int(request.match_info["adapter_number"])
|
||||||
port_number = int(request.match_info["port_number"])
|
|
||||||
pcap_file_path = os.path.join(vm.project.capture_working_directory(), request.json["capture_file_name"])
|
pcap_file_path = os.path.join(vm.project.capture_working_directory(), request.json["capture_file_name"])
|
||||||
|
|
||||||
if not vm.is_running():
|
if not vm.is_running():
|
||||||
@ -332,6 +331,5 @@ class DockerHandler:
|
|||||||
raise HTTPConflict(text="Cannot capture traffic on a non started VM")
|
raise HTTPConflict(text="Cannot capture traffic on a non started VM")
|
||||||
|
|
||||||
adapter_number = int(request.match_info["adapter_number"])
|
adapter_number = int(request.match_info["adapter_number"])
|
||||||
port_number = int(request.match_info["port_number"])
|
yield from vm.stop_capture(adapter_number)
|
||||||
yield from vm.stop_capture(adapter_number, port_number)
|
|
||||||
response.set_status(204)
|
response.set_status(204)
|
||||||
|
Loading…
Reference in New Issue
Block a user