1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-29 02:08:10 +00:00

Add warning unstable at the beginning of the API

This commit is contained in:
Julien Duponchelle 2015-02-23 18:00:59 +01:00
parent 4ffb2c8c20
commit cad708f4ab
73 changed files with 156 additions and 32 deletions

View File

@ -5,4 +5,4 @@ Dynamips device
:glob:
:maxdepth: 2
dynamips_device/*
api.dynamips_device/*

View File

@ -10,8 +10,8 @@ Add a NIO to a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************
@ -129,8 +129,8 @@ Remove a NIO from a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************

View File

@ -10,8 +10,8 @@ Start a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************

View File

@ -10,8 +10,8 @@ Stop a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **port_number**: Port on the device
- **device_id**: UUID for the instance
- **port_number**: Port on the device
Response status codes
**********************

View File

@ -5,4 +5,4 @@ Dynamips vm
:glob:
:maxdepth: 2
dynamips_vm/*
api.dynamips_vm/*

View File

@ -114,6 +114,7 @@ Input
<tr><td>power_supplies</td> <td> </td> <td>array</td> <td>Power supplies status</td> </tr>
<tr><td>private_config</td> <td> </td> <td>string</td> <td>path to the IOS private configuration file</td> </tr>
<tr><td>private_config_base64</td> <td> </td> <td>string</td> <td>private configuration base64 encoded</td> </tr>
<tr><td>private_config_content</td> <td> </td> <td>string</td> <td>Content of IOS private configuration file</td> </tr>
<tr><td>ram</td> <td> </td> <td>integer</td> <td>amount of RAM in MB</td> </tr>
<tr><td>sensors</td> <td> </td> <td>array</td> <td>Temperature sensors</td> </tr>
<tr><td>slot0</td> <td> </td> <td></td> <td>Network module slot 0</td> </tr>
@ -126,6 +127,7 @@ Input
<tr><td>sparsemem</td> <td> </td> <td>boolean</td> <td>sparse memory feature</td> </tr>
<tr><td>startup_config</td> <td> </td> <td>string</td> <td>path to the IOS startup configuration file</td> </tr>
<tr><td>startup_config_base64</td> <td> </td> <td>string</td> <td>startup configuration base64 encoded</td> </tr>
<tr><td>startup_config_content</td> <td> </td> <td>string</td> <td>Content of IOS startup configuration file</td> </tr>
<tr><td>system_id</td> <td> </td> <td>string</td> <td>system ID</td> </tr>
<tr><td>wic0</td> <td> </td> <td></td> <td>Network module WIC slot 0</td> </tr>
<tr><td>wic1</td> <td> </td> <td></td> <td>Network module WIC slot 0</td> </tr>

View File

@ -10,9 +10,9 @@ Add a NIO to a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter where the nio should be added
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -28,9 +28,9 @@ Remove a NIO from a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter from where the nio should be removed
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Start a packet capture on a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Stop a packet capture on a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -0,0 +1,15 @@
/v1/projects/{project_id}/dynamips/vms/{vm_id}/auto_idlepc
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/auto_idlepc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve the idlepc proposals
Response status codes
**********************
- **200**: Best Idle-pc value found
- **400**: Invalid request
- **404**: Instance doesn't exist

View File

@ -0,0 +1,25 @@
/v1/projects/{project_id}/dynamips/vms/{vm_id}/configs
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/configs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve the startup and private configs content
Response status codes
**********************
- **200**: Configs retrieved
- **400**: Invalid request
- **404**: Instance doesn't exist
Output
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>private_config_content</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Content of the private configuration file</td> </tr>
<tr><td>startup_config_content</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Content of the startup configuration file</td> </tr>
</table>

View File

@ -0,0 +1,15 @@
/v1/projects/{project_id}/dynamips/vms/{vm_id}/idlepc_proposals
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/idlepc_proposals
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve the idlepc proposals
Response status codes
**********************
- **200**: Idle-PCs retrieved
- **400**: Invalid request
- **404**: Instance doesn't exist

View File

@ -5,4 +5,4 @@ Iou
:glob:
:maxdepth: 2
iou/*
api.iou/*

View File

@ -10,9 +10,9 @@ Add a NIO to a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -28,9 +28,9 @@ Remove a NIO from a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Start a packet capture on a IOU VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Stop a packet capture on a IOU VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -20,6 +20,5 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>content</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Content of the initial configuration file</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Relative path on the server of the initial configuration file</td> </tr>
</table>

View File

@ -5,4 +5,4 @@ Network
:glob:
:maxdepth: 2
network/*
api.network/*

View File

@ -5,4 +5,4 @@ Project
:glob:
:maxdepth: 2
project/*
api.project/*

View File

@ -5,4 +5,4 @@ Qemu
:glob:
:maxdepth: 2
qemu/*
api.qemu/*

View File

@ -10,9 +10,9 @@ Add a NIO to a Qemu.instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -28,9 +28,9 @@ Remove a NIO from a Qemu.instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -0,0 +1,20 @@
/v1/projects/{project_id}/qemu/vms/{vm_id}/resume
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/resume
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Resume a Qemu.instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance resumed

View File

@ -5,7 +5,7 @@
POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/suspend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reload a Qemu.instance
Suspend a Qemu.instance
Parameters
**********

View File

@ -0,0 +1,15 @@
/v1/qemu/binaries
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/qemu/binaries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get a list of available Qemu binaries
Response status codes
**********************
- **200**: Success
- **400**: Invalid request
- **404**: Instance doesn't exist

View File

@ -5,4 +5,4 @@ Version
:glob:
:maxdepth: 2
version/*
api.version/*

View File

@ -5,4 +5,4 @@ Virtualbox
:glob:
:maxdepth: 2
virtualbox/*
api.virtualbox/*

View File

@ -10,9 +10,9 @@ Add a NIO to a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter where the nio should be added
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -28,9 +28,9 @@ Remove a NIO from a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter from where the nio should be removed
- **port_number**: Port on the adapter (always)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Start a packet capture on a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Stop a packet capture on a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -5,4 +5,4 @@ Vpcs
:glob:
:maxdepth: 2
vpcs/*
api.vpcs/*

View File

@ -10,9 +10,9 @@ Add a NIO to a VPCS instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -28,9 +28,9 @@ Remove a NIO from a VPCS instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
Response status codes
**********************

8
docs/api/upload.rst Normal file
View File

@ -0,0 +1,8 @@
Upload
---------------------
.. toctree::
:glob:
:maxdepth: 2
upload/*

View File

@ -0,0 +1,22 @@
/upload
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /upload
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Manage upload of GNS3 images
Response status codes
**********************
- **200**: OK
POST /upload
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Manage upload of GNS3 images
Response status codes
**********************
- **200**: OK

View File

@ -1,6 +1,9 @@
Welcome to API documentation!
======================================
.. WARNING::
The API is not stable, feel free to send comment on GNS3 Jungle
https://community.gns3.com/
.. toctree::
general

View File

@ -77,7 +77,7 @@ class Documentation(object):
os.makedirs(directory, exist_ok=True)
with open("docs/api/{}.rst".format(handler_name), "w+") as f:
f.write(handler_name.replace("_", " ", ).capitalize())
f.write(handler_name.replace("api.", "").replace("_", " ", ).capitalize())
f.write("\n---------------------\n\n")
f.write(".. toctree::\n :glob:\n :maxdepth: 2\n\n {}/*\n".format(handler_name))