mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-23 09:15:34 +00:00
Update API documentation. Fixes #1253.
This commit is contained in:
@ -13,8 +13,8 @@ Parameters
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **201**: Instance created
|
||||
- **400**: Invalid request
|
||||
- **201**: Instance created
|
||||
- **409**: Conflict
|
||||
|
||||
Input
|
||||
@ -116,9 +116,3 @@ 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_post_projectsprojectidqemunodes.txt
|
||||
|
||||
|
@ -9,8 +9,8 @@ Get a Qemu VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@ -69,12 +69,6 @@ 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_get_projectsprojectidqemunodesnodeid.txt
|
||||
|
||||
|
||||
PUT /v2/compute/projects/**{project_id}**/qemu/nodes/**{node_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -82,8 +76,8 @@ Update a Qemu VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@ -190,12 +184,6 @@ 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_projectsprojectidqemunodesnodeid.txt
|
||||
|
||||
|
||||
DELETE /v2/compute/projects/**{project_id}**/qemu/nodes/**{node_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -203,18 +191,12 @@ Delete a Qemu VM 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_projectsprojectidqemunodesnodeid.txt
|
||||
- **204**: Instance deleted
|
||||
|
||||
|
@ -9,22 +9,34 @@ Add a NIO to a Qemu VM 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 on the adapter (always 0)
|
||||
- **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}**/qemu/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update a NIO from a Qemu instance
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidqemunodesnodeidadaptersadapternumberdportsportnumberdnio.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}**/qemu/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
|
||||
@ -33,20 +45,14 @@ Remove a NIO from a Qemu VM 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 on the adapter (always 0)
|
||||
- **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_projectsprojectidqemunodesnodeidadaptersadapternumberdportsportnumberdnio.txt
|
||||
- **204**: NIO deleted
|
||||
|
||||
|
@ -9,10 +9,10 @@ Start a packet capture on a Qemu VM 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 (always 0)
|
||||
- **adapter_number**: Adapter to start a packet capture
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
@ -9,14 +9,14 @@ Stop a packet capture on a Qemu VM 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 (always 0)
|
||||
- **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 Qemu VM 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_projectsprojectidqemunodesnodeidreload.txt
|
||||
- **204**: Instance reloaded
|
||||
|
||||
|
@ -9,18 +9,12 @@ Resume a Qemu VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance resumed
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidqemunodesnodeidresume.txt
|
||||
- **204**: Instance resumed
|
||||
|
||||
|
@ -9,8 +9,8 @@ Start a Qemu VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
@ -69,9 +69,3 @@ 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_post_projectsprojectidqemunodesnodeidstart.txt
|
||||
|
||||
|
@ -9,18 +9,12 @@ Stop a Qemu VM 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_projectsprojectidqemunodesnodeidstop.txt
|
||||
- **204**: Instance stopped
|
||||
|
||||
|
@ -9,18 +9,12 @@ Suspend a Qemu VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: Project UUID
|
||||
- **node_id**: Node UUID
|
||||
- **project_id**: Project UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **204**: Instance suspended
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_projectsprojectidqemunodesnodeidsuspend.txt
|
||||
- **204**: Instance suspended
|
||||
|
||||
|
@ -22,9 +22,3 @@ Input
|
||||
<tr><td>archs</td> <td> </td> <td>array</td> <td>Architectures to filter binaries with</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_get_qemubinaries.txt
|
||||
|
||||
|
@ -20,9 +20,3 @@ Output
|
||||
<tr><td>kvm</td> <td> </td> <td>array</td> <td>Architectures that KVM is enabled for</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_get_qemucapabilities.txt
|
||||
|
||||
|
@ -15,3 +15,16 @@ Response status codes
|
||||
**********************
|
||||
- **204**: Image uploaded
|
||||
|
||||
|
||||
GET /v2/compute/qemu/images/**{filename:.+}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Download Qemu image
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **filename**: Image filename
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Image returned
|
||||
|
||||
|
@ -31,9 +31,3 @@ Input
|
||||
<tr><td>zeroed_grain</td> <td> </td> <td>enum</td> <td>Possible values: on, off</td> </tr>
|
||||
</table>
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: ../../../examples/compute_post_qemuimg.txt
|
||||
|
||||
|
Reference in New Issue
Block a user