From 76b2ca2bc08d0d60f39a377cc65cec750d4700c7 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 26 Apr 2016 17:36:24 +0200 Subject: [PATCH] Return the full path to the capture --- gns3server/controller/link.py | 3 ++- gns3server/schemas/link.py | 4 ++++ tests/controller/test_link.py | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gns3server/controller/link.py b/gns3server/controller/link.py index 1c8dfa43..0c61467a 100644 --- a/gns3server/controller/link.py +++ b/gns3server/controller/link.py @@ -145,5 +145,6 @@ class Link: return { "vms": res, "link_id": self._id, "capturing": self._capturing, - "capture_file_name": self._capture_file_name + "capture_file_name": self._capture_file_name, + "capture_file_path": self.capture_file_path } diff --git a/gns3server/schemas/link.py b/gns3server/schemas/link.py index a82ae216..d184bc9a 100644 --- a/gns3server/schemas/link.py +++ b/gns3server/schemas/link.py @@ -61,6 +61,10 @@ LINK_OBJECT_SCHEMA = { "capture_file_name": { "description": "Read only propertie. The name of the capture file if capture is running", "type": ["string", "null"] + }, + "capture_file_path": { + "description": "Read only propertie. The full path of the capture file if capture is running", + "type": ["string", "null"] } }, "required": ["vms"], diff --git a/tests/controller/test_link.py b/tests/controller/test_link.py index eca2ff6b..996d0379 100644 --- a/tests/controller/test_link.py +++ b/tests/controller/test_link.py @@ -86,7 +86,8 @@ def test_json(async_run, project, compute): } ], "capturing": False, - "capture_file_name": None + "capture_file_name": None, + "capture_file_path": None }