diff --git a/docs/api/examples/delete_projectuuid.txt b/docs/api/examples/delete_projectuuid.txt index 68989437..9d63e2e0 100644 --- a/docs/api/examples/delete_projectuuid.txt +++ b/docs/api/examples/delete_projectuuid.txt @@ -5,9 +5,9 @@ DELETE /project/{uuid} 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 +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 new file mode 100644 index 00000000..cf775417 --- /dev/null +++ b/docs/api/examples/delete_virtualboxuuidadaptersadapteriddnio.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio' + +DELETE /virtualbox/{uuid}/adapters/{adapter_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}/adapters/{adapter_id:\d+}/nio + diff --git a/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt b/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt new file mode 100644 index 00000000..c2a772f2 --- /dev/null +++ b/docs/api/examples/delete_vpcsuuidportsportnumberdnio.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/vpcs/{uuid}/ports/{port_number:\d+}/nio' + +DELETE /vpcs/{uuid}/ports/{port_number:\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_number:\d+}/nio + diff --git a/docs/api/examples/get_interfaces.txt b/docs/api/examples/get_interfaces.txt index 9489d231..74381d7e 100644 --- a/docs/api/examples/get_interfaces.txt +++ b/docs/api/examples/get_interfaces.txt @@ -5,36 +5,56 @@ GET /interfaces HTTP/1.1 HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 364 +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 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /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_projectuuid.txt b/docs/api/examples/get_projectuuid.txt index bed046ad..2388771c 100644 --- a/docs/api/examples/get_projectuuid.txt +++ b/docs/api/examples/get_projectuuid.txt @@ -5,11 +5,11 @@ GET /project/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 102 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /project/{uuid} { diff --git a/docs/api/examples/get_version.txt b/docs/api/examples/get_version.txt index 59bdb128..39509cda 100644 --- a/docs/api/examples/get_version.txt +++ b/docs/api/examples/get_version.txt @@ -5,11 +5,11 @@ 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 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /version { diff --git a/docs/api/examples/get_virtualboxuuid.txt b/docs/api/examples/get_virtualboxuuid.txt index 739e864d..4322211e 100644 --- a/docs/api/examples/get_virtualboxuuid.txt +++ b/docs/api/examples/get_virtualboxuuid.txt @@ -5,11 +5,11 @@ GET /virtualbox/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 348 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /virtualbox/{uuid} { @@ -21,6 +21,6 @@ X-ROUTE: /virtualbox/{uuid} "headless": false, "name": "VMTEST", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "0d15855e-8fb4-41af-81b0-a150c7576d5a", + "uuid": "c6b74706-54b6-405d-8aea-9c48a94987e8", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_vpcsuuid.txt b/docs/api/examples/get_vpcsuuid.txt index 61a263a0..5aab7abd 100644 --- a/docs/api/examples/get_vpcsuuid.txt +++ b/docs/api/examples/get_vpcsuuid.txt @@ -5,11 +5,11 @@ GET /vpcs/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 213 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /vpcs/{uuid} { @@ -18,5 +18,5 @@ X-ROUTE: /vpcs/{uuid} "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "2ddb0fa3-1010-4f48-b295-caa1c414b4a2" + "uuid": "aceec3c0-f02d-44ee-88a6-85c3120c22ca" } diff --git a/docs/api/examples/post_portsudp.txt b/docs/api/examples/post_portsudp.txt new file mode 100644 index 00000000..8e7ea7f1 --- /dev/null +++ b/docs/api/examples/post_portsudp.txt @@ -0,0 +1,17 @@ +curl -i -X POST 'http://localhost:8000/ports/udp' -d '{}' + +POST /ports/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: /ports/udp + +{ + "udp_port": 10000 +} diff --git a/docs/api/examples/post_projectuuidclose.txt b/docs/api/examples/post_projectuuidclose.txt index d038c178..03ae88bc 100644 --- a/docs/api/examples/post_projectuuidclose.txt +++ b/docs/api/examples/post_projectuuidclose.txt @@ -5,9 +5,9 @@ POST /project/{uuid}/close 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 +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 index b5d0c2d9..2fe9c38f 100644 --- a/docs/api/examples/post_projectuuidcommit.txt +++ b/docs/api/examples/post_projectuuidcommit.txt @@ -5,9 +5,9 @@ POST /project/{uuid}/commit 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 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /project/{uuid}/commit diff --git a/docs/api/examples/post_version.txt b/docs/api/examples/post_version.txt index 45ef1069..1d4ecc7d 100644 --- a/docs/api/examples/post_version.txt +++ b/docs/api/examples/post_version.txt @@ -7,11 +7,11 @@ 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 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /version { diff --git a/docs/api/examples/post_virtualbox.txt b/docs/api/examples/post_virtualbox.txt index 25c025f8..62e5fe4e 100644 --- a/docs/api/examples/post_virtualbox.txt +++ b/docs/api/examples/post_virtualbox.txt @@ -10,11 +10,11 @@ POST /virtualbox HTTP/1.1 HTTP/1.1 201 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 342 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /virtualbox { @@ -26,6 +26,6 @@ X-ROUTE: /virtualbox "headless": false, "name": "VM1", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "33217631-7c24-4acf-b462-c40e0012537a", + "uuid": "7ba9ddf4-0a6a-48a0-8483-3450a9f305df", "vmname": "VM1" } diff --git a/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt b/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt new file mode 100644 index 00000000..f3caae78 --- /dev/null +++ b/docs/api/examples/post_virtualboxuuidadaptersadapteriddnio.txt @@ -0,0 +1,25 @@ +curl -i -X POST 'http://localhost:8000/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' + +POST /virtualbox/{uuid}/adapters/{adapter_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}/adapters/{adapter_id:\d+}/nio + +{ + "lport": 4242, + "rhost": "127.0.0.1", + "rport": 4343, + "type": "nio_udp" +} diff --git a/docs/api/examples/post_vpcs.txt b/docs/api/examples/post_vpcs.txt index 75186c33..054660c9 100644 --- a/docs/api/examples/post_vpcs.txt +++ b/docs/api/examples/post_vpcs.txt @@ -8,11 +8,11 @@ POST /vpcs HTTP/1.1 HTTP/1.1 201 -CONNECTION: close +CONNECTION: keep-alive CONTENT-LENGTH: 213 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /vpcs { @@ -21,5 +21,5 @@ X-ROUTE: /vpcs "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "b0ed8aae-4d50-4a0c-9d91-0875a5aca533" + "uuid": "896e7bbd-936c-4a6f-9268-c89f8eb91f5e" } diff --git a/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt b/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt new file mode 100644 index 00000000..b3bbb41f --- /dev/null +++ b/docs/api/examples/post_vpcsuuidportsportnumberdnio.txt @@ -0,0 +1,25 @@ +curl -i -X POST 'http://localhost:8000/vpcs/{uuid}/ports/{port_number:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' + +POST /vpcs/{uuid}/ports/{port_number:\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_number:\d+}/nio + +{ + "lport": 4242, + "rhost": "127.0.0.1", + "rport": 4343, + "type": "nio_udp" +} diff --git a/docs/api/examples/put_projectuuid.txt b/docs/api/examples/put_projectuuid.txt index d629a7c1..91147567 100644 --- a/docs/api/examples/put_projectuuid.txt +++ b/docs/api/examples/put_projectuuid.txt @@ -7,15 +7,15 @@ PUT /project/{uuid} HTTP/1.1 HTTP/1.1 200 -CONNECTION: close -CONTENT-LENGTH: 114 +CONNECTION: keep-alive +CONTENT-LENGTH: 158 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 aiohttp/0.13.1 +SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /project/{uuid} { - "location": "/tmp/tmpi95b_dec", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmphb8dmyls", "temporary": false, - "uuid": "e30bf585-b257-4e14-8f7f-a5e0bdd126dd" + "uuid": "1aa054dd-e672-4961-90c3-fef730fc6301" } diff --git a/docs/api/portsudp.rst b/docs/api/portsudp.rst new file mode 100644 index 00000000..a2ecdae7 --- /dev/null +++ b/docs/api/portsudp.rst @@ -0,0 +1,19 @@ +/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/project.rst b/docs/api/project.rst index 15a2aa08..8edefbbe 100644 --- a/docs/api/project.rst +++ b/docs/api/project.rst @@ -19,7 +19,7 @@ Input
Name | Mandatory | Type | Description |
---|---|---|---|
capture_filename | ✔ | string | Capture file name |