Add documentation

pull/638/head
Julien Duponchelle 8 years ago
parent 22f9effede
commit d8317e8128
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -0,0 +1,16 @@
curl -i -X GET 'http://localhost:3080/v2/settings'
GET /v2/settings HTTP/1.1
HTTP/1.1 200
CONTENT-LENGTH: 20
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.5 GNS3/2.0.0dev1
X-ROUTE: /v2/settings
{
"test": true
}

@ -0,0 +1,220 @@
curl -i -X GET 'http://localhost:3080/v2/symbols'
GET /v2/symbols HTTP/1.1
HTTP/1.1 200
CONTENT-LENGTH: 5174
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.5 GNS3/2.0.0dev1
X-ROUTE: /v2/symbols
[
{
"builtin": true,
"filename": "PBX.svg",
"symbol_id": ":/symbols/PBX.svg"
},
{
"builtin": true,
"filename": "PIX_firewall.svg",
"symbol_id": ":/symbols/PIX_firewall.svg"
},
{
"builtin": true,
"filename": "access_point.svg",
"symbol_id": ":/symbols/access_point.svg"
},
{
"builtin": true,
"filename": "access_server.svg",
"symbol_id": ":/symbols/access_server.svg"
},
{
"builtin": true,
"filename": "asa.svg",
"symbol_id": ":/symbols/asa.svg"
},
{
"builtin": true,
"filename": "atm_bridge.svg",
"symbol_id": ":/symbols/atm_bridge.svg"
},
{
"builtin": true,
"filename": "atm_switch.svg",
"symbol_id": ":/symbols/atm_switch.svg"
},
{
"builtin": true,
"filename": "call_manager.svg",
"symbol_id": ":/symbols/call_manager.svg"
},
{
"builtin": true,
"filename": "cloud.svg",
"symbol_id": ":/symbols/cloud.svg"
},
{
"builtin": true,
"filename": "computer.svg",
"symbol_id": ":/symbols/computer.svg"
},
{
"builtin": true,
"filename": "docker_guest.svg",
"symbol_id": ":/symbols/docker_guest.svg"
},
{
"builtin": true,
"filename": "dslam.svg",
"symbol_id": ":/symbols/dslam.svg"
},
{
"builtin": true,
"filename": "edge_label_switch_router.svg",
"symbol_id": ":/symbols/edge_label_switch_router.svg"
},
{
"builtin": true,
"filename": "ethernet_switch.svg",
"symbol_id": ":/symbols/ethernet_switch.svg"
},
{
"builtin": true,
"filename": "firewall.svg",
"symbol_id": ":/symbols/firewall.svg"
},
{
"builtin": true,
"filename": "frame_relay_switch.svg",
"symbol_id": ":/symbols/frame_relay_switch.svg"
},
{
"builtin": true,
"filename": "gateway.svg",
"symbol_id": ":/symbols/gateway.svg"
},
{
"builtin": true,
"filename": "hub.svg",
"symbol_id": ":/symbols/hub.svg"
},
{
"builtin": true,
"filename": "ids.svg",
"symbol_id": ":/symbols/ids.svg"
},
{
"builtin": true,
"filename": "iosv_l2_virl.svg",
"symbol_id": ":/symbols/iosv_l2_virl.svg"
},
{
"builtin": true,
"filename": "iosv_virl.svg",
"symbol_id": ":/symbols/iosv_virl.svg"
},
{
"builtin": true,
"filename": "ip_phone.svg",
"symbol_id": ":/symbols/ip_phone.svg"
},
{
"builtin": true,
"filename": "label_switch_router.svg",
"symbol_id": ":/symbols/label_switch_router.svg"
},
{
"builtin": true,
"filename": "lightweight_ap.svg",
"symbol_id": ":/symbols/lightweight_ap.svg"
},
{
"builtin": true,
"filename": "multilayer_switch.svg",
"symbol_id": ":/symbols/multilayer_switch.svg"
},
{
"builtin": true,
"filename": "optical_router.svg",
"symbol_id": ":/symbols/optical_router.svg"
},
{
"builtin": true,
"filename": "printer.svg",
"symbol_id": ":/symbols/printer.svg"
},
{
"builtin": true,
"filename": "qemu_guest.svg",
"symbol_id": ":/symbols/qemu_guest.svg"
},
{
"builtin": true,
"filename": "route_switch_processor.svg",
"symbol_id": ":/symbols/route_switch_processor.svg"
},
{
"builtin": true,
"filename": "router.awp.svg",
"symbol_id": ":/symbols/router.awp.svg"
},
{
"builtin": true,
"filename": "router.svg",
"symbol_id": ":/symbols/router.svg"
},
{
"builtin": true,
"filename": "router_firewall.svg",
"symbol_id": ":/symbols/router_firewall.svg"
},
{
"builtin": true,
"filename": "router_netflow.svg",
"symbol_id": ":/symbols/router_netflow.svg"
},
{
"builtin": true,
"filename": "server.svg",
"symbol_id": ":/symbols/server.svg"
},
{
"builtin": true,
"filename": "sip_server.svg",
"symbol_id": ":/symbols/sip_server.svg"
},
{
"builtin": true,
"filename": "vbox_guest.svg",
"symbol_id": ":/symbols/vbox_guest.svg"
},
{
"builtin": true,
"filename": "vmware_guest.svg",
"symbol_id": ":/symbols/vmware_guest.svg"
},
{
"builtin": true,
"filename": "voice_access_server.svg",
"symbol_id": ":/symbols/voice_access_server.svg"
},
{
"builtin": true,
"filename": "voice_router.svg",
"symbol_id": ":/symbols/voice_router.svg"
},
{
"builtin": true,
"filename": "vpcs_guest.svg",
"symbol_id": ":/symbols/vpcs_guest.svg"
},
{
"builtin": true,
"filename": "wlan_controller.svg",
"symbol_id": ":/symbols/wlan_controller.svg"
}
]

