mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Return command_line and node_directory via the controller
This commit is contained in:
167 files changed
+5280
-33
No files matched your search
@@ -0,0 +1,20 @@
|
||||
/v2/projects/{project_id}/links/{link_id}/pcap
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v2/projects/**{project_id}**/links/**{link_id}**/pcap
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get the pcap from the capture
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **link_id**: UUID of the link
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Return the file
|
||||
- **403**: Permission denied
|
||||
- **404**: The file doesn't exist
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/v2/projects/{project_id}/links/{link_id}/start_capture
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/projects/**{project_id}**/links/**{link_id}**/start_capture
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Start capture on a link instance. By default we consider it as an ethernet link
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **link_id**: UUID of the link
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: Capture started
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>capture_file_name</td> <td> </td> <td>string</td> <td>Read only propertie. The name of the capture file if capture is running</td> </tr>
|
||||
<tr><td>data_link_type</td> <td> </td> <td>enum</td> <td>Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>capture_file_name</td> <td> </td> <td>['string', 'null']</td> <td>Read only propertie. The name of the capture file if capture is running</td> </tr>
|
||||
<tr><td>capture_file_path</td> <td> </td> <td>['string', 'null']</td> <td>Read only propertie. The full path of the capture file if capture is running</td> </tr>
|
||||
<tr><td>capturing</td> <td> </td> <td>boolean</td> <td>Read only propertie. True if a capture running on the link</td> </tr>
|
||||
<tr><td>link_id</td> <td> </td> <td>string</td> <td>Link identifier</td> </tr>
|
||||
<tr><td>nodes</td> <td>✔</td> <td>array</td> <td>List of the VMS</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidlinkslinkidstartcapture.txt
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/v2/projects/{project_id}/links/{link_id}/stop_capture
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/projects/**{project_id}**/links/**{link_id}**/stop_capture
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Stop capture on a link instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **link_id**: UUID of the link
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: Capture stopped
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/controller_post_projectsprojectidlinkslinkidstopcapture.txt
|
||||
|
||||
Reference in new issue
Block a user