mirror of https://github.com/GNS3/gns3-server
parent
e6eab1fb25
commit
b3f2a6ac2a
@ -1,40 +1,34 @@
|
||||
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"ethernet_adapters": 0, "initial_config_content": "hostname test", "iourc_content": "test", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-4450/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4, "use_default_iou_values": true}'
|
||||
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"initial_config_content": "hostname test", "name": "PC TEST 1", "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-25/test_iou_create_initial_config0/iou.bin", "vm_id": "aaf267e2-745e-40b3-bce7-3e80f5230899"}'
|
||||
|
||||
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms HTTP/1.1
|
||||
{
|
||||
"ethernet_adapters": 0,
|
||||
"initial_config_content": "hostname test",
|
||||
"iourc_content": "test",
|
||||
"l1_keepalives": true,
|
||||
"name": "PC TEST 1",
|
||||
"nvram": 512,
|
||||
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-4450/test_iou_create_with_params0/iou.bin",
|
||||
"ram": 1024,
|
||||
"serial_adapters": 4,
|
||||
"use_default_iou_values": true
|
||||
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-25/test_iou_create_initial_config0/iou.bin",
|
||||
"vm_id": "aaf267e2-745e-40b3-bce7-3e80f5230899"
|
||||
}
|
||||
|
||||
|
||||
HTTP/1.1 201
|
||||
CONNECTION: keep-alive
|
||||
CONTENT-LENGTH: 466
|
||||
CONTENT-LENGTH: 501
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 GNS3/1.3.1.rc2
|
||||
SERVER: Python/3.4 GNS3/1.4.0.dev1
|
||||
X-ROUTE: /v1/projects/{project_id}/iou/vms
|
||||
|
||||
{
|
||||
"console": 2000,
|
||||
"ethernet_adapters": 0,
|
||||
"ethernet_adapters": 2,
|
||||
"initial_config": "initial-config.cfg",
|
||||
"iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmps796q8lx/iourc",
|
||||
"l1_keepalives": true,
|
||||
"iourc_path": null,
|
||||
"l1_keepalives": false,
|
||||
"name": "PC TEST 1",
|
||||
"nvram": 512,
|
||||
"path": "iou.bin",
|
||||
"nvram": 128,
|
||||
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-25/test_iou_create_initial_config0/iou.bin",
|
||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||
"ram": 1024,
|
||||
"serial_adapters": 4,
|
||||
"ram": 256,
|
||||
"serial_adapters": 2,
|
||||
"use_default_iou_values": true,
|
||||
"vm_id": "69f5842a-d4e5-45fe-a500-1010c72f1748"
|
||||
"vm_id": "aaf267e2-745e-40b3-bce7-3e80f5230899"
|
||||
}
|
||||
|
@ -1,21 +1,21 @@
|
||||
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e791569e-7f95-4a1d-9f8d-b48611afeef3/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
|
||||
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d378a8bd-711d-47b1-aaa0-dfa0c3ff420b/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
|
||||
|
||||
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e791569e-7f95-4a1d-9f8d-b48611afeef3/adapters/1/ports/0/nio HTTP/1.1
|
||||
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d378a8bd-711d-47b1-aaa0-dfa0c3ff420b/adapters/1/ports/0/nio HTTP/1.1
|
||||
{
|
||||
"ethernet_device": "eth0",
|
||||
"type": "nio_generic_ethernet"
|
||||
}
|
||||
|
||||
|
||||
HTTP/1.1 201
|
||||
HTTP/1.1 409
|
||||
CONNECTION: keep-alive
|
||||
CONTENT-LENGTH: 69
|
||||
CONTENT-LENGTH: 89
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 GNS3/1.3.1.rc2
|
||||
SERVER: Python/3.4 GNS3/1.4.0.dev1
|
||||
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
|
||||
|
||||
{
|
||||
"ethernet_device": "eth0",
|
||||
"type": "nio_generic_ethernet"
|
||||
"message": "NIO of type nio_generic_ethernet is not supported",
|
||||
"status": 409
|
||||
}
|
||||
|
@ -1,19 +1,19 @@
|
||||
curl -i -X POST 'http://localhost:8000/v1/version' -d '{"version": "1.3.1.rc2"}'
|
||||
curl -i -X POST 'http://localhost:8000/v1/version' -d '{"version": "1.4.0.dev1"}'
|
||||
|
||||
POST /v1/version HTTP/1.1
|
||||
{
|
||||
"version": "1.3.1.rc2"
|
||||
"version": "1.4.0.dev1"
|
||||
}
|
||||
|
||||
|
||||
HTTP/1.1 200
|
||||
CONNECTION: keep-alive
|
||||
CONTENT-LENGTH: 30
|
||||
CONTENT-LENGTH: 31
|
||||
CONTENT-TYPE: application/json
|
||||
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
||||
SERVER: Python/3.4 GNS3/1.3.1.rc2
|
||||
SERVER: Python/3.4 GNS3/1.4.0.dev1
|
||||
X-ROUTE: /v1/version
|
||||
|
||||
{
|
||||
"version": "1.3.1.rc2"
|
||||
"version": "1.4.0.dev1"
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
/v1/dynamips/vms
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/dynamips/vms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Retrieve the list of Dynamips VMS
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: List of Dynamips VM retrieved
|
||||
|
@ -0,0 +1,8 @@
|
||||
File
|
||||
---------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
file/*
|
@ -0,0 +1,24 @@
|
||||
/v1/files/stream
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/files/stream
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Stream a file from the server
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: File retrieved
|
||||
- **409**: Can't access to file
|
||||
- **404**: File doesn't exist
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>location</td> <td>✔</td> <td>['string']</td> <td>File path</td> </tr>
|
||||
</table>
|
||||
|
@ -0,0 +1,13 @@
|
||||
/v1/iou/vms
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/iou/vms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Retrieve the list of IOU VMS
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: List of IOU VM retrieved
|
||||
|
@ -0,0 +1,13 @@
|
||||
/v1/qemu/vms
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/qemu/vms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Retrieve the list of Qemu images
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: List of Qemu images retrieved
|
||||
|
@ -0,0 +1,8 @@
|
||||
Vmware
|
||||
---------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 2
|
||||
|
||||
vmware/*
|
@ -0,0 +1,49 @@
|
||||
/v1/projects/{project_id}/vmware/vms
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
POST /v1/projects/**{project_id}**/vmware/vms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create a new VMware VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **201**: Instance created
|
||||
- **409**: Conflict
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
|
||||
<tr><td>enable_remote_console</td> <td> </td> <td>boolean</td> <td>enable the remote console</td> </tr>
|
||||
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
|
||||
<tr><td>linked_clone</td> <td>✔</td> <td>boolean</td> <td>either the VM is a linked clone or not</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VMware VM instance name</td> </tr>
|
||||
<tr><td>vm_id</td> <td> </td> <td>string</td> <td>VMware VM instance identifier</td> </tr>
|
||||
<tr><td>vmx_path</td> <td>✔</td> <td>string</td> <td>path to the vmx file</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
|
||||
<tr><td>enable_remote_console</td> <td> </td> <td>boolean</td> <td>enable the remote console</td> </tr>
|
||||
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VMware VM instance name</td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>vm_id</td> <td>✔</td> <td>string</td> <td>VMware VM instance UUID</td> </tr>
|
||||
<tr><td>vmx_path</td> <td> </td> <td>string</td> <td>path to the vmx file</td> </tr>
|
||||
</table>
|
||||
|
@ -0,0 +1,96 @@
|
||||
/v1/projects/{project_id}/vmware/vms/{vm_id}
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
.. contents::
|
||||
|
||||
GET /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Get a VMware VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vm_id**: UUID for the instance
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Success
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
|
||||
<tr><td>enable_remote_console</td> <td> </td> <td>boolean</td> <td>enable the remote console</td> </tr>
|
||||
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VMware VM instance name</td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>vm_id</td> <td>✔</td> <td>string</td> <td>VMware VM instance UUID</td> </tr>
|
||||
<tr><td>vmx_path</td> <td> </td> <td>string</td> <td>path to the vmx file</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
PUT /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Update a VMware VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vm_id**: UUID for the instance
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **200**: Instance updated
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **409**: Conflict
|
||||
|
||||
Input
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
|
||||
<tr><td>enable_remote_console</td> <td> </td> <td>boolean</td> <td>enable the remote console</td> </tr>
|
||||
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
|
||||
<tr><td>name</td> <td> </td> <td>string</td> <td>VMware VM instance name</td> </tr>
|
||||
<tr><td>vmx_path</td> <td> </td> <td>string</td> <td>path to the vmx file</td> </tr>
|
||||
</table>
|
||||
|
||||
Output
|
||||
*******
|
||||
.. raw:: html
|
||||
|
||||
<table>
|
||||
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
|
||||
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
|
||||
<tr><td>enable_remote_console</td> <td> </td> <td>boolean</td> <td>enable the remote console</td> </tr>
|
||||
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
|
||||
<tr><td>name</td> <td>✔</td> <td>string</td> <td>VMware VM instance name</td> </tr>
|
||||
<tr><td>project_id</td> <td>✔</td> <td>string</td> <td>Project UUID</td> </tr>
|
||||
<tr><td>vm_id</td> <td>✔</td> <td>string</td> <td>VMware VM instance UUID</td> </tr>
|
||||
<tr><td>vmx_path</td> <td> </td> <td>string</td> <td>path to the vmx file</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
DELETE /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Delete a VMware VM instance
|
||||
|
||||
Parameters
|
||||
**********
|
||||
- **vm_id**: UUID for the instance
|
||||
- **project_id**: UUID for the project
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
- **400**: Invalid request
|
||||
- **404**: Instance doesn't exist
|
||||
- **204**: Instance deleted
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue