Update API documentation. Fixes #1253.

This commit is contained in:
grossmj committed 2018-01-08 11:57:07 +07:00
1 parent e8353e68bb
commit ffe21f6b73
324 files changed
+1168 -14199

No files matched your search

-6
View File
@@ -11,9 +11,3 @@ Response status codes
**********************
- **200**: List of IOU images
Sample session
***************
.. literalinclude:: ../../../examples/compute_get_iouimages.txt
@@ -15,3 +15,16 @@ Response status codes
**********************
- **204**: Image uploaded
GET /v2/compute/iou/images/**{filename:.+}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Download an IOU image
Parameters
**********
- **filename**: Image filename
Response status codes
**********************
- **200**: Image returned
@@ -13,8 +13,8 @@ Parameters
Response status codes
**********************
- **201**: Instance created
- **400**: Invalid request
- **201**: Instance created
- **409**: Conflict
Input
@@ -23,6 +23,7 @@ Input
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>application_id</td> <td> </td> <td>['integer', 'null']</td> <td>Application ID for running IOU image</td> </tr>
<tr><td>console</td> <td> </td> <td>['integer', 'null']</td> <td>Console TCP port</td> </tr>
<tr><td>console_type</td> <td> </td> <td>enum</td> <td>Possible values: telnet, null</td> </tr>
<tr><td>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
@@ -45,7 +46,8 @@ 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>application_id</td> <td> </td> <td>integer</td> <td>Application ID for running IOU image</td> </tr>
<tr><td>command_line</td> <td> </td> <td>string</td> <td>Last command line used by GNS3 to start IOU</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>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
@@ -63,9 +65,3 @@ Output
<tr><td>use_default_iou_values</td> <td> </td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../../examples/compute_post_projectsprojectidiounodes.txt
@@ -9,8 +9,8 @@ Get an IOU instance
Parameters
**********
- **project_id**: Project UUID
- **node_id**: Node UUID
- **project_id**: Project UUID
Response status codes
**********************
@@ -24,7 +24,8 @@ 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>application_id</td> <td> </td> <td>integer</td> <td>Application ID for running IOU image</td> </tr>
<tr><td>command_line</td> <td> </td> <td>string</td> <td>Last command line used by GNS3 to start IOU</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>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
@@ -42,12 +43,6 @@ Output
<tr><td>use_default_iou_values</td> <td> </td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../../examples/compute_get_projectsprojectidiounodesnodeid.txt
PUT /v2/compute/projects/**{project_id}**/iou/nodes/**{node_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -55,8 +50,8 @@ Update an IOU instance
Parameters
**********
- **project_id**: Project UUID
- **node_id**: Node UUID
- **project_id**: Project UUID
Response status codes
**********************
@@ -71,7 +66,8 @@ Input
<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>application_id</td> <td> </td> <td>integer</td> <td>Application ID for running IOU image</td> </tr>
<tr><td>command_line</td> <td> </td> <td>string</td> <td>Last command line used by GNS3 to start IOU</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>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
@@ -95,7 +91,8 @@ 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>application_id</td> <td> </td> <td>integer</td> <td>Application ID for running IOU image</td> </tr>
<tr><td>command_line</td> <td> </td> <td>string</td> <td>Last command line used by GNS3 to start IOU</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>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
@@ -113,12 +110,6 @@ Output
<tr><td>use_default_iou_values</td> <td> </td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../../examples/compute_put_projectsprojectidiounodesnodeid.txt
DELETE /v2/compute/projects/**{project_id}**/iou/nodes/**{node_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -126,18 +117,12 @@ Delete an IOU 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_projectsprojectidiounodesnodeid.txt
- **204**: Instance deleted
@@ -9,22 +9,34 @@ Add a NIO to a IOU 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}**/iou/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update a NIO from a IOU instance
.. literalinclude:: ../../../examples/compute_post_projectsprojectidiounodesnodeidadaptersadapternumberdportsportnumberdnio.txt
Parameters
**********
- **node_id**: Node UUID
- **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
**********************
- **400**: Invalid request
- **201**: NIO updated
- **404**: Instance doesn't exist
DELETE /v2/compute/projects/**{project_id}**/iou/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
@@ -33,20 +45,14 @@ Remove a NIO from a IOU 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_projectsprojectidiounodesnodeidadaptersadapternumberdportsportnumberdnio.txt
- **204**: NIO deleted
@@ -9,10 +9,10 @@ Start a packet capture on an IOU 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
- **adapter_number**: Adapter to start a packet capture
Response status codes
**********************
@@ -31,9 +31,3 @@ 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_projectsprojectidiounodesnodeidadaptersadapternumberdportsportnumberdstartcapture.txt
@@ -9,21 +9,15 @@ Stop a packet capture on an IOU 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
- **409**: VM not started
Sample session
***************
.. literalinclude:: ../../../examples/compute_post_projectsprojectidiounodesnodeidadaptersadapternumberdportsportnumberdstopcapture.txt
@@ -9,18 +9,12 @@ Reload an IOU 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_projectsprojectidiounodesnodeidreload.txt
- **204**: Instance reloaded
@@ -9,8 +9,8 @@ Start an IOU instance
Parameters
**********
- **project_id**: Project UUID
- **node_id**: Node UUID
- **project_id**: Project UUID
Response status codes
**********************
@@ -33,7 +33,8 @@ 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>application_id</td> <td> </td> <td>integer</td> <td>Application ID for running IOU image</td> </tr>
<tr><td>command_line</td> <td> </td> <td>string</td> <td>Last command line used by GNS3 to start IOU</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>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
@@ -51,9 +52,3 @@ Output
<tr><td>use_default_iou_values</td> <td> </td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../../examples/compute_post_projectsprojectidiounodesnodeidstart.txt
@@ -9,18 +9,12 @@ Stop an IOU 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_projectsprojectidiounodesnodeidstop.txt
- **204**: Instance stopped