2016-03-14 21:37:07 +02:00
|
|
|
curl -i -X POST 'http://localhost:8000/v2/projects/b61e91b1-e69c-4eaa-a012-9d98135a53e0/links' -d '{"vms": [{"adapter_number": 0, "port_number": 3, "vm_id": "0f349889-091d-4919-87d2-11d7ec429066"}, {"adapter_number": 2, "port_number": 4, "vm_id": "bc556663-16a6-41e0-9562-4e541037d890"}]}'
|
2016-03-11 18:20:09 +02:00
|
|
|
|
2016-03-14 21:37:07 +02:00
|
|
|
POST /v2/projects/b61e91b1-e69c-4eaa-a012-9d98135a53e0/links HTTP/1.1
|
2016-03-11 18:20:09 +02:00
|
|
|
{
|
|
|
|
"vms": [
|
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
|
|
|
"port_number": 3,
|
2016-03-14 21:37:07 +02:00
|
|
|
"vm_id": "0f349889-091d-4919-87d2-11d7ec429066"
|
2016-03-11 18:20:09 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
|
|
|
"port_number": 4,
|
2016-03-14 21:37:07 +02:00
|
|
|
"vm_id": "bc556663-16a6-41e0-9562-4e541037d890"
|
2016-03-11 18:20:09 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HTTP/1.1 201
|
|
|
|
ACCESS-CONTROL-ALLOW-ORIGIN: *
|
|
|
|
CONTENT-LENGTH: 364
|
|
|
|
CONTENT-TYPE: application/json
|
|
|
|
DATE: Thu, 08 Jan 2015 16:09:15 GMT
|
|
|
|
SERVER: Python/3.5 GNS3/1.5.0dev1
|
|
|
|
X-ROUTE: /v2/projects/{project_id}/links
|
|
|
|
|
|
|
|
{
|
2016-03-14 21:37:07 +02:00
|
|
|
"link_id": "43bd7b6b-8878-48fd-b8f7-1ca876b372ae",
|
2016-03-11 18:20:09 +02:00
|
|
|
"vms": [
|
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
|
|
|
"port_number": 3,
|
2016-03-14 21:37:07 +02:00
|
|
|
"vm_id": "0f349889-091d-4919-87d2-11d7ec429066"
|
2016-03-11 18:20:09 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
|
|
|
"port_number": 4,
|
2016-03-14 21:37:07 +02:00
|
|
|
"vm_id": "bc556663-16a6-41e0-9562-4e541037d890"
|
2016-03-11 18:20:09 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|