1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-02-13 08:31:59 +00:00

Merge branch 'unstable' into listen_notification

Conflicts:
	gns3server/modules/iou/iou_vm.py
	gns3server/modules/qemu/qemu_vm.py
	gns3server/utils/asyncio.py
This commit is contained in:
Jeremy 2015-04-29 16:07:19 -06:00
commit 3b3ddeb435
200 changed files with 2468 additions and 1145 deletions

View File

@ -29,4 +29,4 @@ notifications:
# on_failure: always
after_success:
- coveralls
- coveralls --data_file .coverage --base_dir gns3server

View File

@ -1,5 +1,62 @@
# Change Log
## 1.3.1 11/04/2015
* Release
## 1.3.1rc4 09/04/2015
* Initial config file content can be empty (fix export issues)
* Fix crash if IOU initial config is emtpy
* Return more informations about bad requests for crash reports
* Allow less strict dependencies for easier install
* Missing project name in documentation
* Some spring cleaning
## 1.3.1rc3 07/04/2015
* Fix missing IOU documentation
* Add missing project name in curl documentation
* Look in old IOU images location in order to smooth transition
## 1.3.1rc2 06/04/2015
* Do not overwrite initial-config IOU if client send an empty
* Fix documentation about /ports/udp
## 1.3.1rc1 05/04/2015
* Fix issues with macos X dynamips not freeing UDP port
* Fix encoding error when saving dynamips configuration
* The upload web page return a 200 in case of error (IE compatibility)
* Do not crash if dynamips config contain non ascii chars
* Test path with chinese charcaters in Qemu
* Do not crash if no console port is available for VBox
* Raise a DynamipsError if we can't access to VM status
* Check name of the VBoxManage executable
* Exclude docs and tests package from distribution
* Catch error when qemu additional options are invalid
* Fix ClientDisconnectedError
* Fix crash when NIO doesn't exist
* Turn off crash report if raven not available
* Fix crash when IOU script file is incorrect
## 1.3.0 30/03/2015
* Fix issue when asyncio read is cancelled and data is still sent by Dynamips hypervisor.
* Fix unicode decode error when saving IOS router configs.
* Fix error when missing adapter in Dynamips IOS router.
* Fix crash if we call stop on dynamips on non started process.
* Fix use_default_iou_values param was not set.
* Fix issue when IOURC environment variable is set to None.
* Fix issue when exporting IOS router configs.
* Fix check if VPCS process is running.
* Fix bug when remove_nio() is not a coroutine for ATM and FR switches.
* Fix how to test if iou and iouyap are running.
* Allocate a random port for Qemu monitor. Fixes issue with pre 1.3 projects.
* Fix default chassis bug.
## 1.3.0rc2 23/03/2015
* Update sentry key

View File

@ -4,8 +4,8 @@ include INSTALL
include LICENSE
include MANIFEST.in
include tox.ini
recursive-exclude tests *
recursive-include docs *
recursive-include tests *
recursive-exclude docs *
recursive-include gns3server *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

View File

@ -14,6 +14,25 @@ Clients like the GNS3 GUI controls the server using a HTTP REST API.
You will need the GNS3 GUI (gns3-gui repository) to control the server.
Branches
--------
master
******
master is the next stable release, you can test it in your day to day activities.
Bug fixes or small improvements pull requests goes here.
unstable
********
*Never* use this branch for production. Major new features pull requests goes here.
Linux
-----
GNS3 is perhaps packaged for your distribution:
* Gentoo: https://packages.gentoo.org/package/net-misc/gns3-server
Linux (Debian based)
--------------------
@ -49,6 +68,31 @@ To run tests use:
py.test -v
Run as daemon (Unix only)
**************************
You will found init sample script for various systems
inside the init directory.
Usefull options:
* --daemon: start process as a daemon
* --log logfile: store output in a logfile
* --pid pidfile: store the pid of the running process in a file and prevent double execution
upstart
~~~~~~~
For ubuntu < 15.04
You need to copy init/gns3.conf.upstart to /etc/init/gns3.conf
.. code:: bash
sudo chown root /etc/init/gns3.conf
sudo service gns3 start
Windows
-------

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80 HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80 HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ac98c05c-dbf1-4157-8f4c-6a0319a0bcdc'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/becc8bf8-1936-4076-b7dd-ee83ba078907'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ac98c05c-dbf1-4157-8f4c-6a0319a0bcdc HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/becc8bf8-1936-4076-b7dd-ee83ba078907 HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/acf7667f-91d4-4be5-9eec-f453783bb983/adapters/1/ports/0/nio'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/779f3f81-60ab-4d26-860c-75f915b1d70b/adapters/1/ports/0/nio'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/acf7667f-91d4-4be5-9eec-f453783bb983/adapters/1/ports/0/nio HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/779f3f81-60ab-4d26-860c-75f915b1d70b/adapters/1/ports/0/nio HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/da298f63-4d5b-44a7-8672-ec6642009725'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/6537c17b-2e47-46f9-b96b-6fc66382709f'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/da298f63-4d5b-44a7-8672-ec6642009725 HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/6537c17b-2e47-46f9-b96b-6fc66382709f HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/75fa07c2-fb3d-4a19-815d-2dee5aa5325c/adapters/1/ports/0/nio'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b54e4616-058f-413d-a589-0b7c5da20aa3/adapters/1/ports/0/nio'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/75fa07c2-fb3d-4a19-815d-2dee5aa5325c/adapters/1/ports/0/nio HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b54e4616-058f-413d-a589-0b7c5da20aa3/adapters/1/ports/0/nio HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c99f4293-b8b1-40a6-8535-014c4afc2fe7/adapters/0/ports/0/nio'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/387fb016-f1fc-4844-a25e-97c08ef77274/adapters/0/ports/0/nio'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c99f4293-b8b1-40a6-8535-014c4afc2fe7/adapters/0/ports/0/nio HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/387fb016-f1fc-4844-a25e-97c08ef77274/adapters/0/ports/0/nio HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/879f1789-bde0-4e64-ac68-f61a9b114347'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6bc73868-fea6-449b-af5c-e7b746e4129d'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/879f1789-bde0-4e64-ac68-f61a9b114347 HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6bc73868-fea6-449b-af5c-e7b746e4129d HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}

View File

@ -1,6 +1,6 @@
curl -i -X DELETE 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/5238c683-bb17-49f2-8796-a60668fc5955/adapters/0/ports/0/nio'
curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/f7d1d6ad-422b-486a-8d23-1ff46cd8bc4b/adapters/0/ports/0/nio'
DELETE /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/5238c683-bb17-49f2-8796-a60668fc5955/adapters/0/ports/0/nio HTTP/1.1
DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/f7d1d6ad-422b-486a-8d23-1ff46cd8bc4b/adapters/0/ports/0/nio HTTP/1.1
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio

View File

@ -1,15 +1,15 @@
curl -i -X GET 'http://localhost:8000/interfaces'
curl -i -X GET 'http://localhost:8000/v1/interfaces'
GET /interfaces HTTP/1.1
GET /v1/interfaces HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 520
CONTENT-LENGTH: 718
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/interfaces
[
@ -48,5 +48,17 @@ X-ROUTE: /v1/interfaces
{
"id": "bridge0",
"name": "bridge0"
},
{
"id": "vboxnet0",
"name": "vboxnet0"
},
{
"id": "vboxnet1",
"name": "vboxnet1"
},
{
"id": "vboxnet2",
"name": "vboxnet2"
}
]

View File