@ -0,0 +1,18 @@
curl -i -X POST 'http://localhost:3080/v2/settings' -d '{"test": true}'
POST /v2/settings HTTP/1.1
{
"test": true
}
HTTP/1.1 201
CONTENT-LENGTH: 20
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.5 GNS3/2.0.0dev1
X-ROUTE: /v2/settings
{
"test": true
}

@ -0,0 +1,32 @@
/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v2/compute/projects/**{project_id}**/qemu/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start a packet capture on a Qemu VM instance
Parameters
**********
- **port_number**: Port on the adapter (always 0)
- **project_id**: Project UUID
- **node_id**: Node UUID
- **adapter_number**: Adapter to start a packet capture
Response status codes
**********************
- **200**: Capture started
- **400**: Invalid request
- **404**: Instance doesn't exist
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>capture_file_name</td> <td>&#10004;</td> <td>string</td> <td>Capture file name</td> </tr>
<tr><td>data_link_type</td> <td> </td> <td>enum</td> <td>Possible values: DLT_ATM_RFC1483, DLT_EN10MB, DLT_FRELAY, DLT_C_HDLC</td> </tr>
</table>

@ -0,0 +1,22 @@
/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v2/compute/projects/**{project_id}**/qemu/nodes/**{node_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stop a packet capture on a Qemu VM instance
Parameters
**********
- **port_number**: Port on the adapter (always 0)
- **project_id**: Project UUID
- **node_id**: Node UUID
- **adapter_number**: Adapter to stop a packet capture
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Capture stopped

@ -0,0 +1,34 @@
/v2/settings
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v2/settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve gui settings from the server. Temporary will we removed in later release
Response status codes
**********************
- **200**: OK
Sample session
***************
.. literalinclude:: ../../../examples/controller_get_settings.txt
POST /v2/settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Write gui settings on the server. Temporary will we removed in later releas
Response status codes
**********************
- **201**: Writed
Sample session
***************
.. literalinclude:: ../../../examples/controller_post_settings.txt

@ -0,0 +1,8 @@
Symbol
-----------------------------
.. toctree::
:glob:
:maxdepth: 2
symbol/*

@ -0,0 +1,19 @@
/v2/symbols
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v2/symbols
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
List of symbols
Response status codes
**********************
- **200**: Symbols list returned
Sample session
***************
.. literalinclude:: ../../../examples/controller_get_symbols.txt

@ -0,0 +1,22 @@
/v2/symbols/{symbol_id:.+}/raw
------------------------------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v2/symbols/**{symbol_id:.+}**/raw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the symbol file
Response status codes
**********************
- **200**: Symbol returned
POST /v2/symbols/**{symbol_id:.+}**/raw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Write the symbol file
Response status codes
**********************
- **200**: Symbol returned
Loading…
Cancel
Save