diff --git a/docs/api/examples/delete_projectsprojectid.txt b/docs/api/examples/delete_projectsprojectid.txt new file mode 100644 index 00000000..45efff6c --- /dev/null +++ b/docs/api/examples/delete_projectsprojectid.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/projects/{project_id}' + +DELETE /projects/{project_id} HTTP/1.1 + + + +HTTP/1.1 204 +CONNECTION: keep-alive +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/projects/{project_id} + diff --git a/docs/api/examples/delete_projectuuid.txt b/docs/api/examples/delete_projectuuid.txt deleted file mode 100644 index 9d63e2e0..00000000 --- a/docs/api/examples/delete_projectuuid.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/project/{uuid}' - -DELETE /project/{uuid} HTTP/1.1 - - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /project/{uuid} - diff --git a/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt b/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt index 2ad343a5..cb1c3b9e 100644 --- a/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt +++ b/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt @@ -5,9 +5,9 @@ DELETE /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio HTTP/1.1 HTTP/1.1 204 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio diff --git a/docs/api/examples/delete_virtualboxuuidportsportiddnio.txt b/docs/api/examples/delete_virtualboxuuidportsportiddnio.txt deleted file mode 100644 index 6cbca129..00000000 --- a/docs/api/examples/delete_virtualboxuuidportsportiddnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/virtualbox/{uuid}/ports/{port_id:\d+}/nio' - -DELETE /virtualbox/{uuid}/ports/{port_id:\d+}/nio HTTP/1.1 - - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /virtualbox/{uuid}/ports/{port_id:\d+}/nio - diff --git a/docs/api/examples/delete_vpcsiddportsportidnio.txt b/docs/api/examples/delete_vpcsiddportsportidnio.txt deleted file mode 100644 index 6cb18d74..00000000 --- a/docs/api/examples/delete_vpcsiddportsportidnio.txt +++ /dev/null @@ -1,15 +0,0 @@ -curl -i -xDELETE 'http://localhost:8000/vpcs/{id:\d+}/ports/{port_id}/nio' - -DELETE /vpcs/{id:\d+}/ports/{port_id}/nio HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 2 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{id:\d+}/ports/{port_id}/nio - -{} diff --git a/docs/api/examples/delete_vpcsuuidportsportiddnio.txt b/docs/api/examples/delete_vpcsuuidportsportiddnio.txt deleted file mode 100644 index b5801424..00000000 --- a/docs/api/examples/delete_vpcsuuidportsportiddnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/vpcs/{uuid}/ports/{port_id:\d+}/nio' - -DELETE /vpcs/{uuid}/ports/{port_id:\d+}/nio HTTP/1.1 - - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /vpcs/{uuid}/ports/{port_id:\d+}/nio - diff --git a/docs/api/examples/delete_vpcsuuidportsportidnio.txt b/docs/api/examples/delete_vpcsuuidportsportidnio.txt deleted file mode 100644 index 34cfef4d..00000000 --- a/docs/api/examples/delete_vpcsuuidportsportidnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/vpcs/{uuid}/ports/{port_id}/nio' - -DELETE /vpcs/{uuid}/ports/{port_id}/nio HTTP/1.1 - - - -HTTP/1.1 204 -CONNECTION: close -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{uuid}/ports/{port_id}/nio - diff --git a/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt b/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt index 3a17f8b1..26ac313d 100644 --- a/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt +++ b/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt @@ -5,9 +5,9 @@ DELETE /vpcs/{uuid}/ports/{port_number:\d+}/nio HTTP/1.1 HTTP/1.1 204 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{uuid}/ports/{port_number:\d+}/nio +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/vpcs/{uuid}/ports/{port_number:\d+}/nio diff --git a/docs/api/examples/delete_vpcsvpcsidportsportidnio.txt b/docs/api/examples/delete_vpcsvpcsidportsportidnio.txt deleted file mode 100644 index 37bc3fda..00000000 --- a/docs/api/examples/delete_vpcsvpcsidportsportidnio.txt +++ /dev/null @@ -1,15 +0,0 @@ -curl -i -xDELETE 'http://localhost:8000/vpcs/{vpcs_id}/ports/{port_id}/nio' - -DELETE /vpcs/{vpcs_id}/ports/{port_id}/nio HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 2 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{vpcs_id}/ports/{port_id}/nio - -{} diff --git a/docs/api/examples/get_interfaces.txt b/docs/api/examples/get_interfaces.txt index 289c74e0..7ac8c74d 100644 --- a/docs/api/examples/get_interfaces.txt +++ b/docs/api/examples/get_interfaces.txt @@ -5,32 +5,56 @@ GET /interfaces HTTP/1.1 HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 298 +CONNECTION: keep-alive +CONTENT-LENGTH: 652 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /interfaces +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/interfaces [ { - "id": "lo", - "name": "lo" + "id": "lo0", + "name": "lo0" }, { - "id": "eth0", - "name": "eth0" + "id": "gif0", + "name": "gif0" }, { - "id": "wlan0", - "name": "wlan0" + "id": "stf0", + "name": "stf0" }, { - "id": "vmnet1", - "name": "vmnet1" + "id": "en0", + "name": "en0" }, { - "id": "vmnet8", - "name": "vmnet8" + "id": "en1", + "name": "en1" + }, + { + "id": "fw0", + "name": "fw0" + }, + { + "id": "en2", + "name": "en2" + }, + { + "id": "p2p0", + "name": "p2p0" + }, + { + "id": "bridge0", + "name": "bridge0" + }, + { + "id": "vboxnet0", + "name": "vboxnet0" + }, + { + "id": "vboxnet1", + "name": "vboxnet1" } ] diff --git a/docs/api/examples/get_projectsprojectid.txt b/docs/api/examples/get_projectsprojectid.txt new file mode 100644 index 00000000..152a815a --- /dev/null +++ b/docs/api/examples/get_projectsprojectid.txt @@ -0,0 +1,19 @@ +curl -i -X GET 'http://localhost:8000/projects/{project_id}' + +GET /projects/{project_id} HTTP/1.1 + + + +HTTP/1.1 200 +CONNECTION: keep-alive +CONTENT-LENGTH: 108 +CONTENT-TYPE: application/json +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/projects/{project_id} + +{ + "location": "/tmp", + "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", + "temporary": false +} diff --git a/docs/api/examples/get_projectuuid.txt b/docs/api/examples/get_projectuuid.txt deleted file mode 100644 index 2388771c..00000000 --- a/docs/api/examples/get_projectuuid.txt +++ /dev/null @@ -1,19 +0,0 @@ -curl -i -X GET 'http://localhost:8000/project/{uuid}' - -GET /project/{uuid} HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 102 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /project/{uuid} - -{ - "location": "/tmp", - "temporary": false, - "uuid": "00010203-0405-0607-0809-0a0b0c0d0e0f" -} diff --git a/docs/api/examples/get_version.txt b/docs/api/examples/get_version.txt index 59bdb128..88017034 100644 --- a/docs/api/examples/get_version.txt +++ b/docs/api/examples/get_version.txt @@ -5,12 +5,12 @@ GET /version HTTP/1.1 HTTP/1.1 200 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 29 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /version +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/version { "version": "1.3.dev1" diff --git a/docs/api/examples/get_virtualboxuuid.txt b/docs/api/examples/get_virtualboxuuid.txt index 3ed0b071..11853488 100644 --- a/docs/api/examples/get_virtualboxuuid.txt +++ b/docs/api/examples/get_virtualboxuuid.txt @@ -5,12 +5,12 @@ GET /virtualbox/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 346 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /virtualbox/{uuid} +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/virtualbox/{uuid} { "adapter_start_index": 0, @@ -21,6 +21,6 @@ X-ROUTE: /virtualbox/{uuid} "headless": false, "name": "VMTEST", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "f246f72b-9f79-4a60-a8fb-0b2375d29d28", + "uuid": "aa7a7c1e-6fc2-43b8-b53b-60e605565625", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_vpcsuuid.txt b/docs/api/examples/get_vpcsuuid.txt index 2d191100..19f913bc 100644 --- a/docs/api/examples/get_vpcsuuid.txt +++ b/docs/api/examples/get_vpcsuuid.txt @@ -5,12 +5,12 @@ GET /vpcs/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 211 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{uuid} +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/vpcs/{uuid} { "console": 2003, @@ -18,5 +18,5 @@ X-ROUTE: /vpcs/{uuid} "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "0300d8a7-e971-4402-bd85-8c12384d308d" + "uuid": "c505f88b-7fe1-4985-9aca-a3798f6659ab" } diff --git a/docs/api/examples/post_portsudp.txt b/docs/api/examples/post_portsudp.txt index ff13ecb6..3be4b74c 100644 --- a/docs/api/examples/post_portsudp.txt +++ b/docs/api/examples/post_portsudp.txt @@ -5,12 +5,12 @@ POST /ports/udp HTTP/1.1 HTTP/1.1 201 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 25 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /ports/udp +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/ports/udp { "udp_port": 10000 diff --git a/docs/api/examples/post_project.txt b/docs/api/examples/post_project.txt deleted file mode 100644 index 4f40b3a4..00000000 --- a/docs/api/examples/post_project.txt +++ /dev/null @@ -1,22 +0,0 @@ -curl -i -X POST 'http://localhost:8000/project' -d '{"location": "/tmp", "uuid": "00010203-0405-0607-0809-0a0b0c0d0e0f"}' - -POST /project HTTP/1.1 -{ - "location": "/tmp", - "uuid": "00010203-0405-0607-0809-0a0b0c0d0e0f" -} - - -HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 102 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /project - -{ - "location": "/tmp", - "temporary": false, - "uuid": "00010203-0405-0607-0809-0a0b0c0d0e0f" -} diff --git a/docs/api/examples/post_projectsprojectidclose.txt b/docs/api/examples/post_projectsprojectidclose.txt new file mode 100644 index 00000000..bcc429c9 --- /dev/null +++ b/docs/api/examples/post_projectsprojectidclose.txt @@ -0,0 +1,13 @@ +curl -i -X POST 'http://localhost:8000/projects/{project_id}/close' -d '{}' + +POST /projects/{project_id}/close HTTP/1.1 +{} + + +HTTP/1.1 204 +CONNECTION: keep-alive +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/projects/{project_id}/close + diff --git a/docs/api/examples/post_projectsprojectidcommit.txt b/docs/api/examples/post_projectsprojectidcommit.txt new file mode 100644 index 00000000..0b36f05d --- /dev/null +++ b/docs/api/examples/post_projectsprojectidcommit.txt @@ -0,0 +1,13 @@ +curl -i -X POST 'http://localhost:8000/projects/{project_id}/commit' -d '{}' + +POST /projects/{project_id}/commit HTTP/1.1 +{} + + +HTTP/1.1 204 +CONNECTION: keep-alive +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/projects/{project_id}/commit + diff --git a/docs/api/examples/post_projectuuidclose.txt b/docs/api/examples/post_projectuuidclose.txt deleted file mode 100644 index 03ae88bc..00000000 --- a/docs/api/examples/post_projectuuidclose.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/project/{uuid}/close' -d '{}' - -POST /project/{uuid}/close HTTP/1.1 -{} - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /project/{uuid}/close - diff --git a/docs/api/examples/post_projectuuidcommit.txt b/docs/api/examples/post_projectuuidcommit.txt deleted file mode 100644 index 2fe9c38f..00000000 --- a/docs/api/examples/post_projectuuidcommit.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/project/{uuid}/commit' -d '{}' - -POST /project/{uuid}/commit HTTP/1.1 -{} - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /project/{uuid}/commit - diff --git a/docs/api/examples/post_udp.txt b/docs/api/examples/post_udp.txt deleted file mode 100644 index 7dfd4d75..00000000 --- a/docs/api/examples/post_udp.txt +++ /dev/null @@ -1,17 +0,0 @@ -curl -i -X POST 'http://localhost:8000/udp' -d '{}' - -POST /udp HTTP/1.1 -{} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 25 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /udp - -{ - "udp_port": 10000 -} diff --git a/docs/api/examples/post_version.txt b/docs/api/examples/post_version.txt index 45ef1069..2f6c1452 100644 --- a/docs/api/examples/post_version.txt +++ b/docs/api/examples/post_version.txt @@ -7,12 +7,12 @@ POST /version HTTP/1.1 HTTP/1.1 200 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 29 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /version +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/version { "version": "1.3.dev1" diff --git a/docs/api/examples/post_virtualbox.txt b/docs/api/examples/post_virtualbox.txt index 4ed3b787..06dec3c8 100644 --- a/docs/api/examples/post_virtualbox.txt +++ b/docs/api/examples/post_virtualbox.txt @@ -10,12 +10,12 @@ POST /virtualbox HTTP/1.1 HTTP/1.1 201 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 340 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /virtualbox +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/virtualbox { "adapter_start_index": 0, @@ -26,6 +26,6 @@ X-ROUTE: /virtualbox "headless": false, "name": "VM1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "210fbbba-4025-4286-81dc-1f07cc494cc9", + "uuid": "267f3908-f3dd-4cac-bca3-2e31a1018493", "vmname": "VM1" } diff --git a/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt b/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt index 04674eef..527a758e 100644 --- a/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt +++ b/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt @@ -10,12 +10,12 @@ POST /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio HTTP/1.1 HTTP/1.1 201 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio { "lport": 4242, diff --git a/docs/api/examples/post_virtualboxuuidportsportiddnio.txt b/docs/api/examples/post_virtualboxuuidportsportiddnio.txt deleted file mode 100644 index d754de40..00000000 --- a/docs/api/examples/post_virtualboxuuidportsportiddnio.txt +++ /dev/null @@ -1,25 +0,0 @@ -curl -i -X POST 'http://localhost:8000/virtualbox/{uuid}/ports/{port_id:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' - -POST /virtualbox/{uuid}/ports/{port_id:\d+}/nio HTTP/1.1 -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 89 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /virtualbox/{uuid}/ports/{port_id:\d+}/nio - -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} diff --git a/docs/api/examples/post_virtualboxuuidstart.txt b/docs/api/examples/post_virtualboxuuidstart.txt deleted file mode 100644 index 8f567c27..00000000 --- a/docs/api/examples/post_virtualboxuuidstart.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/virtualbox/{uuid}/start' -d '{}' - -POST /virtualbox/{uuid}/start HTTP/1.1 -{} - - -HTTP/1.1 204 -CONNECTION: close -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /virtualbox/{uuid}/start - diff --git a/docs/api/examples/post_virtualboxuuidstop.txt b/docs/api/examples/post_virtualboxuuidstop.txt deleted file mode 100644 index 9c4982a7..00000000 --- a/docs/api/examples/post_virtualboxuuidstop.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/virtualbox/{uuid}/stop' -d '{}' - -POST /virtualbox/{uuid}/stop HTTP/1.1 -{} - - -HTTP/1.1 204 -CONNECTION: close -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /virtualbox/{uuid}/stop - diff --git a/docs/api/examples/post_vpcs.txt b/docs/api/examples/post_vpcs.txt index c2ea6413..c9ff1f35 100644 --- a/docs/api/examples/post_vpcs.txt +++ b/docs/api/examples/post_vpcs.txt @@ -8,12 +8,12 @@ POST /vpcs HTTP/1.1 HTTP/1.1 201 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 211 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/vpcs { "console": 2001, @@ -21,5 +21,5 @@ X-ROUTE: /vpcs "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "92ff89ed-aed2-487c-b893-5559ca258d0f" + "uuid": "d7a9ef38-2863-4cf2-97ce-dcf8416a93ae" } diff --git a/docs/api/examples/post_vpcsiddportsportidnio.txt b/docs/api/examples/post_vpcsiddportsportidnio.txt deleted file mode 100644 index 771255e0..00000000 --- a/docs/api/examples/post_vpcsiddportsportidnio.txt +++ /dev/null @@ -1,25 +0,0 @@ -curl -i -xPOST 'http://localhost:8000/vpcs/{id:\d+}/ports/{port_id}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' - -POST /vpcs/{id:\d+}/ports/{port_id}/nio HTTP/1.1 -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} - - -HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 89 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{id:\d+}/ports/{port_id}/nio - -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} diff --git a/docs/api/examples/post_vpcsuuidportsportiddnio.txt b/docs/api/examples/post_vpcsuuidportsportiddnio.txt deleted file mode 100644 index 057c1385..00000000 --- a/docs/api/examples/post_vpcsuuidportsportiddnio.txt +++ /dev/null @@ -1,25 +0,0 @@ -curl -i -X POST 'http://localhost:8000/vpcs/{uuid}/ports/{port_id:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' - -POST /vpcs/{uuid}/ports/{port_id:\d+}/nio HTTP/1.1 -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 89 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /vpcs/{uuid}/ports/{port_id:\d+}/nio - -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} diff --git a/docs/api/examples/post_vpcsuuidportsportidnio.txt b/docs/api/examples/post_vpcsuuidportsportidnio.txt deleted file mode 100644 index da7e6fd9..00000000 --- a/docs/api/examples/post_vpcsuuidportsportidnio.txt +++ /dev/null @@ -1,25 +0,0 @@ -curl -i -X POST 'http://localhost:8000/vpcs/{uuid}/ports/{port_id}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' - -POST /vpcs/{uuid}/ports/{port_id}/nio HTTP/1.1 -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} - - -HTTP/1.1 201 -CONNECTION: close -CONTENT-LENGTH: 89 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{uuid}/ports/{port_id}/nio - -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} diff --git a/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt b/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt index 82abf86c..83bf344c 100644 --- a/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt +++ b/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt @@ -10,12 +10,12 @@ POST /vpcs/{uuid}/ports/{port_number:\d+}/nio HTTP/1.1 HTTP/1.1 201 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{uuid}/ports/{port_number:\d+}/nio +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/vpcs/{uuid}/ports/{port_number:\d+}/nio { "lport": 4242, diff --git a/docs/api/examples/post_vpcsvpcsidnio.txt b/docs/api/examples/post_vpcsvpcsidnio.txt deleted file mode 100644 index 84a739d6..00000000 --- a/docs/api/examples/post_vpcsvpcsidnio.txt +++ /dev/null @@ -1,28 +0,0 @@ -curl -i -xPOST 'http://localhost:8000/vpcs/{vpcs_id}/nio' -d '{"id": 42, "nio": {"local_file": "/tmp/test", "remote_file": "/tmp/remote", "type": "nio_unix"}, "port": 0, "port_id": 0}' - -POST /vpcs/{vpcs_id}/nio HTTP/1.1 -{ - "id": 42, - "nio": { - "local_file": "/tmp/test", - "remote_file": "/tmp/remote", - "type": "nio_unix" - }, - "port": 0, - "port_id": 0 -} - - -HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 62 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{vpcs_id}/nio - -{ - "console": 4242, - "name": "PC 2", - "vpcs_id": 42 -} diff --git a/docs/api/examples/post_vpcsvpcsidportsportidnio.txt b/docs/api/examples/post_vpcsvpcsidportsportidnio.txt deleted file mode 100644 index 06fbc0fb..00000000 --- a/docs/api/examples/post_vpcsvpcsidportsportidnio.txt +++ /dev/null @@ -1,25 +0,0 @@ -curl -i -xPOST 'http://localhost:8000/vpcs/{vpcs_id}/ports/{port_id}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' - -POST /vpcs/{vpcs_id}/ports/{port_id}/nio HTTP/1.1 -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} - - -HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 89 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 -X-ROUTE: /vpcs/{vpcs_id}/ports/{port_id}/nio - -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} diff --git a/docs/api/examples/put_projectsprojectid.txt b/docs/api/examples/put_projectsprojectid.txt new file mode 100644 index 00000000..e0366b62 --- /dev/null +++ b/docs/api/examples/put_projectsprojectid.txt @@ -0,0 +1,21 @@ +curl -i -X PUT 'http://localhost:8000/projects/{project_id}' -d '{"temporary": false}' + +PUT /projects/{project_id} HTTP/1.1 +{ + "temporary": false +} + + +HTTP/1.1 200 +CONNECTION: keep-alive +CONTENT-LENGTH: 164 +CONTENT-TYPE: application/json +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.4 GNS3/1.3.dev1 +X-ROUTE: /v1/projects/{project_id} + +{ + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmptf8_s67s", + "project_id": "12d03846-c355-4da9-b708-cd45e5d30a50", + "temporary": false +} diff --git a/docs/api/examples/put_projectuuid.txt b/docs/api/examples/put_projectuuid.txt deleted file mode 100644 index 91147567..00000000 --- a/docs/api/examples/put_projectuuid.txt +++ /dev/null @@ -1,21 +0,0 @@ -curl -i -X PUT 'http://localhost:8000/project/{uuid}' -d '{"temporary": false}' - -PUT /project/{uuid} HTTP/1.1 -{ - "temporary": false -} - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 158 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /project/{uuid} - -{ - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmphb8dmyls", - "temporary": false, - "uuid": "1aa054dd-e672-4961-90c3-fef730fc6301" -} diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst deleted file mode 100644 index 946e4c15..00000000 --- a/docs/api/interfaces.rst +++ /dev/null @@ -1,19 +0,0 @@ -/interfaces ---------------------------------------------- - -.. contents:: - -GET /interfaces -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -List all the network interfaces available on the server - -Response status codes -********************** -- **200**: OK - -Sample session -*************** - - -.. literalinclude:: examples/get_interfaces.txt - diff --git a/docs/api/portsudp.rst b/docs/api/portsudp.rst deleted file mode 100644 index a2ecdae7..00000000 --- a/docs/api/portsudp.rst +++ /dev/null @@ -1,19 +0,0 @@ -/ports/udp ---------------------------------------------- - -.. contents:: - -POST /ports/udp -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allocate an UDP port on the server - -Response status codes -********************** -- **201**: UDP port allocated - -Sample session -*************** - - -.. literalinclude:: examples/post_portsudp.txt - diff --git a/docs/api/projectuuidclose.rst b/docs/api/projectuuidclose.rst deleted file mode 100644 index dffca28c..00000000 --- a/docs/api/projectuuidclose.rst +++ /dev/null @@ -1,24 +0,0 @@ -/project/{uuid}/close ---------------------------------------------- - -.. contents:: - -POST /project/**{uuid}**/close -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Close project - -Parameters -********** -- **uuid**: Project instance UUID - -Response status codes -********************** -- **404**: Project instance doesn't exist -- **204**: Project closed - -Sample session -*************** - - -.. literalinclude:: examples/post_projectuuidclose.txt - diff --git a/docs/api/projectuuidcommit.rst b/docs/api/projectuuidcommit.rst deleted file mode 100644 index 6bbd35f1..00000000 --- a/docs/api/projectuuidcommit.rst +++ /dev/null @@ -1,24 +0,0 @@ -/project/{uuid}/commit ---------------------------------------------- - -.. contents:: - -POST /project/**{uuid}**/commit -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Write changes on disk - -Parameters -********** -- **uuid**: Project instance UUID - -Response status codes -********************** -- **404**: Project instance doesn't exist -- **204**: Changes write on disk - -Sample session -*************** - - -.. literalinclude:: examples/post_projectuuidcommit.txt - diff --git a/docs/api/udp.rst b/docs/api/udp.rst deleted file mode 100644 index 6ed3ac5d..00000000 --- a/docs/api/udp.rst +++ /dev/null @@ -1,19 +0,0 @@ -/udp ---------------------------------------------- - -.. contents:: - -POST /udp -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allocate an UDP port on the server - -Response status codes -********************** -- **201**: UDP port allocated - -Sample session -*************** - - -.. literalinclude:: examples/post_udp.txt - diff --git a/docs/api/v1interfaces.rst b/docs/api/v1interfaces.rst new file mode 100644 index 00000000..fc32b2ee --- /dev/null +++ b/docs/api/v1interfaces.rst @@ -0,0 +1,13 @@ +/v1/interfaces +----------------------------------------------------------- + +.. contents:: + +GET /v1/interfaces +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +List all the network interfaces available on the server + +Response status codes +********************** +- **200**: OK + diff --git a/docs/api/v1portsudp.rst b/docs/api/v1portsudp.rst new file mode 100644 index 00000000..3451314a --- /dev/null +++ b/docs/api/v1portsudp.rst @@ -0,0 +1,13 @@ +/v1/ports/udp +----------------------------------------------------------- + +.. contents:: + +POST /v1/ports/udp +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Allocate an UDP port on the server + +Response status codes +********************** +- **201**: UDP port allocated + diff --git a/docs/api/project.rst b/docs/api/v1projects.rst similarity index 69% rename from docs/api/project.rst rename to docs/api/v1projects.rst index 8edefbbe..303c52a9 100644 --- a/docs/api/project.rst +++ b/docs/api/v1projects.rst @@ -1,11 +1,11 @@ -/project ---------------------------------------------- +/v1/projects +----------------------------------------------------------- .. contents:: -POST /project -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Create a project on the server +POST /v1/projects +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Create a new project on the server Response status codes ********************** @@ -18,8 +18,8 @@ Input + -
Name Mandatory Type Description
location string Base directory where the project should be created on remote server
project_id ['string', 'null'] Project UUID
temporary boolean If project is a temporary project
uuid ['string', 'null'] Project UUID
Output @@ -29,13 +29,7 @@ Output + -
Name Mandatory Type Description
location string Base directory where the project should be created on remote server
project_id string Project UUID
temporary boolean If project is a temporary project
uuid string Project UUID
-Sample session -*************** - - -.. literalinclude:: examples/post_project.txt - diff --git a/docs/api/projectuuid.rst b/docs/api/v1projectsprojectid.rst similarity index 62% rename from docs/api/projectuuid.rst rename to docs/api/v1projectsprojectid.rst index fd846a10..0b872074 100644 --- a/docs/api/projectuuid.rst +++ b/docs/api/v1projectsprojectid.rst @@ -1,20 +1,20 @@ -/project/{uuid} ---------------------------------------------- +/v1/projects/{project_id} +----------------------------------------------------------- .. contents:: -GET /project/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/projects/**{project_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get project information Parameters ********** -- **uuid**: Project instance UUID +- **project_id**: The UUID of the project Response status codes ********************** -- **200**: OK -- **404**: Project instance doesn't exist +- **200**: Success +- **404**: The project doesn't exist Output ******* @@ -23,29 +23,23 @@ Output + -
Name Mandatory Type Description
location string Base directory where the project should be created on remote server
project_id string Project UUID
temporary boolean If project is a temporary project
uuid string Project UUID
-Sample session -*************** - -.. literalinclude:: examples/get_projectuuid.txt - - -PUT /project/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/projects/**{project_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a project Parameters ********** -- **uuid**: Project instance UUID +- **project_id**: The UUID of the project Response status codes ********************** -- **200**: Project updated -- **404**: Project instance doesn't exist +- **200**: The project has been updated +- **404**: The project doesn't exist Input ******* @@ -63,33 +57,21 @@ Output + -
Name Mandatory Type Description
location string Base directory where the project should be created on remote server
project_id string Project UUID
temporary boolean If project is a temporary project
uuid string Project UUID
-Sample session -*************** - -.. literalinclude:: examples/put_projectuuid.txt - - -DELETE /project/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/projects/**{project_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a project from disk Parameters ********** -- **uuid**: Project instance UUID +- **project_id**: The UUID of the project Response status codes ********************** -- **404**: Project instance doesn't exist -- **204**: Changes write on disk - -Sample session -*************** - - -.. literalinclude:: examples/delete_projectuuid.txt +- **404**: The project doesn't exist +- **204**: Changes have been written on disk diff --git a/docs/api/v1projectsprojectidclose.rst b/docs/api/v1projectsprojectidclose.rst new file mode 100644 index 00000000..e9b4feb8 --- /dev/null +++ b/docs/api/v1projectsprojectidclose.rst @@ -0,0 +1,18 @@ +/v1/projects/{project_id}/close +----------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/close +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Close a project + +Parameters +********** +- **project_id**: The UUID of the project + +Response status codes +********************** +- **404**: The project doesn't exist +- **204**: The project has been closed + diff --git a/docs/api/v1projectsprojectidcommit.rst b/docs/api/v1projectsprojectidcommit.rst new file mode 100644 index 00000000..4909e569 --- /dev/null +++ b/docs/api/v1projectsprojectidcommit.rst @@ -0,0 +1,18 @@ +/v1/projects/{project_id}/commit +----------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/commit +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Write changes on disk + +Parameters +********** +- **project_id**: The UUID of the project + +Response status codes +********************** +- **404**: The project doesn't exist +- **204**: Changes have been written on disk + diff --git a/docs/api/version.rst b/docs/api/v1version.rst similarity index 80% rename from docs/api/version.rst rename to docs/api/v1version.rst index f98b52f5..e0946a33 100644 --- a/docs/api/version.rst +++ b/docs/api/v1version.rst @@ -1,10 +1,10 @@ -/version ---------------------------------------------- +/v1/version +----------------------------------------------------------- .. contents:: -GET /version -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/version +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the server version number Response status codes @@ -20,15 +20,9 @@ Output version ✔ string Version number human readable -Sample session -*************** - -.. literalinclude:: examples/get_version.txt - - -POST /version -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/version +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Check if version is the same as the server Response status codes @@ -54,9 +48,3 @@ Output version ✔ string Version number human readable -Sample session -*************** - - -.. literalinclude:: examples/post_version.txt - diff --git a/docs/api/virtualbox.rst b/docs/api/v1virtualbox.rst similarity index 95% rename from docs/api/virtualbox.rst rename to docs/api/v1virtualbox.rst index d85ef101..754badb1 100644 --- a/docs/api/virtualbox.rst +++ b/docs/api/v1virtualbox.rst @@ -1,10 +1,10 @@ -/virtualbox ---------------------------------------------- +/v1/virtualbox +----------------------------------------------------------- .. contents:: -POST /virtualbox -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/virtualbox +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new VirtualBox VM instance Response status codes @@ -51,9 +51,3 @@ Output vmname string VirtualBox VM name (in VirtualBox itself) -Sample session -*************** - - -.. literalinclude:: examples/post_virtualbox.txt - diff --git a/docs/api/virtualboxuuid.rst b/docs/api/v1virtualboxuuid.rst similarity index 93% rename from docs/api/virtualboxuuid.rst rename to docs/api/v1virtualboxuuid.rst index c9dfaa58..90b30f7c 100644 --- a/docs/api/virtualboxuuid.rst +++ b/docs/api/v1virtualboxuuid.rst @@ -1,10 +1,10 @@ -/virtualbox/{uuid} ---------------------------------------------- +/v1/virtualbox/{uuid} +----------------------------------------------------------- .. contents:: -GET /virtualbox/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/virtualbox/**{uuid}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a VirtualBox VM instance Parameters @@ -34,15 +34,9 @@ Output vmname string VirtualBox VM name (in VirtualBox itself) -Sample session -*************** - -.. literalinclude:: examples/get_virtualboxuuid.txt - - -PUT /virtualbox/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/virtualbox/**{uuid}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a VirtualBox VM instance Parameters @@ -90,8 +84,8 @@ Output -DELETE /virtualbox/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/virtualbox/**{uuid}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a VirtualBox VM instance Parameters diff --git a/docs/api/virtualboxuuidadaptersadapteriddnio.rst b/docs/api/v1virtualboxuuidadaptersadapteriddnio.rst similarity index 51% rename from docs/api/virtualboxuuidadaptersadapteriddnio.rst rename to docs/api/v1virtualboxuuidadaptersadapteriddnio.rst index 843fcd0b..dc6649f7 100644 --- a/docs/api/virtualboxuuidadaptersadapteriddnio.rst +++ b/docs/api/v1virtualboxuuidadaptersadapteriddnio.rst @@ -1,10 +1,10 @@ -/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio ---------------------------------------------- +/v1/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio +----------------------------------------------------------- .. contents:: -POST /virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a VirtualBox VM instance Parameters @@ -18,15 +18,9 @@ Response status codes - **201**: NIO created - **404**: Instance doesn't exist -Sample session -*************** - -.. literalinclude:: examples/post_virtualboxuuidadaptersadapteriddnio.txt - - -DELETE /virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a VirtualBox VM instance Parameters @@ -40,9 +34,3 @@ Response status codes - **404**: Instance doesn't exist - **204**: NIO deleted -Sample session -*************** - - -.. literalinclude:: examples/delete_virtualboxuuidadaptersadapteriddnio.txt - diff --git a/docs/api/virtualboxuuidcaptureadapteriddstart.rst b/docs/api/v1virtualboxuuidcaptureadapteriddstart.rst similarity index 72% rename from docs/api/virtualboxuuidcaptureadapteriddstart.rst rename to docs/api/v1virtualboxuuidcaptureadapteriddstart.rst index d7db9429..db6f0f61 100644 --- a/docs/api/virtualboxuuidcaptureadapteriddstart.rst +++ b/docs/api/v1virtualboxuuidcaptureadapteriddstart.rst @@ -1,10 +1,10 @@ -/virtualbox/{uuid}/capture/{adapter_id:\d+}/start ---------------------------------------------- +/v1/virtualbox/{uuid}/capture/{adapter_id:\d+}/start +----------------------------------------------------------- .. contents:: -POST /virtualbox/**{uuid}**/capture/**{adapter_id:\d+}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/virtualbox/**{uuid}**/capture/**{adapter_id:\d+}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a packet capture on a VirtualBox VM instance Parameters diff --git a/docs/api/virtualboxuuidcaptureadapteriddstop.rst b/docs/api/v1virtualboxuuidcaptureadapteriddstop.rst similarity index 53% rename from docs/api/virtualboxuuidcaptureadapteriddstop.rst rename to docs/api/v1virtualboxuuidcaptureadapteriddstop.rst index c4067108..eacc8212 100644 --- a/docs/api/virtualboxuuidcaptureadapteriddstop.rst +++ b/docs/api/v1virtualboxuuidcaptureadapteriddstop.rst @@ -1,10 +1,10 @@ -/virtualbox/{uuid}/capture/{adapter_id:\d+}/stop ---------------------------------------------- +/v1/virtualbox/{uuid}/capture/{adapter_id:\d+}/stop +----------------------------------------------------------- .. contents:: -POST /virtualbox/**{uuid}**/capture/**{adapter_id:\d+}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/virtualbox/**{uuid}**/capture/**{adapter_id:\d+}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a packet capture on a VirtualBox VM instance Parameters diff --git a/docs/api/virtualboxuuidreload.rst b/docs/api/v1virtualboxuuidreload.rst similarity index 52% rename from docs/api/virtualboxuuidreload.rst rename to docs/api/v1virtualboxuuidreload.rst index 9a56133f..3ad6c3b7 100644 --- a/docs/api/virtualboxuuidreload.rst +++ b/docs/api/v1virtualboxuuidreload.rst @@ -1,10 +1,10 @@ -/virtualbox/{uuid}/reload ---------------------------------------------- +/v1/virtualbox/{uuid}/reload +----------------------------------------------------------- .. contents:: -POST /virtualbox/**{uuid}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/virtualbox/**{uuid}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a VirtualBox VM instance Parameters diff --git a/docs/api/virtualboxuuidresume.rst b/docs/api/v1virtualboxuuidresume.rst similarity index 53% rename from docs/api/virtualboxuuidresume.rst rename to docs/api/v1virtualboxuuidresume.rst index dc8e616d..97bfdbf8 100644 --- a/docs/api/virtualboxuuidresume.rst +++ b/docs/api/v1virtualboxuuidresume.rst @@ -1,10 +1,10 @@ -/virtualbox/{uuid}/resume ---------------------------------------------- +/v1/virtualbox/{uuid}/resume +----------------------------------------------------------- .. contents:: -POST /virtualbox/**{uuid}**/resume -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/virtualbox/**{uuid}**/resume +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resume a suspended VirtualBox VM instance Parameters diff --git a/docs/api/v1virtualboxuuidstart.rst b/docs/api/v1virtualboxuuidstart.rst new file mode 100644 index 00000000..178ed7d4 --- /dev/null +++ b/docs/api/v1virtualboxuuidstart.rst @@ -0,0 +1,19 @@ +/v1/virtualbox/{uuid}/start +----------------------------------------------------------- + +.. contents:: + +POST /v1/virtualbox/**{uuid}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Start a VirtualBox VM instance + +Parameters +********** +- **uuid**: Instance UUID + +Response status codes +********************** +- **400**: Invalid instance UUID +- **404**: Instance doesn't exist +- **204**: Instance started + diff --git a/docs/api/v1virtualboxuuidstop.rst b/docs/api/v1virtualboxuuidstop.rst new file mode 100644 index 00000000..8cbe9441 --- /dev/null +++ b/docs/api/v1virtualboxuuidstop.rst @@ -0,0 +1,19 @@ +/v1/virtualbox/{uuid}/stop +----------------------------------------------------------- + +.. contents:: + +POST /v1/virtualbox/**{uuid}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Stop a VirtualBox VM instance + +Parameters +********** +- **uuid**: Instance UUID + +Response status codes +********************** +- **400**: Invalid instance UUID +- **404**: Instance doesn't exist +- **204**: Instance stopped + diff --git a/docs/api/virtualboxuuidsuspend.rst b/docs/api/v1virtualboxuuidsuspend.rst similarity index 52% rename from docs/api/virtualboxuuidsuspend.rst rename to docs/api/v1virtualboxuuidsuspend.rst index 90512c7a..3c14bc16 100644 --- a/docs/api/virtualboxuuidsuspend.rst +++ b/docs/api/v1virtualboxuuidsuspend.rst @@ -1,10 +1,10 @@ -/virtualbox/{uuid}/suspend ---------------------------------------------- +/v1/virtualbox/{uuid}/suspend +----------------------------------------------------------- .. contents:: -POST /virtualbox/**{uuid}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/virtualbox/**{uuid}**/suspend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suspend a VirtualBox VM instance Parameters diff --git a/docs/api/v1virtualboxvms.rst b/docs/api/v1virtualboxvms.rst new file mode 100644 index 00000000..18a82b95 --- /dev/null +++ b/docs/api/v1virtualboxvms.rst @@ -0,0 +1,13 @@ +/v1/virtualbox/vms +----------------------------------------------------------- + +.. contents:: + +GET /v1/virtualbox/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Get all VirtualBox VMs available + +Response status codes +********************** +- **200**: Success + diff --git a/docs/api/vpcs.rst b/docs/api/v1vpcs.rst similarity index 93% rename from docs/api/vpcs.rst rename to docs/api/v1vpcs.rst index 36c55b71..3e26b9ce 100644 --- a/docs/api/vpcs.rst +++ b/docs/api/v1vpcs.rst @@ -1,10 +1,10 @@ -/vpcs ---------------------------------------------- +/v1/vpcs +----------------------------------------------------------- .. contents:: -POST /vpcs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/vpcs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new VPCS instance Response status codes @@ -41,9 +41,3 @@ Output uuid ✔ string VPCS device UUID -Sample session -*************** - - -.. literalinclude:: examples/post_vpcs.txt - diff --git a/docs/api/vpcsuuid.rst b/docs/api/v1vpcsuuid.rst similarity index 90% rename from docs/api/vpcsuuid.rst rename to docs/api/v1vpcsuuid.rst index 67c2883a..0bc9e4e5 100644 --- a/docs/api/vpcsuuid.rst +++ b/docs/api/v1vpcsuuid.rst @@ -1,10 +1,10 @@ -/vpcs/{uuid} ---------------------------------------------- +/v1/vpcs/{uuid} +----------------------------------------------------------- .. contents:: -GET /vpcs/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/vpcs/**{uuid}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a VPCS instance Parameters @@ -30,15 +30,9 @@ Output uuid ✔ string VPCS device UUID -Sample session -*************** - -.. literalinclude:: examples/get_vpcsuuid.txt - - -PUT /vpcs/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/vpcs/**{uuid}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a VPCS instance Parameters @@ -77,8 +71,8 @@ Output -DELETE /vpcs/**{uuid}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/vpcs/**{uuid}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a VPCS instance Parameters diff --git a/docs/api/vpcsuuidportsportnumberdnio.rst b/docs/api/v1vpcsuuidportsportnumberdnio.rst similarity index 52% rename from docs/api/vpcsuuidportsportnumberdnio.rst rename to docs/api/v1vpcsuuidportsportnumberdnio.rst index e16cd3f9..72a5b999 100644 --- a/docs/api/vpcsuuidportsportnumberdnio.rst +++ b/docs/api/v1vpcsuuidportsportnumberdnio.rst @@ -1,10 +1,10 @@ -/vpcs/{uuid}/ports/{port_number:\d+}/nio ---------------------------------------------- +/v1/vpcs/{uuid}/ports/{port_number:\d+}/nio +----------------------------------------------------------- .. contents:: -POST /vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a VPCS instance Parameters @@ -18,15 +18,9 @@ Response status codes - **201**: NIO created - **404**: Instance doesn't exist -Sample session -*************** - -.. literalinclude:: examples/post_vpcsuuidportsportnumberdnio.txt - - -DELETE /vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a VPCS instance Parameters @@ -40,9 +34,3 @@ Response status codes - **404**: Instance doesn't exist - **204**: NIO deleted -Sample session -*************** - - -.. literalinclude:: examples/delete_vpcsuuidportsportnumberdnio.txt - diff --git a/docs/api/vpcsuuidreload.rst b/docs/api/v1vpcsuuidreload.rst similarity index 53% rename from docs/api/vpcsuuidreload.rst rename to docs/api/v1vpcsuuidreload.rst index 93c24a52..5495cc6e 100644 --- a/docs/api/vpcsuuidreload.rst +++ b/docs/api/v1vpcsuuidreload.rst @@ -1,10 +1,10 @@ -/vpcs/{uuid}/reload ---------------------------------------------- +/v1/vpcs/{uuid}/reload +----------------------------------------------------------- .. contents:: -POST /vpcs/**{uuid}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/vpcs/**{uuid}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a VPCS instance Parameters diff --git a/docs/api/vpcsuuidstart.rst b/docs/api/v1vpcsuuidstart.rst similarity index 53% rename from docs/api/vpcsuuidstart.rst rename to docs/api/v1vpcsuuidstart.rst index aa02e25d..60b9af17 100644 --- a/docs/api/vpcsuuidstart.rst +++ b/docs/api/v1vpcsuuidstart.rst @@ -1,10 +1,10 @@ -/vpcs/{uuid}/start ---------------------------------------------- +/v1/vpcs/{uuid}/start +----------------------------------------------------------- .. contents:: -POST /vpcs/**{uuid}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/vpcs/**{uuid}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a VPCS instance Parameters diff --git a/docs/api/vpcsuuidstop.rst b/docs/api/v1vpcsuuidstop.rst similarity index 53% rename from docs/api/vpcsuuidstop.rst rename to docs/api/v1vpcsuuidstop.rst index a11f183f..90f96f06 100644 --- a/docs/api/vpcsuuidstop.rst +++ b/docs/api/v1vpcsuuidstop.rst @@ -1,10 +1,10 @@ -/vpcs/{uuid}/stop ---------------------------------------------- +/v1/vpcs/{uuid}/stop +----------------------------------------------------------- .. contents:: -POST /vpcs/**{uuid}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/vpcs/**{uuid}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a VPCS instance Parameters diff --git a/docs/api/virtualboxlist.rst b/docs/api/virtualboxlist.rst deleted file mode 100644 index f6944d15..00000000 --- a/docs/api/virtualboxlist.rst +++ /dev/null @@ -1,13 +0,0 @@ -/virtualbox/list ---------------------------------------------- - -.. contents:: - -GET /virtualbox/list -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Get all VirtualBox VMs available - -Response status codes -********************** -- **200**: Success - diff --git a/docs/api/virtualboxuuidcaptureportiddstart.rst b/docs/api/virtualboxuuidcaptureportiddstart.rst deleted file mode 100644 index 342f1893..00000000 --- a/docs/api/virtualboxuuidcaptureportiddstart.rst +++ /dev/null @@ -1,29 +0,0 @@ -/virtualbox/{uuid}/capture/{port_id:\d+}/start ---------------------------------------------- - -.. contents:: - -POST /virtualbox/**{uuid}**/capture/**{port_id:\d+}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Start a packet capture on a VirtualBox VM instance - -Parameters -********** -- **uuid**: Instance UUID -- **port_id**: ID of the port to start a packet capture - -Response status codes -********************** -- **200**: Capture started -- **400**: Invalid instance UUID -- **404**: Instance doesn't exist - -Input -******* -.. raw:: html - - - - -
Name Mandatory Type Description
capture_filename string Capture file name
- diff --git a/docs/api/virtualboxuuidcaptureportiddstop.rst b/docs/api/virtualboxuuidcaptureportiddstop.rst deleted file mode 100644 index a4a35c47..00000000 --- a/docs/api/virtualboxuuidcaptureportiddstop.rst +++ /dev/null @@ -1,20 +0,0 @@ -/virtualbox/{uuid}/capture/{port_id:\d+}/stop ---------------------------------------------- - -.. contents:: - -POST /virtualbox/**{uuid}**/capture/**{port_id:\d+}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Stop a packet capture on a VirtualBox VM instance - -Parameters -********** -- **uuid**: Instance UUID -- **port_id**: ID of the port to stop a packet capture - -Response status codes -********************** -- **400**: Invalid instance UUID -- **404**: Instance doesn't exist -- **204**: Capture stopped - diff --git a/docs/api/virtualboxuuidportsportiddnio.rst b/docs/api/virtualboxuuidportsportiddnio.rst deleted file mode 100644 index 160e5272..00000000 --- a/docs/api/virtualboxuuidportsportiddnio.rst +++ /dev/null @@ -1,48 +0,0 @@ -/virtualbox/{uuid}/ports/{port_id:\d+}/nio ---------------------------------------------- - -.. contents:: - -POST /virtualbox/**{uuid}**/ports/**{port_id:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Add a NIO to a VirtualBox VM instance - -Parameters -********** -- **uuid**: Instance UUID -- **port_id**: ID of the port where the nio should be added - -Response status codes -********************** -- **400**: Invalid instance UUID -- **201**: NIO created -- **404**: Instance doesn't exist - -Sample session -*************** - - -.. literalinclude:: examples/post_virtualboxuuidportsportiddnio.txt - - -DELETE /virtualbox/**{uuid}**/ports/**{port_id:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Remove a NIO from a VirtualBox VM instance - -Parameters -********** -- **uuid**: Instance UUID -- **port_id**: ID of the port from where the nio should be removed - -Response status codes -********************** -- **400**: Invalid instance UUID -- **404**: Instance doesn't exist -- **204**: NIO deleted - -Sample session -*************** - - -.. literalinclude:: examples/delete_virtualboxuuidportsportiddnio.txt - diff --git a/docs/api/virtualboxuuidstart.rst b/docs/api/virtualboxuuidstart.rst deleted file mode 100644 index 2e9662d7..00000000 --- a/docs/api/virtualboxuuidstart.rst +++ /dev/null @@ -1,25 +0,0 @@ -/virtualbox/{uuid}/start ---------------------------------------------- - -.. contents:: - -POST /virtualbox/**{uuid}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Start a VirtualBox VM instance - -Parameters -********** -- **uuid**: Instance UUID - -Response status codes -********************** -- **400**: Invalid instance UUID -- **404**: Instance doesn't exist -- **204**: Instance started - -Sample session -*************** - - -.. literalinclude:: examples/post_virtualboxuuidstart.txt - diff --git a/docs/api/virtualboxuuidstop.rst b/docs/api/virtualboxuuidstop.rst deleted file mode 100644 index e19340b9..00000000 --- a/docs/api/virtualboxuuidstop.rst +++ /dev/null @@ -1,25 +0,0 @@ -/virtualbox/{uuid}/stop ---------------------------------------------- - -.. contents:: - -POST /virtualbox/**{uuid}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Stop a VirtualBox VM instance - -Parameters -********** -- **uuid**: Instance UUID - -Response status codes -********************** -- **400**: Invalid instance UUID -- **404**: Instance doesn't exist -- **204**: Instance stopped - -Sample session -*************** - - -.. literalinclude:: examples/post_virtualboxuuidstop.txt - diff --git a/docs/api/virtualboxvms.rst b/docs/api/virtualboxvms.rst deleted file mode 100644 index c8f79412..00000000 --- a/docs/api/virtualboxvms.rst +++ /dev/null @@ -1,13 +0,0 @@ -/virtualbox/vms ---------------------------------------------- - -.. contents:: - -GET /virtualbox/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Get all VirtualBox VMs available - -Response status codes -********************** -- **200**: Success - diff --git a/docs/api/vpcsuuidportsportiddnio.rst b/docs/api/vpcsuuidportsportiddnio.rst deleted file mode 100644 index 6226c3cf..00000000 --- a/docs/api/vpcsuuidportsportiddnio.rst +++ /dev/null @@ -1,48 +0,0 @@ -/vpcs/{uuid}/ports/{port_id:\d+}/nio ---------------------------------------------- - -.. contents:: - -POST /vpcs/**{uuid}**/ports/**{port_id:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Add a NIO to a VPCS instance - -Parameters -********** -- **uuid**: Instance UUID -- **port_id**: ID of the port where the nio should be added - -Response status codes -********************** -- **400**: Invalid instance UUID -- **201**: NIO created -- **404**: Instance doesn't exist - -Sample session -*************** - - -.. literalinclude:: examples/post_vpcsuuidportsportiddnio.txt - - -DELETE /vpcs/**{uuid}**/ports/**{port_id:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Remove a NIO from a VPCS instance - -Parameters -********** -- **uuid**: Instance UUID -- **port_id**: ID of the port from where the nio should be removed - -Response status codes -********************** -- **400**: Invalid instance UUID -- **404**: Instance doesn't exist -- **204**: NIO deleted - -Sample session -*************** - - -.. literalinclude:: examples/delete_vpcsuuidportsportiddnio.txt - diff --git a/docs/api/vpcsuuidportsportidnio.rst b/docs/api/vpcsuuidportsportidnio.rst deleted file mode 100644 index fd5090de..00000000 --- a/docs/api/vpcsuuidportsportidnio.rst +++ /dev/null @@ -1,48 +0,0 @@ -/vpcs/{uuid}/ports/{port_id}/nio ---------------------------------------------- - -.. contents:: - -POST /vpcs/**{uuid}**/ports/**{port_id}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Add a NIO to a VPCS - -Parameters -********** -- **port_id**: Id of the port where the nio should be add -- **uuid**: VPCS instance UUID - -Response status codes -********************** -- **400**: Invalid VPCS instance UUID -- **201**: NIO created -- **404**: VPCS instance doesn't exist - -Sample session -*************** - - -.. literalinclude:: examples/post_vpcsuuidportsportidnio.txt - - -DELETE /vpcs/**{uuid}**/ports/**{port_id}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Remove a NIO from a VPCS - -Parameters -********** -- **port_id**: ID of the port where the nio should be removed -- **uuid**: VPCS instance UUID - -Response status codes -********************** -- **400**: Invalid VPCS instance UUID -- **404**: VPCS instance doesn't exist -- **204**: NIO deleted - -Sample session -*************** - - -.. literalinclude:: examples/delete_vpcsuuidportsportidnio.txt - diff --git a/gns3server/web/documentation.py b/gns3server/web/documentation.py index 66ddf1f0..04b5cfd3 100644 --- a/gns3server/web/documentation.py +++ b/gns3server/web/documentation.py @@ -34,11 +34,11 @@ class Documentation(object): filename = self._file_path(path) handler_doc = self._documentation[path] with open("docs/api/{}.rst".format(filename), 'w+') as f: - f.write('{}\n---------------------------------------------\n\n'.format(path)) + f.write('{}\n-----------------------------------------------------------\n\n'.format(path)) f.write('.. contents::\n') for method in handler_doc["methods"]: f.write('\n{} {}\n'.format(method["method"], path.replace("{", '**{').replace("}", "}**"))) - f.write('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n') + f.write('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n') f.write('{}\n\n'.format(method["description"])) if len(method["parameters"]) > 0: diff --git a/scripts/documentation.sh b/scripts/documentation.sh index fb7af59c..41111993 100755 --- a/scripts/documentation.sh +++ b/scripts/documentation.sh @@ -25,6 +25,9 @@ echo "WARNING: This script should be run at the root directory of the project" export PYTEST_BUILD_DOCUMENTATION=1 +rm -Rf docs/api/ +mkdir -p docs/api/examples + py.test -v python3 gns3server/web/documentation.py cd docs