mirror of https://github.com/GNS3/gns3-server
parent
f572f3fc95
commit
a12f753136
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
@ -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"
|
||||
}
|
@ -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"
|
||||
}
|
@ -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
|
||||
|
@ -0,0 +1,48 @@
|
||||
/virtualbox/{uuid}/adapters/{adapter_id:\d+}/nio
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Add a NIO to a VirtualBox VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **adapter_id**: Adapter where the nio should be added
|
||||
- **uuid**: Instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid instance UUID
|
||||
- **201**: NIO created
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/post_virtualboxuuidadaptersadapteriddnio.txt
|
||||
|
||||
|
||||
DELETE /virtualbox/**{uuid}**/adapters/**{adapter_id:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Remove a NIO from a VirtualBox VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **adapter_id**: Adapter from where the nio should be removed
|
||||
- **uuid**: Instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid instance UUID
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: NIO deleted
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/delete_virtualboxuuidadaptersadapteriddnio.txt
|
||||
|
@ -0,0 +1,29 @@
|
||||
/virtualbox/{uuid}/capture/{adapter_id:\d+}/start
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /virtualbox/**{uuid}**/capture/**{adapter_id:\d+}**/start
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Start a packet capture on a VirtualBox VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **adapter_id**: Adapter to start a packet capture
|
||||
- **uuid**: Instance UUID
|
||||
|
||||
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>
|
||||
|
@ -0,0 +1,20 @@
|
||||
/virtualbox/{uuid}/capture/{adapter_id:\d+}/stop
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /virtualbox/**{uuid}**/capture/**{adapter_id:\d+}**/stop
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Stop a packet capture on a VirtualBox VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **adapter_id**: Adapter to stop a packet capture
|
||||
- **uuid**: Instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid instance UUID
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Capture stopped
|
||||
|
@ -0,0 +1,48 @@
|
||||
/vpcs/{uuid}/ports/{port_number:\d+}/nio
|
||||
---------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Add a NIO to a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **port_number**: Port where the nio should be added
|
||||
- **uuid**: Instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid instance UUID
|
||||
- **201**: NIO created
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/post_vpcsuuidportsportnumberdnio.txt
|
||||
|
||||
|
||||
DELETE /vpcs/**{uuid}**/ports/**{port_number:\d+}**/nio
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Remove a NIO from a VPCS instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **port_number**: Port from where the nio should be removed
|
||||
- **uuid**: Instance UUID
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid instance UUID
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: NIO deleted
|
||||
|
||||
Sample session
|
||||
***************
|
||||
|
||||
|
||||
.. literalinclude:: examples/delete_vpcsuuidportsportnumberdnio.txt
|
||||
|
Loading…
Reference in new issue