@ -1,20 +1,21 @@
curl -i -X GET 'http://localhost:8000/projects/00010203-0405-0607-0809-0a0b0c0d0e02'
curl -i -X GET 'http://localhost:8000/v1/projects/00010203-0405-0607-0809-0a0b0c0d0e02'
GET /projects/00010203-0405-0607-0809-0a0b0c0d0e02 HTTP/1.1
GET /v1/projects/00010203-0405-0607-0809-0a0b0c0d0e02 HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 277
CONTENT-LENGTH: 297
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}
{
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpju7ztx9a",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpju7ztx9a/00010203-0405-0607-0809-0a0b0c0d0e02",
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmphbzo0jp9",
"name": "test",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmphbzo0jp9/00010203-0405-0607-0809-0a0b0c0d0e02",
"project_id": "00010203-0405-0607-0809-0a0b0c0d0e02",
"temporary": false
}

View File

@ -1,27 +1,29 @@
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c5c0075d-0b10-4401-8bed-d9897814237c'
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ede1bba5-0723-4fd8-9e89-bdfffe5f5c8f'
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c5c0075d-0b10-4401-8bed-d9897814237c HTTP/1.1
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/ede1bba5-0723-4fd8-9e89-bdfffe5f5c8f HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 409
CONTENT-LENGTH: 386
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
{
"console": 2000,
"ethernet_adapters": 2,
"initial_config": null,
"iourc_path": null,
"l1_keepalives": false,
"name": "PC TEST 1",
"nvram": 128,
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_get0/iou.bin",
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 256,
"serial_adapters": 2,
"vm_id": "c5c0075d-0b10-4401-8bed-d9897814237c"
"use_default_iou_values": true,
"vm_id": "ede1bba5-0723-4fd8-9e89-bdfffe5f5c8f"
}

View File

