Fix an issue with Docker and IOU packet capture

Fix https://github.com/GNS3/gns3-gui/issues/1727
This commit is contained in:
Julien Duponchelle
2016-12-19 12:26:34 +01:00
parent 3bc78f61df
commit 2011aca43a
4 changed files with 1 additions and 56 deletions

View File

@ -284,8 +284,6 @@ class DockerHandler:
adapter_number = int(request.match_info["adapter_number"])
pcap_file_path = os.path.join(container.project.capture_working_directory(), request.json["capture_file_name"])
if not container.is_running():
raise HTTPConflict(text="Cannot capture traffic on a non started Docker container")
yield from container.start_capture(adapter_number, pcap_file_path)
response.json({"pcap_file_path": str(pcap_file_path)})
@ -309,9 +307,6 @@ class DockerHandler:
docker_manager = Docker.instance()
container = docker_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
if not container.is_running():
raise HTTPConflict(text="Cannot capture traffic on a non started Docker container")
adapter_number = int(request.match_info["adapter_number"])
yield from container.stop_capture(adapter_number)
response.set_status(204)