mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Update API documentation. Fixes #1253.
This commit is contained in:
1 parent
e8353e68bb
commit
ffe21f6b73
324 files changed
+1168
-14199
No files matched your search
@@ -13,8 +13,8 @@ Parameters
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Instance created
|
||||
- **400**: Invalid request
|
||||
- **201**: Instance created
|
||||
- **409**: Conflict
|
||||
|
||||
Input
|
||||
@@ -36,7 +36,7 @@ Output
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start QEMU</td> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start VPCS</td> </tr>
|
||||
<tr><td>console</td> <td>✔</td> <td>integer</td> <td>Console TCP port</td> </tr>
|
||||
<tr><td>console_type</td> <td>✔</td> <td>enum</td> <td>Possible values: telnet</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VPCS VM name</td> </tr>
|
||||
@@ -46,9 +46,3 @@ Output
|
||||
<tr><td>status</td> <td>✔</td> <td>enum</td> <td>Possible values: started, stopped, suspended</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidvpcsnodes.txt
|
||||
|
||||
@@ -9,8 +9,8 @@ Get a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@@ -24,7 +24,7 @@ Output
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start QEMU</td> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start VPCS</td> </tr>
|
||||
<tr><td>console</td> <td>✔</td> <td>integer</td> <td>Console TCP port</td> </tr>
|
||||
<tr><td>console_type</td> <td>✔</td> <td>enum</td> <td>Possible values: telnet</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VPCS VM name</td> </tr>
|
||||
@@ -34,12 +34,6 @@ Output
|
||||
<tr><td>status</td> <td>✔</td> <td>enum</td> <td>Possible values: started, stopped, suspended</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_get_projectsprojectidvpcsnodesnodeid.txt
|
||||
|
||||
|
||||
PUT /v2/compute/projects/**{project_id}**/vpcs/nodes/**{node_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -47,8 +41,8 @@ Update a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@@ -74,7 +68,7 @@ Output
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start QEMU</td> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start VPCS</td> </tr>
|
||||
<tr><td>console</td> <td>✔</td> <td>integer</td> <td>Console TCP port</td> </tr>
|
||||
<tr><td>console_type</td> <td>✔</td> <td>enum</td> <td>Possible values: telnet</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VPCS VM name</td> </tr>
|
||||
@@ -84,12 +78,6 @@ Output
|
||||
<tr><td>status</td> <td>✔</td> <td>enum</td> <td>Possible values: started, stopped, suspended</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_put_projectsprojectidvpcsnodesnodeid.txt
|
||||
|
||||
|
||||
DELETE /v2/compute/projects/**{project_id}**/vpcs/nodes/**{node_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -97,18 +85,12 @@ Delete a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance deleted
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_delete_projectsprojectidvpcsnodesnodeid.txt
|
||||
- **204**: Instance deleted
|
||||
|
||||
+21
-15
@@ -9,22 +9,34 @@ Add a NIO to a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Network adapter where the nio is located
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port where the nio should be added
|
||||
- **adapter_number**: Network adapter where the nio is located
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: NIO created
|
||||
- **400**: Invalid request
|
||||
- **201**: NIO created
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
PUT /v2/compute/projects/**{project_id}**/vpcs/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update a NIO from a VPCS instance
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidvpcsnodesnodeidadaptersadapternumberdportsportnumberdnio.txt
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port from where the nio should be updated
|
||||
- **adapter_number**: Network adapter where the nio is located
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: NIO updated
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
|
||||
DELETE /v2/compute/projects/**{project_id}**/vpcs/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
@@ -33,20 +45,14 @@ Remove a NIO from a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Network adapter where the nio is located
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port from where the nio should be removed
|
||||
- **adapter_number**: Network adapter where the nio is located
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: NIO deleted
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_delete_projectsprojectidvpcsnodesnodeidadaptersadapternumberdportsportnumberdnio.txt
|
||||
- **204**: NIO deleted
|
||||
|
||||
+2
-2
@@ -9,10 +9,10 @@ Start a packet capture on a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Adapter to start a packet capture
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port on the adapter
|
||||
- **adapter_number**: Adapter to start a packet capture
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
||||
+3
-3
@@ -9,14 +9,14 @@ Stop a packet capture on a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Adapter to stop a packet capture
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port on the adapter
|
||||
- **adapter_number**: Adapter to stop a packet capture
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Capture stopped
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Capture stopped
|
||||
|
||||
@@ -9,18 +9,12 @@ Reload a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance reloaded
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidvpcsnodesnodeidreload.txt
|
||||
- **204**: Instance reloaded
|
||||
|
||||
@@ -9,14 +9,14 @@ Start a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance started
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance started
|
||||
|
||||
Output
|
||||
*******
|
||||
@@ -24,7 +24,7 @@ Output
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start QEMU</td> </tr>
|
||||
<tr><td>command_line</td> <td>✔</td> <td>string</td> <td>Last command line used by GNS3 to start VPCS</td> </tr>
|
||||
<tr><td>console</td> <td>✔</td> <td>integer</td> <td>Console TCP port</td> </tr>
|
||||
<tr><td>console_type</td> <td>✔</td> <td>enum</td> <td>Possible values: telnet</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VPCS VM name</td> </tr>
|
||||
@@ -34,9 +34,3 @@ Output
|
||||
<tr><td>status</td> <td>✔</td> <td>enum</td> <td>Possible values: started, stopped, suspended</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidvpcsnodesnodeidstart.txt
|
||||
|
||||
@@ -9,18 +9,12 @@ Stop a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance stopped
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidvpcsnodesnodeidstop.txt
|
||||
- **204**: Instance stopped
|
||||
|
||||
@@ -9,12 +9,12 @@ Suspend a VPCS instance (stop it)
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance stopped
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance stopped
|
||||
|
||||
Reference in new issue
Block a user