@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f7220f9c-3334-43e3-9ef4-37f09ba6fcab/initial_config'
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/821b0dc3-4cc0-4899-8184-75bfc22db584/initial_config'
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f7220f9c-3334-43e3-9ef4-37f09ba6fcab/initial_config HTTP/1.1
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/821b0dc3-4cc0-4899-8184-75bfc22db584/initial_config HTTP/1.1
@ -9,7 +9,7 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/initial_config
{

View File

@ -1,15 +1,15 @@
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/4532d770-23a0-4858-bbab-d8a8b3a17deb'
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e3935d2d-2bf9-4cde-8c7e-0bd1d74c3dad'
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/4532d770-23a0-4858-bbab-d8a8b3a17deb HTTP/1.1
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e3935d2d-2bf9-4cde-8c7e-0bd1d74c3dad HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 566
CONTENT-LENGTH: 597
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
{
@ -19,16 +19,17 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
"cpu_throttling": 0,
"hda_disk_image": "",
"hdb_disk_image": "",
"hdc_disk_image": "",
"hdd_disk_image": "",
"initrd": "",
"kernel_command_line": "",
"kernel_image": "",
"legacy_networking": false,
"monitor": 2001,
"name": "PC TEST 1",
"options": "",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpyasp9636/qemu_x42",
"ram": 256,
"vm_id": "4532d770-23a0-4858-bbab-d8a8b3a17deb"
"vm_id": "e3935d2d-2bf9-4cde-8c7e-0bd1d74c3dad"
}

View File

@ -1,15 +1,15 @@
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f526503a-8d24-4513-a5e3-1ebf4159aa70'
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f49ff215-0872-4bf7-90c8-3d9ecc2b2f2b'
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f526503a-8d24-4513-a5e3-1ebf4159aa70 HTTP/1.1
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f49ff215-0872-4bf7-90c8-3d9ecc2b2f2b HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 347
CONTENT-LENGTH: 361
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
{
@ -20,7 +20,8 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
"headless": false,
"name": "VMTEST",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 0,
"use_any_adapter": false,
"vm_id": "f526503a-8d24-4513-a5e3-1ebf4159aa70",
"vm_id": "f49ff215-0872-4bf7-90c8-3d9ecc2b2f2b",
"vmname": "VMTEST"
}

View File

@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6f3c227f-86f5-4f54-bc4b-74597744b904'
curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/3ff6ff9e-93de-45ae-a7ec-e296d406ffe1'
GET /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/6f3c227f-86f5-4f54-bc4b-74597744b904 HTTP/1.1
GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/3ff6ff9e-93de-45ae-a7ec-e296d406ffe1 HTTP/1.1
@ -9,7 +9,7 @@ CONNECTION: keep-alive
CONTENT-LENGTH: 220
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
{
@ -18,5 +18,5 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"startup_script": null,
"startup_script_path": null,
"vm_id": "6f3c227f-86f5-4f54-bc4b-74597744b904"
"vm_id": "3ff6ff9e-93de-45ae-a7ec-e296d406ffe1"
}

View File

@ -1,6 +1,6 @@
curl -i -X GET 'http://localhost:8000/qemu/binaries'
curl -i -X GET 'http://localhost:8000/v1/qemu/binaries'
GET /qemu/binaries HTTP/1.1
GET /v1/qemu/binaries HTTP/1.1
@ -9,7 +9,7 @@ CONNECTION: keep-alive
CONTENT-LENGTH: 134
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/qemu/binaries
[

View File

@ -1,17 +1,18 @@
curl -i -X GET 'http://localhost:8000/version'
curl -i -X GET 'http://localhost:8000/v1/version'
GET /version HTTP/1.1
GET /v1/version HTTP/1.1
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 29
CONTENT-LENGTH: 49
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/version
{
"version": "1.3.dev1"
"local": true,
"version": "1.3.1.rc2"
}

View File

@ -0,0 +1,13 @@
curl -i -X POST 'http://localhost:8000/v1/config/reload' -d '{}'
POST /v1/config/reload HTTP/1.1
{}
HTTP/1.1 201
CONNECTION: keep-alive
CONTENT-LENGTH: 0
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/config/reload

View File

@ -1,17 +0,0 @@
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: /v1/ports/udp
{
"udp_port": 10000
}

View File

@ -1,20 +1,23 @@
curl -i -X POST 'http://localhost:8000/projects' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects' -d '{"name": "test"}'
POST /projects HTTP/1.1
{}
POST /v1/projects HTTP/1.1
{
"name": "test"
}
HTTP/1.1 201
CONNECTION: keep-alive
CONTENT-LENGTH: 277
CONTENT-LENGTH: 297
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects
{
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp4s49s4hy",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp4s49s4hy/119348c0-fa80-4386-bf1e-b00755c9c6b4",
"project_id": "119348c0-fa80-4386-bf1e-b00755c9c6b4",
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp_6lclsv7",
"name": "test",
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp_6lclsv7/187543e2-5d46-4108-a623-cfdd31fa300e",
"project_id": "187543e2-5d46-4108-a623-cfdd31fa300e",
"temporary": false
}

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/close HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/close

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/commit' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/commit' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/commit HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/commit HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/commit

View File

@ -1,36 +1,40 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"ethernet_adapters": 0, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4}'
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}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms HTTP/1.1
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-3783/test_iou_create_with_params0/iou.bin",
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-4450/test_iou_create_with_params0/iou.bin",
"ram": 1024,
"serial_adapters": 4
"serial_adapters": 4,
"use_default_iou_values": true
}
HTTP/1.1 201
CONNECTION: keep-alive
CONTENT-LENGTH: 440
CONTENT-LENGTH: 466
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms
{
"console": 2000,
"ethernet_adapters": 0,
"initial_config": "initial-config.cfg",
"iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmps796q8lx/iourc",
"l1_keepalives": true,
"name": "PC TEST 1",
"nvram": 512,
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_create_with_params0/iou.bin",
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 1024,
"serial_adapters": 4,
"vm_id": "3c02aa01-46d2-4a62-97d6-dc5829afdf39"
"use_default_iou_values": true,
"vm_id": "69f5842a-d4e5-45fe-a500-1010c72f1748"
}

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7f758868-46e1-4ef5-accc-f8e939a12471/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/iou/vms/04648c72-4339-471e-aa12-57b42d7ea18b/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7f758868-46e1-4ef5-accc-f8e939a12471/adapters/1/ports/0/nio HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/04648c72-4339-471e-aa12-57b42d7ea18b/adapters/1/ports/0/nio HTTP/1.1
{
"ethernet_device": "eth0",
"type": "nio_generic_ethernet"
@ -12,7 +12,7 @@ CONNECTION: keep-alive
CONTENT-LENGTH: 69
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c40daea2-2b38-4d14-a872-13c5f991cbc3/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6056b617-d0c4-4683-bc9e-d0130beec951/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c40daea2-2b38-4d14-a872-13c5f991cbc3/adapters/0/ports/0/start_capture HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6056b617-d0c4-4683-bc9e-d0130beec951/adapters/0/ports/0/start_capture HTTP/1.1
{
"capture_file_name": "test.pcap",
"data_link_type": "DLT_EN10MB"
@ -12,9 +12,9 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
{
"pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpn_q77wz2/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap"
"pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp367810hd/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap"
}

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/550b8f35-e258-4354-a74c-cd35a48c08ed/adapters/0/ports/0/stop_capture' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0fb3c393-7cda-4abc-ad76-a9e7af04abea/adapters/0/ports/0/stop_capture' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/550b8f35-e258-4354-a74c-cd35a48c08ed/adapters/0/ports/0/stop_capture HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0fb3c393-7cda-4abc-ad76-a9e7af04abea/adapters/0/ports/0/stop_capture HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/d1b38099-46a3-4405-a354-85faeb76bd0e/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/b32c38db-3692-4719-b94f-2b3f664cd06f/reload' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/d1b38099-46a3-4405-a354-85faeb76bd0e/reload HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/b32c38db-3692-4719-b94f-2b3f664cd06f/reload HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/reload

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/fc1ea907-eb0b-4857-9ad2-759f780afdb4/start' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/55209a6f-8fe0-49d1-a884-b7cd09547b5c/start' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/fc1ea907-eb0b-4857-9ad2-759f780afdb4/start HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/55209a6f-8fe0-49d1-a884-b7cd09547b5c/start HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/start

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0228866f-a286-44e2-9688-a8cab4e75cc3/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/d893bd2c-d84e-4f89-ad84-f3bdfaf460b6/stop' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/0228866f-a286-44e2-9688-a8cab4e75cc3/stop HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/d893bd2c-d84e-4f89-ad84-f3bdfaf460b6/stop HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/stop

View File

@ -0,0 +1,17 @@
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/ports/udp' -d '{}'
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/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.1.rc2
X-ROUTE: /v1/projects/{project_id}/ports/udp
{
"udp_port": 10000
}

View File

@ -1,20 +1,20 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms' -d '{"hda_disk_image": "hda", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42", "ram": 1024}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms' -d '{"hda_disk_image": "/tmp/hda", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpyasp9636/qemu_x42", "ram": 1024}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms HTTP/1.1
{
"hda_disk_image": "hda",
"hda_disk_image": "/tmp/hda",
"name": "PC TEST 1",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpyasp9636/qemu_x42",
"ram": 1024
}
HTTP/1.1 201
CONNECTION: keep-alive
CONTENT-LENGTH: 570
CONTENT-LENGTH: 606
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms
{
@ -22,18 +22,19 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms
"adapters": 1,
"console": 2000,
"cpu_throttling": 0,
"hda_disk_image": "hda",
"hda_disk_image": "/tmp/hda",
"hdb_disk_image": "",
"hdc_disk_image": "",
"hdd_disk_image": "",
"initrd": "",
"kernel_command_line": "",
"kernel_image": "",
"legacy_networking": false,
"monitor": 2001,
"name": "PC TEST 1",
"options": "",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpyasp9636/qemu_x42",
"ram": 1024,
"vm_id": "4e47d2c8-d591-4508-9c3e-00e366f7c22d"
"vm_id": "8c325041-39a8-4c31-b921-b66dadadc353"
}

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4ac8960-f709-4e28-bc6c-3b2593b622e9/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/e791569e-7f95-4a1d-9f8d-b48611afeef3/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4ac8960-f709-4e28-bc6c-3b2593b622e9/adapters/1/ports/0/nio HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e791569e-7f95-4a1d-9f8d-b48611afeef3/adapters/1/ports/0/nio HTTP/1.1
{
"ethernet_device": "eth0",
"type": "nio_generic_ethernet"
@ -12,7 +12,7 @@ CONNECTION: keep-alive
CONTENT-LENGTH: 69
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2a143130-2445-4a4b-9ba2-f49071eed5f4/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e6de45b1-048b-498b-9875-de76762532e9/reload' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2a143130-2445-4a4b-9ba2-f49071eed5f4/reload HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e6de45b1-048b-498b-9875-de76762532e9/reload HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/reload

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/9272bffc-7a73-449a-aa71-96c48b1e5a3d/resume' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d7152d7c-7f23-4d92-9ee1-fae132a50b3b/resume' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/9272bffc-7a73-449a-aa71-96c48b1e5a3d/resume HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d7152d7c-7f23-4d92-9ee1-fae132a50b3b/resume HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/resume

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4f04682-d749-49c8-be3e-8c4752483cc1/start' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/031c1e57-577c-4ff4-91d1-da6fe0816fdd/start' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e4f04682-d749-49c8-be3e-8c4752483cc1/start HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/031c1e57-577c-4ff4-91d1-da6fe0816fdd/start HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/start

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1cb28121-2b13-4c53-a0fc-ab8c6d028d0f/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/79ca17e8-0194-4682-bb2a-0bdd9f7d1e1a/stop' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/1cb28121-2b13-4c53-a0fc-ab8c6d028d0f/stop HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/79ca17e8-0194-4682-bb2a-0bdd9f7d1e1a/stop HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/stop

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/777077ba-025a-49dc-9773-cedc425bdb6d/suspend' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/7e24f49b-51ea-410f-bc94-16fc58071493/suspend' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/777077ba-025a-49dc-9773-cedc425bdb6d/suspend HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/7e24f49b-51ea-410f-bc94-16fc58071493/suspend HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/suspend

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms' -d '{"linked_clone": false, "name": "VM1", "vmname": "VM1"}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms' -d '{"linked_clone": false, "name": "VM1", "vmname": "VM1"}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms HTTP/1.1
{
"linked_clone": false,
"name": "VM1",
@ -10,10 +10,10 @@ POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms HTTP/1.1
HTTP/1.1 201
CONNECTION: keep-alive
CONTENT-LENGTH: 341
CONTENT-LENGTH: 355
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms
{
@ -24,7 +24,8 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms
"headless": false,
"name": "VM1",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 0,
"use_any_adapter": false,
"vm_id": "1404a6c5-c0f5-4bc6-bb94-477d7e631781",
"vm_id": "fd208626-81e5-449e-b145-fd6993f5097c",
"vmname": "VM1"
}

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bd0d175c-2055-4315-86d1-07494696d42e/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5463a797-0eb0-41d2-8b32-1efbd7a353cc/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bd0d175c-2055-4315-86d1-07494696d42e/adapters/0/ports/0/nio HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5463a797-0eb0-41d2-8b32-1efbd7a353cc/adapters/0/ports/0/nio HTTP/1.1
{
"lport": 4242,
"rhost": "127.0.0.1",
@ -14,7 +14,7 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4c9fdef4-8990-44a1-8a98-1b7c510821ee/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f24209c8-671e-428a-9561-db4775f6b8a7/reload' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4c9fdef4-8990-44a1-8a98-1b7c510821ee/reload HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f24209c8-671e-428a-9561-db4775f6b8a7/reload HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/reload

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f6487814-a3a9-4e82-867c-83662c7bed48/resume' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/70df82f6-e868-4ab3-9be9-d456871f41dc/resume' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f6487814-a3a9-4e82-867c-83662c7bed48/resume HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/70df82f6-e868-4ab3-9be9-d456871f41dc/resume HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/resume

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bedd61d4-b264-47d9-b290-920d5ba70f6d/start' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/354d48fe-cab6-41d8-8cc1-64716e02c3a8/start' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/bedd61d4-b264-47d9-b290-920d5ba70f6d/start HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/354d48fe-cab6-41d8-8cc1-64716e02c3a8/start HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/start

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a1960146-9be9-4f54-b594-67a6ab40f436/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/90733316-a02a-490b-b8c4-e6ea4a32296a/stop' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a1960146-9be9-4f54-b594-67a6ab40f436/stop HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/90733316-a02a-490b-b8c4-e6ea4a32296a/stop HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/stop

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4d16597f-fa75-430a-9b94-faf7f93bb0a3/suspend' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/0f257aa5-d61d-4ee9-872a-898462f7ecdf/suspend' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4d16597f-fa75-430a-9b94-faf7f93bb0a3/suspend HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/0f257aa5-d61d-4ee9-872a-898462f7ecdf/suspend HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/suspend

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms' -d '{"name": "PC TEST 1"}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms' -d '{"name": "PC TEST 1"}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms HTTP/1.1
{
"name": "PC TEST 1"
}
@ -11,7 +11,7 @@ CONNECTION: keep-alive
CONTENT-LENGTH: 220
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms
{
@ -20,5 +20,5 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"startup_script": null,
"startup_script_path": null,
"vm_id": "b0d1df2e-ebd1-4783-bb62-871e24f01543"
"vm_id": "68c6af80-0a82-406e-b051-24c95bd728f4"
}

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/385d80e1-193c-4b38-bf55-5185ffd6b473/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4125e37f-2bf1-435c-a86c-ae1fce4c916a/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/385d80e1-193c-4b38-bf55-5185ffd6b473/adapters/0/ports/0/nio HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4125e37f-2bf1-435c-a86c-ae1fce4c916a/adapters/0/ports/0/nio HTTP/1.1
{
"lport": 4242,
"rhost": "127.0.0.1",
@ -14,7 +14,7 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
{

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b12c5612-147d-4229-86ca-103174ba8fd1/reload' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4c5c5174-07bf-4f2a-93ab-cec244e24852/reload' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b12c5612-147d-4229-86ca-103174ba8fd1/reload HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4c5c5174-07bf-4f2a-93ab-cec244e24852/reload HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/reload

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/01037fd2-9533-42db-bd19-df5b21e47fcf/start' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/43ac3ea8-78a7-405e-ad5e-653293c48e66/start' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/01037fd2-9533-42db-bd19-df5b21e47fcf/start HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/43ac3ea8-78a7-405e-ad5e-653293c48e66/start HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/start

View File

@ -1,6 +1,6 @@
curl -i -X POST 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/20eefc85-f1b6-4e36-9601-cd0dc91faaa0/stop' -d '{}'
curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/59df4b41-6a23-4c99-9370-600b3a2cff23/stop' -d '{}'
POST /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/20eefc85-f1b6-4e36-9601-cd0dc91faaa0/stop HTTP/1.1
POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/59df4b41-6a23-4c99-9370-600b3a2cff23/stop HTTP/1.1
{}
@ -8,6 +8,6 @@ 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
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/stop

View File

@ -1,19 +1,19 @@
curl -i -X POST 'http://localhost:8000/version' -d '{"version": "1.3.dev1"}'
curl -i -X POST 'http://localhost:8000/v1/version' -d '{"version": "1.3.1.rc2"}'
POST /version HTTP/1.1
POST /v1/version HTTP/1.1
{
"version": "1.3.dev1"
"version": "1.3.1.rc2"
}
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 29
CONTENT-LENGTH: 30
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/version
{
"version": "1.3.dev1"
"version": "1.3.1.rc2"
}

View File

@ -1,8 +1,9 @@
curl -i -X PUT 'http://localhost:8000/projects/ef58b29e-59df-42c0-9492-5a766a13cb62' -d '{"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_update_path_project_non_l0"}'
curl -i -X PUT 'http://localhost:8000/v1/projects/b32aab45-411c-4171-9f20-357eaa00d54c' -d '{"name": "second_name", "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-4450/test_update_path_project_non_l0"}'
PUT /projects/ef58b29e-59df-42c0-9492-5a766a13cb62 HTTP/1.1
PUT /v1/projects/b32aab45-411c-4171-9f20-357eaa00d54c HTTP/1.1
{
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_update_path_project_non_l0"
"name": "second_name",
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-4450/test_update_path_project_non_l0"
}
@ -11,7 +12,7 @@ CONNECTION: keep-alive
CONTENT-LENGTH: 100
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}
{

View File

@ -1,36 +1,40 @@
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/324dab07-d86c-4a3b-8390-7a8e9a506006' -d '{"console": 2001, "ethernet_adapters": 4, "initial_config_content": "hostname test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0}'
curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/3812eced-e777-4f35-8c7e-e6736e34fcfd' -d '{"console": 2001, "ethernet_adapters": 4, "initial_config_content": "hostname test", "iourc_content": "test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0, "use_default_iou_values": true}'
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/324dab07-d86c-4a3b-8390-7a8e9a506006 HTTP/1.1
PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/3812eced-e777-4f35-8c7e-e6736e34fcfd HTTP/1.1
{
"console": 2001,
"ethernet_adapters": 4,
"initial_config_content": "hostname test",
"iourc_content": "test",
"l1_keepalives": true,
"name": "test",
"nvram": 2048,
"ram": 512,
"serial_adapters": 0
"serial_adapters": 0,
"use_default_iou_values": true
}
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 423
CONTENT-LENGTH: 461
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
{
"console": 2001,
"ethernet_adapters": 4,
"initial_config": "initial-config.cfg",
"iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpws7fdl5e/iourc",
"l1_keepalives": true,
"name": "test",
"nvram": 2048,
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-3783/test_iou_update0/iou.bin",
"path": "iou.bin",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 512,
"serial_adapters": 0,
"vm_id": "324dab07-d86c-4a3b-8390-7a8e9a506006"
"use_default_iou_values": true,
"vm_id": "3812eced-e777-4f35-8c7e-e6736e34fcfd"
}

View File

@ -1,9 +1,9 @@
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a68a00de-a264-4cc0-821c-301af5059ea4' -d '{"console": 2002, "hdb_disk_image": "hdb", "name": "test", "ram": 1024}'
curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e5b90e65-6f6a-4d44-b2d8-3a5c3a4a626b' -d '{"console": 2001, "hdb_disk_image": "/tmp/hdb", "name": "test", "ram": 1024}'
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a68a00de-a264-4cc0-821c-301af5059ea4 HTTP/1.1
PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e5b90e65-6f6a-4d44-b2d8-3a5c3a4a626b HTTP/1.1
{
"console": 2002,
"hdb_disk_image": "hdb",
"console": 2001,
"hdb_disk_image": "/tmp/hdb",
"name": "test",
"ram": 1024
}
@ -11,29 +11,30 @@ PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a68a00de-a264-4cc0-8
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 565
CONTENT-LENGTH: 601
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}
{
"adapter_type": "e1000",
"adapters": 1,
"console": 2002,
"console": 2001,
"cpu_throttling": 0,
"hda_disk_image": "",
"hdb_disk_image": "hdb",
"hdb_disk_image": "/tmp/hdb",
"hdc_disk_image": "",
"hdd_disk_image": "",
"initrd": "",
"kernel_command_line": "",
"kernel_image": "",
"legacy_networking": false,
"monitor": 2001,
"name": "test",
"options": "",
"process_priority": "low",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmph25p8xei/qemu_x42",
"qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpyasp9636/qemu_x42",
"ram": 1024,
"vm_id": "a68a00de-a264-4cc0-821c-301af5059ea4"
"vm_id": "e5b90e65-6f6a-4d44-b2d8-3a5c3a4a626b"
}

View File

@ -1,6 +1,6 @@
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4a6375b9-14b8-406c-ae8e-df6d242088f9' -d '{"console": 2010, "name": "test"}'
curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/514963f5-93f8-4d18-bcd6-7d50ef7164a6' -d '{"console": 2010, "name": "test"}'
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4a6375b9-14b8-406c-ae8e-df6d242088f9 HTTP/1.1
PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/514963f5-93f8-4d18-bcd6-7d50ef7164a6 HTTP/1.1
{
"console": 2010,
"name": "test"
@ -9,10 +9,10 @@ PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/4a6375b9-14b8-
HTTP/1.1 200
CONNECTION: keep-alive
CONTENT-LENGTH: 345
CONTENT-LENGTH: 359
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
{
@ -23,7 +23,8 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
"headless": false,
"name": "test",
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"ram": 0,
"use_any_adapter": false,
"vm_id": "4a6375b9-14b8-406c-ae8e-df6d242088f9",
"vm_id": "514963f5-93f8-4d18-bcd6-7d50ef7164a6",
"vmname": "VMTEST"
}

View File

@ -1,6 +1,6 @@
curl -i -X PUT 'http://localhost:8000/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/39951883-cbfb-4aff-9cbc-06895749e571' -d '{"console": 2011, "name": "test", "startup_script": "ip 192.168.1.1"}'
curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4905e649-6e81-446d-a60b-fd8b058a85e8' -d '{"console": 2011, "name": "test", "startup_script": "ip 192.168.1.1"}'
PUT /projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/39951883-cbfb-4aff-9cbc-06895749e571 HTTP/1.1
PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4905e649-6e81-446d-a60b-fd8b058a85e8 HTTP/1.1
{
"console": 2011,
"name": "test",
@ -13,7 +13,7 @@ CONNECTION: keep-alive
CONTENT-LENGTH: 236
CONTENT-TYPE: application/json
DATE: Thu, 08 Jan 2015 16:09:15 GMT
SERVER: Python/3.4 GNS3/1.3.dev1
SERVER: Python/3.4 GNS3/1.3.1.rc2
X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
{
@ -22,5 +22,5 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
"startup_script": "ip 192.168.1.1",
"startup_script_path": "startup.vpc",
"vm_id": "39951883-cbfb-4aff-9cbc-06895749e571"
"vm_id": "4905e649-6e81-446d-a60b-fd8b058a85e8"
}

8
docs/api/v1/config.rst Normal file
View File

@ -0,0 +1,8 @@
Config
---------------------
.. toctree::
:glob:
:maxdepth: 2
config/*

View File

@ -1,19 +1,20 @@
/v1/ports/udp
/v1/config/reload
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/ports/udp
POST /v1/config/reload
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allocate an UDP port on the server
Check if version is the same as the server
Response status codes
**********************
- **201**: UDP port allocated
- **201**: Config reload
- **403**: Config reload refused
Sample session
***************
.. literalinclude:: ../../examples/post_portsudp.txt
.. literalinclude:: ../../examples/post_configreload.txt

View File

@ -23,7 +23,7 @@ Input
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>device_id</td> <td> </td> <td>string</td> <td>Dynamips device instance identifier</td> </tr>
<tr><td>device_id</td> <td> </td> <td></td> <td>Dynamips device instance identifier</td> </tr>
<tr><td>device_type</td> <td>&#10004;</td> <td>string</td> <td>Dynamips device type</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>Dynamips device name</td> </tr>
</table>

View File

@ -10,8 +10,8 @@ Add a NIO to a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **device_id**: UUID for the instance
- **port_number**: Port on the device
- **device_id**: UUID for the instance
Response status codes
**********************
@ -129,8 +129,8 @@ Remove a NIO from a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **device_id**: UUID for the instance
- **port_number**: Port on the device
- **device_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,8 +10,8 @@ Start a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **device_id**: UUID for the instance
- **port_number**: Port on the device
- **device_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,8 +10,8 @@ Stop a packet capture on a Dynamips device instance
Parameters
**********
- **project_id**: UUID for the project
- **device_id**: UUID for the instance
- **port_number**: Port on the device
- **device_id**: UUID for the instance
Response status codes
**********************

View File

@ -26,7 +26,6 @@ Input
<tr><td>aux</td> <td> </td> <td>integer</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>chassis</td> <td> </td> <td>string</td> <td>router chassis model</td> </tr>
<tr><td>clock_divisor</td> <td> </td> <td>integer</td> <td>clock divisor</td> </tr>
<tr><td>confreg</td> <td> </td> <td>string</td> <td>configuration register</td> </tr>
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>disk0</td> <td> </td> <td>integer</td> <td>disk0 size in MB</td> </tr>
<tr><td>disk1</td> <td> </td> <td>integer</td> <td>disk1 size in MB</td> </tr>
@ -74,10 +73,9 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>aux</td> <td> </td> <td>integer</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>aux</td> <td> </td> <td>['integer', 'null']</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>chassis</td> <td> </td> <td>string</td> <td>router chassis model</td> </tr>
<tr><td>clock_divisor</td> <td> </td> <td>integer</td> <td>clock divisor</td> </tr>
<tr><td>confreg</td> <td> </td> <td>string</td> <td>configuration register</td> </tr>
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>disk0</td> <td> </td> <td>integer</td> <td>disk0 size in MB</td> </tr>
<tr><td>disk1</td> <td> </td> <td>integer</td> <td>disk1 size in MB</td> </tr>

View File

@ -24,10 +24,9 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>aux</td> <td> </td> <td>integer</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>aux</td> <td> </td> <td>['integer', 'null']</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>chassis</td> <td> </td> <td>string</td> <td>router chassis model</td> </tr>
<tr><td>clock_divisor</td> <td> </td> <td>integer</td> <td>clock divisor</td> </tr>
<tr><td>confreg</td> <td> </td> <td>string</td> <td>configuration register</td> </tr>
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>disk0</td> <td> </td> <td>integer</td> <td>disk0 size in MB</td> </tr>
<tr><td>disk1</td> <td> </td> <td>integer</td> <td>disk1 size in MB</td> </tr>
@ -94,7 +93,6 @@ Input
<tr><td>aux</td> <td> </td> <td>integer</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>chassis</td> <td> </td> <td>string</td> <td>router chassis model</td> </tr>
<tr><td>clock_divisor</td> <td> </td> <td>integer</td> <td>clock divisor</td> </tr>
<tr><td>confreg</td> <td> </td> <td>string</td> <td>configuration register</td> </tr>
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>disk0</td> <td> </td> <td>integer</td> <td>disk0 size in MB</td> </tr>
<tr><td>disk1</td> <td> </td> <td>integer</td> <td>disk1 size in MB</td> </tr>
@ -140,10 +138,9 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>aux</td> <td> </td> <td>integer</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>aux</td> <td> </td> <td>['integer', 'null']</td> <td>auxiliary console TCP port</td> </tr>
<tr><td>chassis</td> <td> </td> <td>string</td> <td>router chassis model</td> </tr>
<tr><td>clock_divisor</td> <td> </td> <td>integer</td> <td>clock divisor</td> </tr>
<tr><td>confreg</td> <td> </td> <td>string</td> <td>configuration register</td> </tr>
<tr><td>console</td> <td> </td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>disk0</td> <td> </td> <td>integer</td> <td>disk0 size in MB</td> </tr>
<tr><td>disk1</td> <td> </td> <td>integer</td> <td>disk1 size in MB</td> </tr>

View File

@ -10,9 +10,9 @@ Add a NIO to a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter where the nio should be added
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -28,9 +28,9 @@ Remove a NIO from a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter from where the nio should be removed
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Start a packet capture on a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Stop a packet capture on a Dynamips VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -0,0 +1,15 @@
/v1/projects/{project_id}/dynamips/vms/{vm_id}/configs/save
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/configs/save
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Save the startup and private configs content
Response status codes
**********************
- **200**: Configs saved
- **400**: Invalid request
- **404**: Instance doesn't exist

8
docs/api/v1/iou.rst Normal file
View File

@ -0,0 +1,8 @@
Iou
---------------------
.. toctree::
:glob:
:maxdepth: 2
iou/*

View File

@ -0,0 +1,66 @@
/v1/projects/{project_id}/iou/vms
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a new IOU 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', 'null']</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td> </td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config_content</td> <td> </td> <td>['string', 'null']</td> <td>Initial configuration of the IOU</td> </tr>
<tr><td>iourc_content</td> <td> </td> <td>['string', 'null']</td> <td>Content of the iourc file, if a file exist on servers this variable is ignored. It's mostly for compatibility with < 1.3 releases</td> </tr>
<tr><td>l1_keepalives</td> <td> </td> <td>['boolean', 'null']</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>ram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td> </td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>use_default_iou_values</td> <td> </td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
<tr><td>vm_id</td> <td> </td> <td></td> <td>IOU VM identifier</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>&#10004;</td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the initial config content relative to project directory</td> </tr>
<tr><td>iourc_path</td> <td> </td> <td>['string', 'null']</td> <td>Path of the iourc file used by remote servers</td> </tr>
<tr><td>l1_keepalives</td> <td>&#10004;</td> <td>boolean</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>use_default_iou_values</td> <td>&#10004;</td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>IOU VM UUID</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvms.txt

View File

@ -0,0 +1,132 @@
/v1/projects/{project_id}/iou/vms/{vm_id}
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
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>&#10004;</td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the initial config content relative to project directory</td> </tr>
<tr><td>iourc_path</td> <td> </td> <td>['string', 'null']</td> <td>Path of the iourc file used by remote servers</td> </tr>
<tr><td>l1_keepalives</td> <td>&#10004;</td> <td>boolean</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>use_default_iou_values</td> <td>&#10004;</td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>IOU VM UUID</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/get_projectsprojectidiouvmsvmid.txt
PUT /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
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', 'null']</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td> </td> <td>['integer', 'null']</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config_content</td> <td> </td> <td>['string', 'null']</td> <td>Initial configuration of the IOU</td> </tr>
<tr><td>iourc_content</td> <td> </td> <td>['string', 'null']</td> <td>Content of the iourc file, if a file exist on servers this variable is ignored. It's mostly for compatibility with < 1.3 releases</td> </tr>
<tr><td>l1_keepalives</td> <td> </td> <td>['boolean', 'null']</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Path of iou binary</td> </tr>
<tr><td>ram</td> <td> </td> <td>['integer', 'null']</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td> </td> <td>['integer', 'null']</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>use_default_iou_values</td> <td> </td> <td>['boolean', 'null']</td> <td>Use default IOU values</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>&#10004;</td> <td>integer</td> <td>console TCP port</td> </tr>
<tr><td>ethernet_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many ethernet adapters are connected to the IOU</td> </tr>
<tr><td>initial_config</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Path of the initial config content relative to project directory</td> </tr>
<tr><td>iourc_path</td> <td> </td> <td>['string', 'null']</td> <td>Path of the iourc file used by remote servers</td> </tr>
<tr><td>l1_keepalives</td> <td>&#10004;</td> <td>boolean</td> <td>Always up ethernet interface</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>IOU VM name</td> </tr>
<tr><td>nvram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated NVRAM KB</td> </tr>
<tr><td>path</td> <td>&#10004;</td> <td>string</td> <td>Path of iou binary</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td>&#10004;</td> <td>integer</td> <td>Allocated RAM MB</td> </tr>
<tr><td>serial_adapters</td> <td>&#10004;</td> <td>integer</td> <td>How many serial adapters are connected to the IOU</td> </tr>
<tr><td>use_default_iou_values</td> <td>&#10004;</td> <td>['boolean', 'null']</td> <td>Use default IOU values</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>IOU VM UUID</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/put_projectsprojectidiouvmsvmid.txt
DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Delete a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance deleted
Sample session
***************
.. literalinclude:: ../../examples/delete_projectsprojectidiouvmsvmid.txt

View File

@ -0,0 +1,52 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add a NIO to a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **201**: NIO created
- **404**: Instance doesn't exist
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt
DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove a NIO from a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: NIO deleted
Sample session
***************
.. literalinclude:: ../../examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt

View File

@ -0,0 +1,39 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start a packet capture on a IOU VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter
- **vm_id**: UUID for the instance
Response status codes
**********************
- **200**: Capture started
- **400**: Invalid request
- **404**: Instance doesn't exist
- **409**: VM not started
Input
*******
.. raw:: html
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>capture_file_name</td> <td>&#10004;</td> <td>string</td> <td>Capture file name</td> </tr>
<tr><td>data_link_type</td> <td>&#10004;</td> <td>string</td> <td>PCAP data link type</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt

View File

@ -0,0 +1,29 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stop a packet capture on a IOU VM instance
Parameters
**********
- **project_id**: UUID for the project
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Capture stopped
- **409**: VM not started
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt

View File

@ -0,0 +1,30 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/initial_config
----------------------------------------------------------------------------------------------------------------------
.. contents::
GET /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/initial_config
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve the initial config content
Response status codes
**********************
- **200**: Initial config retrieved
- **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>content</td> <td>&#10004;</td> <td>['string', 'null']</td> <td>Content of the initial configuration file</td> </tr>
</table>
Sample session
***************
.. literalinclude:: ../../examples/get_projectsprojectidiouvmsvmidinitialconfig.txt

View File

@ -0,0 +1,26 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/reload
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/reload
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reload a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance reloaded
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidreload.txt

View File

@ -0,0 +1,26 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/start
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/start
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance started
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidstart.txt

View File

@ -0,0 +1,26 @@
/v1/projects/{project_id}/iou/vms/{vm_id}/stop
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/stop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stop a IOU instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
Response status codes
**********************
- **400**: Invalid request
- **404**: Instance doesn't exist
- **204**: Instance stopped
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidiouvmsvmidstop.txt

View File

@ -0,0 +1,24 @@
/v1/projects/{project_id}/ports/udp
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/projects/**{project_id}**/ports/udp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allocate an UDP port on the server
Parameters
**********
- **project_id**: The UUID of the project
Response status codes
**********************
- **201**: UDP port allocated
- **404**: The project doesn't exist
Sample session
***************
.. literalinclude:: ../../examples/post_projectsprojectidportsudp.txt

View File

@ -18,6 +18,7 @@ Input
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>Project name</td> </tr>
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Project directory</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>
@ -30,6 +31,7 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>location</td> <td>&#10004;</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
<tr><td>name</td> <td> </td> <td>string</td> <td>Project name</td> </tr>
<tr><td>path</td> <td> </td> <td>string</td> <td>Directory of the project on the server</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>

View File

@ -23,6 +23,7 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>location</td> <td>&#10004;</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
<tr><td>name</td> <td> </td> <td>string</td> <td>Project name</td> </tr>
<tr><td>path</td> <td> </td> <td>string</td> <td>Directory of the project on the server</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
@ -55,6 +56,7 @@ Input
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>Project name</td> </tr>
<tr><td>path</td> <td> </td> <td>['string', 'null']</td> <td>Path of the project on the server (work only with --local)</td> </tr>
<tr><td>temporary</td> <td> </td> <td>boolean</td> <td>If project is a temporary project</td> </tr>
</table>
@ -66,6 +68,7 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>location</td> <td>&#10004;</td> <td>string</td> <td>Base directory where the project should be created on remote server</td> </tr>
<tr><td>name</td> <td> </td> <td>string</td> <td>Project name</td> </tr>
<tr><td>path</td> <td> </td> <td>string</td> <td>Directory of the project on the server</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>temporary</td> <td>&#10004;</td> <td>boolean</td> <td>If project is a temporary project</td> </tr>

View File

@ -29,17 +29,18 @@ Input
<tr><td>cpu_throttling</td> <td> </td> <td>['integer', 'null']</td> <td>Percentage of CPU allowed for QEMU</td> </tr>
<tr><td>hda_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hda disk image path</td> </tr>
<tr><td>hdb_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hdb disk image path</td> </tr>
<tr><td>hdc_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hdc disk image path</td> </tr>
<tr><td>hdd_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hdd disk image path</td> </tr>
<tr><td>initrd</td> <td> </td> <td>['string', 'null']</td> <td>QEMU initrd path</td> </tr>
<tr><td>kernel_command_line</td> <td> </td> <td>['string', 'null']</td> <td>QEMU kernel command line</td> </tr>
<tr><td>kernel_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU kernel image path</td> </tr>
<tr><td>legacy_networking</td> <td> </td> <td>['boolean', 'null']</td> <td>Use QEMU legagy networking commands (-net syntax)</td> </tr>
<tr><td>monitor</td> <td> </td> <td>['integer', 'null']</td> <td>monitor TCP port</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>QEMU VM instance name</td> </tr>
<tr><td>options</td> <td> </td> <td>['string', 'null']</td> <td>Additional QEMU options</td> </tr>
<tr><td>process_priority</td> <td> </td> <td>enum</td> <td>Possible values: realtime, very high, high, normal, low, very low, null</td> </tr>
<tr><td>qemu_path</td> <td>&#10004;</td> <td>string</td> <td>Path to QEMU</td> </tr>
<tr><td>ram</td> <td> </td> <td>['integer', 'null']</td> <td>amount of RAM in MB</td> </tr>
<tr><td>vm_id</td> <td> </td> <td>['string', 'null']</td> <td>QEMU VM UUID</td> </tr>
<tr><td>vm_id</td> <td> </td> <td></td> <td>QEMU VM identifier</td> </tr>
</table>
Output
@ -54,11 +55,12 @@ Output
<tr><td>cpu_throttling</td> <td>&#10004;</td> <td>integer</td> <td>Percentage of CPU allowed for QEMU</td> </tr>
<tr><td>hda_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hda disk image path</td> </tr>
<tr><td>hdb_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdb disk image path</td> </tr>
<tr><td>hdc_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdc disk image path</td> </tr>
<tr><td>hdd_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdd disk image path</td> </tr>
<tr><td>initrd</td> <td>&#10004;</td> <td>string</td> <td>QEMU initrd path</td> </tr>
<tr><td>kernel_command_line</td> <td>&#10004;</td> <td>string</td> <td>QEMU kernel command line</td> </tr>
<tr><td>kernel_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU kernel image path</td> </tr>
<tr><td>legacy_networking</td> <td>&#10004;</td> <td>boolean</td> <td>Use QEMU legagy networking commands (-net syntax)</td> </tr>
<tr><td>monitor</td> <td>&#10004;</td> <td>integer</td> <td>monitor TCP port</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>QEMU VM instance name</td> </tr>
<tr><td>options</td> <td>&#10004;</td> <td>string</td> <td>Additional QEMU options</td> </tr>
<tr><td>process_priority</td> <td>&#10004;</td> <td>enum</td> <td>Possible values: realtime, very high, high, normal, low, very low</td> </tr>

View File

@ -30,11 +30,12 @@ Output
<tr><td>cpu_throttling</td> <td>&#10004;</td> <td>integer</td> <td>Percentage of CPU allowed for QEMU</td> </tr>
<tr><td>hda_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hda disk image path</td> </tr>
<tr><td>hdb_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdb disk image path</td> </tr>
<tr><td>hdc_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdc disk image path</td> </tr>
<tr><td>hdd_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdd disk image path</td> </tr>
<tr><td>initrd</td> <td>&#10004;</td> <td>string</td> <td>QEMU initrd path</td> </tr>
<tr><td>kernel_command_line</td> <td>&#10004;</td> <td>string</td> <td>QEMU kernel command line</td> </tr>
<tr><td>kernel_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU kernel image path</td> </tr>
<tr><td>legacy_networking</td> <td>&#10004;</td> <td>boolean</td> <td>Use QEMU legagy networking commands (-net syntax)</td> </tr>
<tr><td>monitor</td> <td>&#10004;</td> <td>integer</td> <td>monitor TCP port</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>QEMU VM instance name</td> </tr>
<tr><td>options</td> <td>&#10004;</td> <td>string</td> <td>Additional QEMU options</td> </tr>
<tr><td>process_priority</td> <td>&#10004;</td> <td>enum</td> <td>Possible values: realtime, very high, high, normal, low, very low</td> </tr>
@ -79,11 +80,12 @@ Input
<tr><td>cpu_throttling</td> <td> </td> <td>['integer', 'null']</td> <td>Percentage of CPU allowed for QEMU</td> </tr>
<tr><td>hda_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hda disk image path</td> </tr>
<tr><td>hdb_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hdb disk image path</td> </tr>
<tr><td>hdc_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hdc disk image path</td> </tr>
<tr><td>hdd_disk_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU hdd disk image path</td> </tr>
<tr><td>initrd</td> <td> </td> <td>['string', 'null']</td> <td>QEMU initrd path</td> </tr>
<tr><td>kernel_command_line</td> <td> </td> <td>['string', 'null']</td> <td>QEMU kernel command line</td> </tr>
<tr><td>kernel_image</td> <td> </td> <td>['string', 'null']</td> <td>QEMU kernel image path</td> </tr>
<tr><td>legacy_networking</td> <td> </td> <td>['boolean', 'null']</td> <td>Use QEMU legagy networking commands (-net syntax)</td> </tr>
<tr><td>monitor</td> <td> </td> <td>['integer', 'null']</td> <td>monitor TCP port</td> </tr>
<tr><td>name</td> <td> </td> <td>['string', 'null']</td> <td>QEMU VM instance name</td> </tr>
<tr><td>options</td> <td> </td> <td>['string', 'null']</td> <td>Additional QEMU options</td> </tr>
<tr><td>process_priority</td> <td> </td> <td>enum</td> <td>Possible values: realtime, very high, high, normal, low, very low, null</td> </tr>
@ -103,11 +105,12 @@ Output
<tr><td>cpu_throttling</td> <td>&#10004;</td> <td>integer</td> <td>Percentage of CPU allowed for QEMU</td> </tr>
<tr><td>hda_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hda disk image path</td> </tr>
<tr><td>hdb_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdb disk image path</td> </tr>
<tr><td>hdc_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdc disk image path</td> </tr>
<tr><td>hdd_disk_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU hdd disk image path</td> </tr>
<tr><td>initrd</td> <td>&#10004;</td> <td>string</td> <td>QEMU initrd path</td> </tr>
<tr><td>kernel_command_line</td> <td>&#10004;</td> <td>string</td> <td>QEMU kernel command line</td> </tr>
<tr><td>kernel_image</td> <td>&#10004;</td> <td>string</td> <td>QEMU kernel image path</td> </tr>
<tr><td>legacy_networking</td> <td>&#10004;</td> <td>boolean</td> <td>Use QEMU legagy networking commands (-net syntax)</td> </tr>
<tr><td>monitor</td> <td>&#10004;</td> <td>integer</td> <td>monitor TCP port</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>QEMU VM instance name</td> </tr>
<tr><td>options</td> <td>&#10004;</td> <td>string</td> <td>Additional QEMU options</td> </tr>
<tr><td>process_priority</td> <td>&#10004;</td> <td>enum</td> <td>Possible values: realtime, very high, high, normal, low, very low</td> </tr>

View File

@ -10,9 +10,9 @@ Add a NIO to a Qemu.instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -34,9 +34,9 @@ Remove a NIO from a Qemu.instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

8
docs/api/v1/server.rst Normal file
View File

@ -0,0 +1,8 @@
Server
---------------------
.. toctree::
:glob:
:maxdepth: 2
server/*

View File

@ -0,0 +1,14 @@
/v1/server/shutdown
----------------------------------------------------------------------------------------------------------------------
.. contents::
POST /v1/server/shutdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shutdown the local server
Response status codes
**********************
- **201**: Server is shutting down
- **403**: Server shutdown refused

View File

@ -17,6 +17,7 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>local</td> <td> </td> <td>boolean</td> <td>Either this is a local server</td> </tr>
<tr><td>version</td> <td>&#10004;</td> <td>string</td> <td>Version number human readable</td> </tr>
</table>
@ -42,6 +43,7 @@ Input
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>local</td> <td> </td> <td>boolean</td> <td>Either this is a local server</td> </tr>
<tr><td>version</td> <td>&#10004;</td> <td>string</td> <td>Version number human readable</td> </tr>
</table>
@ -51,6 +53,7 @@ Output
<table>
<tr> <th>Name</th> <th>Mandatory</th> <th>Type</th> <th>Description</th> </tr>
<tr><td>local</td> <td> </td> <td>boolean</td> <td>Either this is a local server</td> </tr>
<tr><td>version</td> <td>&#10004;</td> <td>string</td> <td>Version number human readable</td> </tr>
</table>

View File

@ -30,6 +30,7 @@ Input
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
<tr><td>linked_clone</td> <td>&#10004;</td> <td>boolean</td> <td>either the VM is a linked clone or not</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM instance name</td> </tr>
<tr><td>ram</td> <td> </td> <td>integer</td> <td>Amount of RAM</td> </tr>
<tr><td>use_any_adapter</td> <td> </td> <td>boolean</td> <td>allow GNS3 to use any VirtualBox adapter</td> </tr>
<tr><td>vm_id</td> <td> </td> <td></td> <td>VirtualBox VM instance identifier</td> </tr>
<tr><td>vmname</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
@ -48,6 +49,7 @@ Output
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM instance name</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td> </td> <td>integer</td> <td>Amount of RAM</td> </tr>
<tr><td>use_any_adapter</td> <td> </td> <td>boolean</td> <td>allow GNS3 to use any VirtualBox adapter</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM instance UUID</td> </tr>
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>

View File

@ -31,6 +31,7 @@ Output
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM instance name</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td> </td> <td>integer</td> <td>Amount of RAM</td> </tr>
<tr><td>use_any_adapter</td> <td> </td> <td>boolean</td> <td>allow GNS3 to use any VirtualBox adapter</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM instance UUID</td> </tr>
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
@ -71,6 +72,7 @@ Input
<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>VirtualBox VM instance name</td> </tr>
<tr><td>ram</td> <td> </td> <td>integer</td> <td>Amount of RAM</td> </tr>
<tr><td>use_any_adapter</td> <td> </td> <td>boolean</td> <td>allow GNS3 to use any VirtualBox adapter</td> </tr>
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>
</table>
@ -88,6 +90,7 @@ Output
<tr><td>headless</td> <td> </td> <td>boolean</td> <td>headless mode</td> </tr>
<tr><td>name</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM instance name</td> </tr>
<tr><td>project_id</td> <td>&#10004;</td> <td>string</td> <td>Project UUID</td> </tr>
<tr><td>ram</td> <td> </td> <td>integer</td> <td>Amount of RAM</td> </tr>
<tr><td>use_any_adapter</td> <td> </td> <td>boolean</td> <td>allow GNS3 to use any VirtualBox adapter</td> </tr>
<tr><td>vm_id</td> <td>&#10004;</td> <td>string</td> <td>VirtualBox VM instance UUID</td> </tr>
<tr><td>vmname</td> <td> </td> <td>string</td> <td>VirtualBox VM name (in VirtualBox itself)</td> </tr>

View File

@ -10,9 +10,9 @@ Add a NIO to a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter where the nio should be added
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -34,9 +34,9 @@ Remove a NIO from a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter from where the nio should be removed
- **port_number**: Port on the adapter (always)
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Start a packet capture on a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to start a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Stop a packet capture on a VirtualBox VM instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Adapter to stop a packet capture
- **port_number**: Port on the adapter (always 0)
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -10,9 +10,9 @@ Add a NIO to a VPCS instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port where the nio should be added
- **vm_id**: UUID for the instance
Response status codes
**********************
@ -34,9 +34,9 @@ Remove a NIO from a VPCS instance
Parameters
**********
- **project_id**: UUID for the project
- **vm_id**: UUID for the instance
- **adapter_number**: Network adapter where the nio is located
- **port_number**: Port from where the nio should be removed
- **vm_id**: UUID for the instance
Response status codes
**********************

View File

@ -39,10 +39,11 @@ The next step is to create a project.
.. code-block:: shell-session
# curl -X POST "http://localhost:8000/v1/projects" -d "{}"
# curl -X POST "http://localhost:8000/v1/projects" -d '{"name": "test"}'
{
"project_id": "42f9feee-3217-4104-981e-85d5f0a806ec",
"temporary": false
"temporary": false,
"name": "Test"
}
With this project id we can now create two VPCS VM.
@ -69,12 +70,12 @@ two UDP ports.
.. code-block:: shell-session
# curl -X POST "http://localhost:8000/v1/ports/udp" -d '{}'
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/ports/udp" -d '{}'
{
"udp_port": 10000
}
# curl -X POST "http://localhost:8000/v1/ports/udp" -d '{}'
# curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/ports/udp" -d '{}'
{
"udp_port": 10001
}

View File

@ -15,12 +15,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import raven
import os
import sys
import struct
import platform
try:
import raven
RAVEN_AVAILABLE = True
except ImportError:
# raven is not installed with deb package in order to simplify packaging
RAVEN_AVAILABLE = False
from .version import __version__
from .config import Config
@ -34,7 +40,7 @@ class CrashReport:
Report crash to a third party service
"""
DSN = "sync+https://2f1f465755f3482993eec637cae95f4c:f71b4e8ecec54ea48666c09d68790558@app.getsentry.com/38482"
DSN = "sync+https://90fe04368a3e4109b584a116ee03ca87:268ef86c65cf4e8fa41d4c7fb1c70b72@app.getsentry.com/38482"
if hasattr(sys, "frozen"):
cacert = os.path.join(os.getcwd(), "cacert.pem")
if os.path.isfile(cacert):
@ -47,6 +53,8 @@ class CrashReport:
self._client = None
def capture_exception(self, request=None):
if not RAVEN_AVAILABLE:
return
server_config = Config.instance().get_section_config("Server")
if server_config.getboolean("report_errors"):
if self._client is None:

View File

@ -27,8 +27,9 @@ from gns3server.handlers.api.virtualbox_handler import VirtualBoxHandler
from gns3server.handlers.api.vpcs_handler import VPCSHandler
from gns3server.handlers.api.config_handler import ConfigHandler
from gns3server.handlers.api.server_handler import ServerHandler
from gns3server.handlers.api.file_handler import FileHandler
from gns3server.handlers.upload_handler import UploadHandler
from gns3server.handlers.index_handler import IndexHandler
if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test"):
if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test") or os.environ.get("PYTEST_BUILD_DOCUMENTATION") == "1":
from gns3server.handlers.api.iou_handler import IOUHandler

View File

@ -181,10 +181,8 @@ class DynamipsDeviceHandler:
dynamips_manager = Dynamips.instance()
device = dynamips_manager.get_device(request.match_info["device_id"], project_id=request.match_info["project_id"])
port_number = int(request.match_info["port_number"])
if asyncio.iscoroutinefunction(device.remove_nio):
yield from device.remove_nio(port_number)
else:
device.remove_nio(port_number)
nio = yield from device.remove_nio(port_number)
yield from nio.delete()
response.set_status(204)
@Route.post(

Some files were not shown because too many files have changed in this diff Show More