mirror of https://github.com/GNS3/gns3-server
parent
0b97509a74
commit
f5ac73d1ca
@ -0,0 +1,39 @@
|
||||
/project
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /project
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create a project on the server
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: OK
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>location</td> <td> </td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||
<tr><td>uuid</td> <td> </td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>location</td> <td> </td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||
<tr><td>uuid</td> <td> </td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/post_project.txt
|
||||
|
@ -0,0 +1,48 @@
|
||||
/vpcs/{uuid}/ports/{port_id}/nio
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /vpcs/{uuid}/ports/{port_id}/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Add a NIO to a VPCS
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **port_id**: Id of the port where the nio should be add
|
||||
- **uuid**: VPCS instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid VPCS instance UUID
|
||||
- **201**: NIO created
|
||||
- **404**: VPCS instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/post_vpcsuuidportsportidnio.txt
|
||||
|
||||
|
||||
DELETE /vpcs/{uuid}/ports/{port_id}/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Remove a NIO from a VPCS
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **port_id**: ID of the port where the nio should be removed
|
||||
- **uuid**: VPCS instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: NIO deleted
|
||||
- **400**: Invalid VPCS instance UUID
|
||||
- **404**: VPCS instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/delete_vpcsuuidportsportidnio.txt
|
||||
|
@ -0,0 +1,19 @@
|
||||
/vpcs/{uuid}/start
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /vpcs/{uuid}/start
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Start a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: VPCS instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid VPCS instance UUID
|
||||
- **404**: VPCS instance doesn't exist
|
||||
- **204**: VPCS instance started
|
||||
|
@ -0,0 +1,19 @@
|
||||
/vpcs/{uuid}/stop
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /vpcs/{uuid}/stop
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Stop a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **uuid**: VPCS instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid VPCS instance UUID
|
||||
- **404**: VPCS instance doesn't exist
|
||||
- **204**: VPCS instance stopped
|
||||
|
@ -1,63 +0,0 @@
|
||||
/vpcs/{vpcs_id}
|
||||
------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /vpcs/{vpcs_id}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get informations about a VPCS
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vpcs_id**: Id of VPCS instance
|
||||
|
||||
Response status codes
|
||||
**************************
|
||||
- **200**: OK
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr><th>Name</th><th>Mandatory</th><th>Type</th><th>Description</th></tr>
|
||||
<tr><td>console</td><td>✔</td><td>integer</td><td>console TCP port</td></tr>
|
||||
<tr><td>name</td><td>✔</td><td>string</td><td>VPCS device name</td></tr>
|
||||
<tr><td>vpcs_id</td><td>✔</td><td>integer</td><td>VPCS device instance ID</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
PUT /vpcs/{vpcs_id}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update VPCS informations
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vpcs_id**: Id of VPCS instance
|
||||
|
||||
Response status codes
|
||||
**************************
|
||||
- **200**: OK
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr><th>Name</th><th>Mandatory</th><th>Type</th><th>Description</th></tr>
|
||||
<tr><td>console</td><td>✔</td><td>integer</td><td>console TCP port</td></tr>
|
||||
<tr><td>name</td><td>✔</td><td>string</td><td>VPCS device name</td></tr>
|
||||
<tr><td>vpcs_id</td><td>✔</td><td>integer</td><td>VPCS device instance ID</td></tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr><th>Name</th><th>Mandatory</th><th>Type</th><th>Description</th></tr>
|
||||
<tr><td>console</td><td>✔</td><td>integer</td><td>console TCP port</td></tr>
|
||||
<tr><td>name</td><td>✔</td><td>string</td><td>VPCS device name</td></tr>
|
||||
<tr><td>vpcs_id</td><td>✔</td><td>integer</td><td>VPCS device instance ID</td></tr>
|
||||
</table>
|
||||
|
@ -1,127 +0,0 @@
|
||||
/vpcs/{vpcs_id}/nio
|
||||
------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /vpcs/{vpcs_id}/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ADD NIO to a VPCS
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vpcs_id**: Id of VPCS instance
|
||||
|
||||
Response status codes
|
||||
**************************
|
||||
- **201**: Success of creation of NIO
|
||||
- **409**: Conflict
|
||||
|
||||
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>id</td><td>✔</td><td>integer</td><td>VPCS device instance ID</td></tr>
|
||||
<tr><td>nio</td><td>✔</td><td>UDP, Ethernet, LinuxEthernet, TAP, UNIX, VDE, NULL</td><td>Network Input/Output</td></tr>
|
||||
<tr><td>port</td><td>✔</td><td>integer</td><td>Port number</td></tr>
|
||||
<tr><td>port_id</td><td>✔</td><td>integer</td><td>Unique port identifier for the VPCS instance</td></tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/post_vpcsvpcsidnio.txt
|
||||
|
Loading…
Reference in new issue