mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-30 20:28:08 +00:00
Doc API V1
This commit is contained in:
parent
08158884a4
commit
ca354ae7f2
13
docs/api/examples/delete_projectsprojectid.txt
Normal file
13
docs/api/examples/delete_projectsprojectid.txt
Normal file
@ -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}
|
||||||
|
|
@ -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}
|
|
||||||
|
|
@ -5,9 +5,9 @@ DELETE /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 204
|
HTTP/1.1 204
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 0
|
CONTENT-LENGTH: 0
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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}/adapters/{adapter_id:\d+}/nio
|
X-ROUTE: /v1/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio
|
||||||
|
|
||||||
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
||||||
{}
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -5,9 +5,9 @@ DELETE /vpcs/{uuid}/ports/{port_number:\d+}/nio HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 204
|
HTTP/1.1 204
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 0
|
CONTENT-LENGTH: 0
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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}/ports/{port_number:\d+}/nio
|
X-ROUTE: /v1/vpcs/{uuid}/ports/{port_number:\d+}/nio
|
||||||
|
|
||||||
|
@ -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
|
|
||||||
|
|
||||||
{}
|
|
@ -5,32 +5,56 @@ GET /interfaces HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 298
|
CONTENT-LENGTH: 652
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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
|
X-ROUTE: /v1/interfaces
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": "lo",
|
"id": "lo0",
|
||||||
"name": "lo"
|
"name": "lo0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "eth0",
|
"id": "gif0",
|
||||||
"name": "eth0"
|
"name": "gif0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "wlan0",
|
"id": "stf0",
|
||||||
"name": "wlan0"
|
"name": "stf0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "vmnet1",
|
"id": "en0",
|
||||||
"name": "vmnet1"
|
"name": "en0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "vmnet8",
|
"id": "en1",
|
||||||
"name": "vmnet8"
|
"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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
19
docs/api/examples/get_projectsprojectid.txt
Normal file
19
docs/api/examples/get_projectsprojectid.txt
Normal file
@ -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
|
||||||
|
}
|
@ -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"
|
|
||||||
}
|
|
@ -5,12 +5,12 @@ GET /version HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 29
|
CONTENT-LENGTH: 29
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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
|
X-ROUTE: /v1/version
|
||||||
|
|
||||||
{
|
{
|
||||||
"version": "1.3.dev1"
|
"version": "1.3.dev1"
|
||||||
|
@ -5,12 +5,12 @@ GET /virtualbox/{uuid} HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 346
|
CONTENT-LENGTH: 346
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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}
|
X-ROUTE: /v1/virtualbox/{uuid}
|
||||||
|
|
||||||
{
|
{
|
||||||
"adapter_start_index": 0,
|
"adapter_start_index": 0,
|
||||||
@ -21,6 +21,6 @@ X-ROUTE: /virtualbox/{uuid}
|
|||||||
"headless": false,
|
"headless": false,
|
||||||
"name": "VMTEST",
|
"name": "VMTEST",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"uuid": "f246f72b-9f79-4a60-a8fb-0b2375d29d28",
|
"uuid": "aa7a7c1e-6fc2-43b8-b53b-60e605565625",
|
||||||
"vmname": "VMTEST"
|
"vmname": "VMTEST"
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,12 @@ GET /vpcs/{uuid} HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 211
|
CONTENT-LENGTH: 211
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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}
|
X-ROUTE: /v1/vpcs/{uuid}
|
||||||
|
|
||||||
{
|
{
|
||||||
"console": 2003,
|
"console": 2003,
|
||||||
@ -18,5 +18,5 @@ X-ROUTE: /vpcs/{uuid}
|
|||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"script_file": null,
|
"script_file": null,
|
||||||
"startup_script": null,
|
"startup_script": null,
|
||||||
"uuid": "0300d8a7-e971-4402-bd85-8c12384d308d"
|
"uuid": "c505f88b-7fe1-4985-9aca-a3798f6659ab"
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,12 @@ POST /ports/udp HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 201
|
HTTP/1.1 201
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 25
|
CONTENT-LENGTH: 25
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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: /ports/udp
|
X-ROUTE: /v1/ports/udp
|
||||||
|
|
||||||
{
|
{
|
||||||
"udp_port": 10000
|
"udp_port": 10000
|
||||||
|
@ -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"
|
|
||||||
}
|
|
13
docs/api/examples/post_projectsprojectidclose.txt
Normal file
13
docs/api/examples/post_projectsprojectidclose.txt
Normal file
@ -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
|
||||||
|
|
13
docs/api/examples/post_projectsprojectidcommit.txt
Normal file
13
docs/api/examples/post_projectsprojectidcommit.txt
Normal file
@ -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
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
}
|
|
@ -7,12 +7,12 @@ POST /version HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 29
|
CONTENT-LENGTH: 29
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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
|
X-ROUTE: /v1/version
|
||||||
|
|
||||||
{
|
{
|
||||||
"version": "1.3.dev1"
|
"version": "1.3.dev1"
|
||||||
|
@ -10,12 +10,12 @@ POST /virtualbox HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 201
|
HTTP/1.1 201
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 340
|
CONTENT-LENGTH: 340
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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
|
X-ROUTE: /v1/virtualbox
|
||||||
|
|
||||||
{
|
{
|
||||||
"adapter_start_index": 0,
|
"adapter_start_index": 0,
|
||||||
@ -26,6 +26,6 @@ X-ROUTE: /virtualbox
|
|||||||
"headless": false,
|
"headless": false,
|
||||||
"name": "VM1",
|
"name": "VM1",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"uuid": "210fbbba-4025-4286-81dc-1f07cc494cc9",
|
"uuid": "267f3908-f3dd-4cac-bca3-2e31a1018493",
|
||||||
"vmname": "VM1"
|
"vmname": "VM1"
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,12 @@ POST /virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 201
|
HTTP/1.1 201
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 89
|
CONTENT-LENGTH: 89
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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}/adapters/{adapter_id:\d+}/nio
|
X-ROUTE: /v1/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio
|
||||||
|
|
||||||
{
|
{
|
||||||
"lport": 4242,
|
"lport": 4242,
|
||||||
|
@ -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"
|
|
||||||
}
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -8,12 +8,12 @@ POST /vpcs HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 201
|
HTTP/1.1 201
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 211
|
CONTENT-LENGTH: 211
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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
|
X-ROUTE: /v1/vpcs
|
||||||
|
|
||||||
{
|
{
|
||||||
"console": 2001,
|
"console": 2001,
|
||||||
@ -21,5 +21,5 @@ X-ROUTE: /vpcs
|
|||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"script_file": null,
|
"script_file": null,
|
||||||
"startup_script": null,
|
"startup_script": null,
|
||||||
"uuid": "92ff89ed-aed2-487c-b893-5559ca258d0f"
|
"uuid": "d7a9ef38-2863-4cf2-97ce-dcf8416a93ae"
|
||||||
}
|
}
|
||||||
|
@ -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"
|
|
||||||
}
|
|
@ -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"
|
|
||||||
}
|
|
@ -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"
|
|
||||||
}
|
|
@ -10,12 +10,12 @@ POST /vpcs/{uuid}/ports/{port_number:\d+}/nio HTTP/1.1
|
|||||||
|
|
||||||
|
|
||||||
HTTP/1.1 201
|
HTTP/1.1 201
|
||||||
CONNECTION: close
|
CONNECTION: keep-alive
|
||||||
CONTENT-LENGTH: 89
|
CONTENT-LENGTH: 89
|
||||||
CONTENT-TYPE: application/json
|
CONTENT-TYPE: application/json
|
||||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
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}/ports/{port_number:\d+}/nio
|
X-ROUTE: /v1/vpcs/{uuid}/ports/{port_number:\d+}/nio
|
||||||
|
|
||||||
{
|
{
|
||||||
"lport": 4242,
|
"lport": 4242,
|
||||||
|
@ -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
|
|
||||||
}
|
|
@ -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"
|
|
||||||
}
|
|
21
docs/api/examples/put_projectsprojectid.txt
Normal file
21
docs/api/examples/put_projectsprojectid.txt
Normal file
@ -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
|
||||||
|
}
|
@ -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"
|
|
||||||
}
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
13
docs/api/v1interfaces.rst
Normal file
13
docs/api/v1interfaces.rst
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/v1/interfaces
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
GET /v1/interfaces
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
List all the network interfaces available on the server
|
||||||
|
|
||||||
|
Response status codes
|
||||||
|
**********************
|
||||||
|
- **200**: OK
|
||||||
|
|
13
docs/api/v1portsudp.rst
Normal file
13
docs/api/v1portsudp.rst
Normal file
@ -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
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
/project
|
/v1/projects
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /project
|
POST /v1/projects
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Create a project on the server
|
Create a new project on the server
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
@ -18,8 +18,8 @@ Input
|
|||||||
<table>
|
<table>
|
||||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||||
<tr><td>location</td> <td> </td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
<tr><td>location</td> <td> </td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||||
|
<tr><td>project_id</td> <td> </td> <td>['string', 'null']</td> <td>Project UUID</td> </tr>
|
||||||
<tr><td>temporary</td> <td> </td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
<tr><td>temporary</td> <td> </td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||||
<tr><td>uuid</td> <td> </td> <td>['string', 'null']</td> <td>Project UUID</td> </tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Output
|
Output
|
||||||
@ -29,13 +29,7 @@ Output
|
|||||||
<table>
|
<table>
|
||||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||||
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||||
|
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||||
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
|
||||||
.. literalinclude:: examples/post_project.txt
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
|||||||
/project/{uuid}
|
/v1/projects/{project_id}
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
GET /project/**{uuid}**
|
GET /v1/projects/**{project_id}**
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Get project information
|
Get project information
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **uuid**: Project instance UUID
|
- **project_id**: The UUID of the project
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
- **200**: OK
|
- **200**: Success
|
||||||
- **404**: Project instance doesn't exist
|
- **404**: The project doesn't exist
|
||||||
|
|
||||||
Output
|
Output
|
||||||
*******
|
*******
|
||||||
@ -23,29 +23,23 @@ Output
|
|||||||
<table>
|
<table>
|
||||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||||
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||||
|
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||||
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
PUT /v1/projects/**{project_id}**
|
||||||
.. literalinclude:: examples/get_projectuuid.txt
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
PUT /project/**{uuid}**
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Update a project
|
Update a project
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **uuid**: Project instance UUID
|
- **project_id**: The UUID of the project
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
- **200**: Project updated
|
- **200**: The project has been updated
|
||||||
- **404**: Project instance doesn't exist
|
- **404**: The project doesn't exist
|
||||||
|
|
||||||
Input
|
Input
|
||||||
*******
|
*******
|
||||||
@ -63,33 +57,21 @@ Output
|
|||||||
<table>
|
<table>
|
||||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||||
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
<tr><td>location</td> <td>✔</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
|
||||||
|
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||||
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
<tr><td>temporary</td> <td>✔</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
|
||||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
DELETE /v1/projects/**{project_id}**
|
||||||
.. literalinclude:: examples/put_projectuuid.txt
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
DELETE /project/**{uuid}**
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Delete a project from disk
|
Delete a project from disk
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **uuid**: Project instance UUID
|
- **project_id**: The UUID of the project
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
- **404**: Project instance doesn't exist
|
- **404**: The project doesn't exist
|
||||||
- **204**: Changes write on disk
|
- **204**: Changes have been written on disk
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
|
||||||
.. literalinclude:: examples/delete_projectuuid.txt
|
|
||||||
|
|
18
docs/api/v1projectsprojectidclose.rst
Normal file
18
docs/api/v1projectsprojectidclose.rst
Normal file
@ -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
|
||||||
|
|
18
docs/api/v1projectsprojectidcommit.rst
Normal file
18
docs/api/v1projectsprojectidcommit.rst
Normal file
@ -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
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/version
|
/v1/version
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
GET /version
|
GET /v1/version
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Retrieve the server version number
|
Retrieve the server version number
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
@ -20,15 +20,9 @@ Output
|
|||||||
<tr><td>version</td> <td>✔</td> <td>string</td> <td>Version number human readable</td> </tr>
|
<tr><td>version</td> <td>✔</td> <td>string</td> <td>Version number human readable</td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
POST /v1/version
|
||||||
.. literalinclude:: examples/get_version.txt
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
POST /version
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Check if version is the same as the server
|
Check if version is the same as the server
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
@ -54,9 +48,3 @@ Output
|
|||||||
<tr><td>version</td> <td>✔</td> <td>string</td> <td>Version number human readable</td> </tr>
|
<tr><td>version</td> <td>✔</td> <td>string</td> <td>Version number human readable</td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
|
||||||
.. literalinclude:: examples/post_version.txt
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox
|
/v1/virtualbox
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /virtualbox
|
POST /v1/virtualbox
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Create a new VirtualBox VM instance
|
Create a new VirtualBox VM instance
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
@ -51,9 +51,3 @@ Output
|
|||||||
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
|
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
|
||||||
.. literalinclude:: examples/post_virtualbox.txt
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox/{uuid}
|
/v1/virtualbox/{uuid}
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
GET /virtualbox/**{uuid}**
|
GET /v1/virtualbox/**{uuid}**
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Get a VirtualBox VM instance
|
Get a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -34,15 +34,9 @@ Output
|
|||||||
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
|
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
PUT /v1/virtualbox/**{uuid}**
|
||||||
.. literalinclude:: examples/get_virtualboxuuid.txt
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
PUT /virtualbox/**{uuid}**
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Update a VirtualBox VM instance
|
Update a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -90,8 +84,8 @@ Output
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
DELETE /virtualbox/**{uuid}**
|
DELETE /v1/virtualbox/**{uuid}**
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Delete a VirtualBox VM instance
|
Delete a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio
|
/v1/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. 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
|
Add a NIO to a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -18,15 +18,9 @@ Response status codes
|
|||||||
- **201**: NIO created
|
- **201**: NIO created
|
||||||
- **404**: Instance doesn't exist
|
- **404**: Instance doesn't exist
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
DELETE /v1/virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio
|
||||||
.. literalinclude:: examples/post_virtualboxuuidadaptersadapteriddnio.txt
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
DELETE /virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Remove a NIO from a VirtualBox VM instance
|
Remove a NIO from a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -40,9 +34,3 @@ Response status codes
|
|||||||
- **404**: Instance doesn't exist
|
- **404**: Instance doesn't exist
|
||||||
- **204**: NIO deleted
|
- **204**: NIO deleted
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
|
||||||
.. literalinclude:: examples/delete_virtualboxuuidadaptersadapteriddnio.txt
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox/{uuid}/capture/{adapter_id:\d+}/start
|
/v1/virtualbox/{uuid}/capture/{adapter_id:\d+}/start
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. 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
|
Start a packet capture on a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox/{uuid}/capture/{adapter_id:\d+}/stop
|
/v1/virtualbox/{uuid}/capture/{adapter_id:\d+}/stop
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. 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
|
Stop a packet capture on a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox/{uuid}/reload
|
/v1/virtualbox/{uuid}/reload
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /virtualbox/**{uuid}**/reload
|
POST /v1/virtualbox/**{uuid}**/reload
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Reload a VirtualBox VM instance
|
Reload a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox/{uuid}/resume
|
/v1/virtualbox/{uuid}/resume
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /virtualbox/**{uuid}**/resume
|
POST /v1/virtualbox/**{uuid}**/resume
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Resume a suspended VirtualBox VM instance
|
Resume a suspended VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
19
docs/api/v1virtualboxuuidstart.rst
Normal file
19
docs/api/v1virtualboxuuidstart.rst
Normal file
@ -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
|
||||||
|
|
19
docs/api/v1virtualboxuuidstop.rst
Normal file
19
docs/api/v1virtualboxuuidstop.rst
Normal file
@ -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
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/virtualbox/{uuid}/suspend
|
/v1/virtualbox/{uuid}/suspend
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /virtualbox/**{uuid}**/suspend
|
POST /v1/virtualbox/**{uuid}**/suspend
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Suspend a VirtualBox VM instance
|
Suspend a VirtualBox VM instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
13
docs/api/v1virtualboxvms.rst
Normal file
13
docs/api/v1virtualboxvms.rst
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/v1/virtualbox/vms
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
GET /v1/virtualbox/vms
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Get all VirtualBox VMs available
|
||||||
|
|
||||||
|
Response status codes
|
||||||
|
**********************
|
||||||
|
- **200**: Success
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/vpcs
|
/v1/vpcs
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /vpcs
|
POST /v1/vpcs
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Create a new VPCS instance
|
Create a new VPCS instance
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
@ -41,9 +41,3 @@ Output
|
|||||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>VPCS device UUID</td> </tr>
|
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>VPCS device UUID</td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
|
||||||
.. literalinclude:: examples/post_vpcs.txt
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/vpcs/{uuid}
|
/v1/vpcs/{uuid}
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
GET /vpcs/**{uuid}**
|
GET /v1/vpcs/**{uuid}**
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Get a VPCS instance
|
Get a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -30,15 +30,9 @@ Output
|
|||||||
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>VPCS device UUID</td> </tr>
|
<tr><td>uuid</td> <td>✔</td> <td>string</td> <td>VPCS device UUID</td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
PUT /v1/vpcs/**{uuid}**
|
||||||
.. literalinclude:: examples/get_vpcsuuid.txt
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
PUT /vpcs/**{uuid}**
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Update a VPCS instance
|
Update a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -77,8 +71,8 @@ Output
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
DELETE /vpcs/**{uuid}**
|
DELETE /v1/vpcs/**{uuid}**
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Delete a VPCS instance
|
Delete a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,10 +1,10 @@
|
|||||||
/vpcs/{uuid}/ports/{port_number:\d+}/nio
|
/v1/vpcs/{uuid}/ports/{port_number:\d+}/nio
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. 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
|
Add a NIO to a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -18,15 +18,9 @@ Response status codes
|
|||||||
- **201**: NIO created
|
- **201**: NIO created
|
||||||
- **404**: Instance doesn't exist
|
- **404**: Instance doesn't exist
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
DELETE /v1/vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio
|
||||||
.. literalinclude:: examples/post_vpcsuuidportsportnumberdnio.txt
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
DELETE /vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Remove a NIO from a VPCS instance
|
Remove a NIO from a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -40,9 +34,3 @@ Response status codes
|
|||||||
- **404**: Instance doesn't exist
|
- **404**: Instance doesn't exist
|
||||||
- **204**: NIO deleted
|
- **204**: NIO deleted
|
||||||
|
|
||||||
Sample session
|
|
||||||
***************
|
|
||||||
|
|
||||||
|
|
||||||
.. literalinclude:: examples/delete_vpcsuuidportsportnumberdnio.txt
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
/vpcs/{uuid}/reload
|
/v1/vpcs/{uuid}/reload
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /vpcs/**{uuid}**/reload
|
POST /v1/vpcs/**{uuid}**/reload
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Reload a VPCS instance
|
Reload a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,10 +1,10 @@
|
|||||||
/vpcs/{uuid}/start
|
/v1/vpcs/{uuid}/start
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /vpcs/**{uuid}**/start
|
POST /v1/vpcs/**{uuid}**/start
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Start a VPCS instance
|
Start a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,10 +1,10 @@
|
|||||||
/vpcs/{uuid}/stop
|
/v1/vpcs/{uuid}/stop
|
||||||
---------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
POST /vpcs/**{uuid}**/stop
|
POST /v1/vpcs/**{uuid}**/stop
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Stop a VPCS instance
|
Stop a VPCS instance
|
||||||
|
|
||||||
Parameters
|
Parameters
|
@ -1,13 +0,0 @@
|
|||||||
/virtualbox/list
|
|
||||||
---------------------------------------------
|
|
||||||
|
|
||||||
.. contents::
|
|
||||||
|
|
||||||
GET /virtualbox/list
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Get all VirtualBox VMs available
|
|
||||||
|
|
||||||
Response status codes
|
|
||||||
**********************
|
|
||||||
- **200**: Success
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
|
||||||
<tr><td>capture_filename</td> <td>✔</td> <td>string</td> <td>Capture file name</td> </tr>
|
|
||||||
</table>
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
/virtualbox/vms
|
|
||||||
---------------------------------------------
|
|
||||||
|
|
||||||
.. contents::
|
|
||||||
|
|
||||||
GET /virtualbox/vms
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Get all VirtualBox VMs available
|
|
||||||
|
|
||||||
Response status codes
|
|
||||||
**********************
|
|
||||||
- **200**: Success
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -34,11 +34,11 @@ class Documentation(object):
|
|||||||
filename = self._file_path(path)
|
filename = self._file_path(path)
|
||||||
handler_doc = self._documentation[path]
|
handler_doc = self._documentation[path]
|
||||||
with open("docs/api/{}.rst".format(filename), 'w+') as f:
|
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')
|
f.write('.. contents::\n')
|
||||||
for method in handler_doc["methods"]:
|
for method in handler_doc["methods"]:
|
||||||
f.write('\n{} {}\n'.format(method["method"], path.replace("{", '**{').replace("}", "}**")))
|
f.write('\n{} {}\n'.format(method["method"], path.replace("{", '**{').replace("}", "}**")))
|
||||||
f.write('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n')
|
f.write('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n')
|
||||||
f.write('{}\n\n'.format(method["description"]))
|
f.write('{}\n\n'.format(method["description"]))
|
||||||
|
|
||||||
if len(method["parameters"]) > 0:
|
if len(method["parameters"]) > 0:
|
||||||
|
@ -25,6 +25,9 @@ echo "WARNING: This script should be run at the root directory of the project"
|
|||||||
|
|
||||||
export PYTEST_BUILD_DOCUMENTATION=1
|
export PYTEST_BUILD_DOCUMENTATION=1
|
||||||
|
|
||||||
|
rm -Rf docs/api/
|
||||||
|
mkdir -p docs/api/examples
|
||||||
|
|
||||||
py.test -v
|
py.test -v
|
||||||
python3 gns3server/web/documentation.py
|
python3 gns3server/web/documentation.py
|
||||||
cd docs
|
cd docs
|
||||||
|
Loading…
Reference in New Issue
Block a user