mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Update API documentation
This commit is contained in:
1 parent
21a7a68875
commit
e6d2bd4424
360 files changed
+17598
-896
No files matched your search
@@ -13,8 +13,8 @@ Parameters
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: Instance created
|
||||
- **400**: Invalid request
|
||||
- **409**: Conflict
|
||||
|
||||
Input
|
||||
|
||||
@@ -9,14 +9,14 @@ Delete a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance deleted
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance deleted
|
||||
|
||||
|
||||
PUT /v2/compute/projects/**{project_id}**/docker/nodes/**{node_id}**
|
||||
@@ -25,8 +25,8 @@ Update a Docker instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@@ -85,3 +85,9 @@ Output
|
||||
<tr><td>usage</td> <td> </td> <td>string</td> <td>How to use the qemu VM</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_put_projectsprojectiddockernodesnodeid.txt
|
||||
|
||||
+27
-9
@@ -9,17 +9,23 @@ Add a NIO to a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port on the adapter
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Adapter where the nio should be added
|
||||
- **port_number**: Port on the adapter
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: NIO created
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectiddockernodesnodeidadaptersadapternumberdportsportnumberdnio.txt
|
||||
|
||||
|
||||
PUT /v2/compute/projects/**{project_id}**/docker/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -27,17 +33,23 @@ Update a NIO from a Docker instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port from where the nio should be updated
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Network adapter where the nio is located
|
||||
- **port_number**: Port from where the nio should be updated
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: NIO updated
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_put_projectsprojectiddockernodesnodeidadaptersadapternumberdportsportnumberdnio.txt
|
||||
|
||||
|
||||
DELETE /v2/compute/projects/**{project_id}**/docker/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -45,14 +57,20 @@ Remove a NIO from a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port on the adapter
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Adapter where the nio should be added
|
||||
- **port_number**: Port on the adapter
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: NIO deleted
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: NIO deleted
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_delete_projectsprojectiddockernodesnodeidadaptersadapternumberdportsportnumberdnio.txt
|
||||
|
||||
+8
-2
@@ -9,10 +9,10 @@ Start a packet capture on a Docker container instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port on the adapter
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Adapter to start a packet capture
|
||||
- **port_number**: Port on the adapter
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@@ -31,3 +31,9 @@ Input
|
||||
<tr><td>data_link_type</td> <td> </td> <td>enum</td> <td>Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC, DLT_PPP_SERIAL</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectiddockernodesnodeidadaptersadapternumberdportsportnumberdstartcapture.txt
|
||||
|
||||
+9
-3
@@ -9,15 +9,21 @@ Stop a packet capture on a Docker container instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **port_number**: Port on the adapter (always 0)
|
||||
- **node_id**: Node UUID
|
||||
- **adapter_number**: Adapter to stop a packet capture
|
||||
- **port_number**: Port on the adapter (always 0)
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Capture stopped
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Capture stopped
|
||||
- **409**: Container not started
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectiddockernodesnodeidadaptersadapternumberdportsportnumberdstopcapture.txt
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/v2/compute/projects/{project_id}/docker/nodes/{node_id}/duplicate
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v2/compute/projects/**{project_id}**/docker/nodes/**{node_id}**/duplicate
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Duplicate a Docker instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Instance duplicated
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectiddockernodesnodeidduplicate.txt
|
||||
|
||||
@@ -9,12 +9,12 @@ Pause a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance paused
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance paused
|
||||
|
||||
@@ -9,12 +9,12 @@ Restart a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance restarted
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance restarted
|
||||
|
||||
@@ -9,12 +9,12 @@ Start a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance started
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance started
|
||||
|
||||
@@ -9,12 +9,12 @@ Stop a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance stopped
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance stopped
|
||||
|
||||
@@ -9,12 +9,12 @@ Unpause a Docker container
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance unpaused
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance unpaused
|
||||
|
||||
Reference in new issue
Block a user