mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-13 04:48:22 +00:00
Fix doc generation
This commit is contained in:
@ -0,0 +1,43 @@
|
||||
/v1/projects/{project_id}/dynamips/devices
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/projects/**{project_id}**/dynamips/devices
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create a new Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: Instance created
|
||||
- **409**: Conflict
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>device_id</td> <td> </td> <td>string</td> <td>Dynamips device instance identifier</td> </tr>
|
||||
<tr><td>device_type</td> <td>✔</td> <td>string</td> <td>Dynamips device type</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>Dynamips device name</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>device_id</td> <td>✔</td> <td>string</td> <td>Dynamips router instance UUID</td> </tr>
|
||||
<tr><td>mappings</td> <td> </td> <td>object</td> <td></td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>Dynamips device instance name</td> </tr>
|
||||
<tr><td>ports</td> <td> </td> <td>array</td> <td></td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
@ -0,0 +1,106 @@
|
||||
/v1/projects/{project_id}/dynamips/devices/{device_id}
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get a Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
- **device_id**: UUID for the instance
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Success
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>device_id</td> <td>✔</td> <td>string</td> <td>Dynamips router instance UUID</td> </tr>
|
||||
<tr><td>mappings</td> <td> </td> <td>object</td> <td></td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>Dynamips device instance name</td> </tr>
|
||||
<tr><td>ports</td> <td> </td> <td>array</td> <td></td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
PUT /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update a Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
- **device_id**: UUID for the instance
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Instance updated
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **409**: Conflict
|
||||
|
||||
Input
|
||||
*******
|
||||
Types
|
||||
+++++++++
|
||||
EthernetSwitchPort
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
Ethernet switch port
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>port</td> <td>✔</td> <td>integer</td> <td>Port number</td> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: access, dot1q, qinq</td> </tr>
|
||||
<tr><td>vlan</td> <td>✔</td> <td>integer</td> <td>VLAN number</td> </tr>
|
||||
</table>
|
||||
|
||||
Body
|
||||
+++++++++
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>name</td> <td> </td> <td>string</td> <td>Dynamips device instance name</td> </tr>
|
||||
<tr><td>ports</td> <td> </td> <td>array</td> <td></td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>device_id</td> <td>✔</td> <td>string</td> <td>Dynamips router instance UUID</td> </tr>
|
||||
<tr><td>mappings</td> <td> </td> <td>object</td> <td></td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>Dynamips device instance name</td> </tr>
|
||||
<tr><td>ports</td> <td> </td> <td>array</td> <td></td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
DELETE /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Delete a Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
- **device_id**: UUID for the instance
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance deleted
|
||||
|
@ -0,0 +1,140 @@
|
||||
/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/nio
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Add a NIO to a Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
- **port_number**: Port on the device
|
||||
- **device_id**: UUID for the instance
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: NIO created
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Input
|
||||
*******
|
||||
Types
|
||||
+++++++++
|
||||
Ethernet
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
Generic Ethernet Network Input/Output
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>ethernet_device</td> <td>✔</td> <td>string</td> <td>Ethernet device name e.g. eth0</td> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: nio_generic_ethernet</td> </tr>
|
||||
</table>
|
||||
|
||||
LinuxEthernet
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
Linux Ethernet Network Input/Output
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>ethernet_device</td> <td>✔</td> <td>string</td> <td>Ethernet device name e.g. eth0</td> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: nio_linux_ethernet</td> </tr>
|
||||
</table>
|
||||
|
||||
NULL
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
NULL Network Input/Output
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: nio_null</td> </tr>
|
||||
</table>
|
||||
|
||||
TAP
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
TAP Network Input/Output
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>tap_device</td> <td>✔</td> <td>string</td> <td>TAP device name e.g. tap0</td> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: nio_tap</td> </tr>
|
||||
</table>
|
||||
|
||||
UDP
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
UDP Network Input/Output
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>lport</td> <td>✔</td> <td>integer</td> <td>Local port</td> </tr>
|
||||
<tr><td>rhost</td> <td>✔</td> <td>string</td> <td>Remote host</td> </tr>
|
||||
<tr><td>rport</td> <td>✔</td> <td>integer</td> <td>Remote port</td> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: nio_udp</td> </tr>
|
||||
</table>
|
||||
|
||||
UNIX
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
UNIX Network Input/Output
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>local_file</td> <td>✔</td> <td>string</td> <td>path to the UNIX socket file (local)</td> </tr>
|
||||
<tr><td>remote_file</td> <td>✔</td> <td>string</td> <td>path to the UNIX socket file (remote)</td> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: nio_unix</td> </tr>
|
||||
</table>
|
||||
|
||||
VDE
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
VDE Network Input/Output
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>control_file</td> <td>✔</td> <td>string</td> <td>path to the VDE control file</td> </tr>
|
||||
<tr><td>local_file</td> <td>✔</td> <td>string</td> <td>path to the VDE control file</td> </tr>
|
||||
<tr><td>type</td> <td>✔</td> <td>enum</td> <td>Possible values: nio_vde</td> </tr>
|
||||
</table>
|
||||
|
||||
Body
|
||||
+++++++++
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>mappings</td> <td> </td> <td>object</td> <td></td> </tr>
|
||||
<tr><td>nio</td> <td>✔</td> <td>UDP, Ethernet, LinuxEthernet, TAP, UNIX, VDE, NULL</td> <td></td> </tr>
|
||||
<tr><td>port_settings</td> <td> </td> <td>object</td> <td>Ethernet switch</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
DELETE /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Remove a NIO from a Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
- **port_number**: Port on the device
|
||||
- **device_id**: UUID for the instance
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: NIO deleted
|
||||
|
@ -0,0 +1,31 @@
|
||||
/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/start_capture
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/start_capture
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Start a packet capture on a Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
- **port_number**: Port on the device
|
||||
- **device_id**: UUID for the instance
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Capture started
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
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>Capture file name</td> </tr>
|
||||
<tr><td>data_link_type</td> <td>✔</td> <td>string</td> <td>PCAP data link type</td> </tr>
|
||||
</table>
|
||||
|
@ -0,0 +1,21 @@
|
||||
/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/stop_capture
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/stop_capture
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Stop a packet capture on a Dynamips device instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
- **port_number**: Port on the device
|
||||
- **device_id**: UUID for the instance
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Capture stopped
|
||||
|
Reference in New Issue
Block a user