mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 16:58:28 +00:00
7f72b90b0e
* A new one for controller related events (compute, appliance templates etc.) * The existing one for project related events (links, nodes etc.)
82 lines
2.3 KiB
Plaintext
82 lines
2.3 KiB
Plaintext
curl -i -X PUT 'http://localhost:3080/v2/projects/c12478fd-66df-4eac-ace8-fcd9aeb15028/links/873cfd7c-e61a-41c8-ac60-1068f67d2832' -d '{"filters": {"frequency_drop": [50], "latency": [10]}, "nodes": [{"adapter_number": 0, "label": {"text": "Hello", "x": 64, "y": 0}, "node_id": "cbd224a2-fc0e-4a41-9dae-6ddd1b8ce297", "port_number": 3}, {"adapter_number": 2, "node_id": "16dcbe64-5544-443b-bfed-798e6b89bd7d", "port_number": 4}]}'
|
|
|
|
PUT /v2/projects/c12478fd-66df-4eac-ace8-fcd9aeb15028/links/873cfd7c-e61a-41c8-ac60-1068f67d2832 HTTP/1.1
|
|
{
|
|
"filters": {
|
|
"frequency_drop": [
|
|
50
|
|
],
|
|
"latency": [
|
|
10
|
|
]
|
|
},
|
|
"nodes": [
|
|
{
|
|
"adapter_number": 0,
|
|
"label": {
|
|
"text": "Hello",
|
|
"x": 64,
|
|
"y": 0
|
|
},
|
|
"node_id": "cbd224a2-fc0e-4a41-9dae-6ddd1b8ce297",
|
|
"port_number": 3
|
|
},
|
|
{
|
|
"adapter_number": 2,
|
|
"node_id": "16dcbe64-5544-443b-bfed-798e6b89bd7d",
|
|
"port_number": 4
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
HTTP/1.1 201
|
|
Connection: close
|
|
Content-Length: 1022
|
|
Content-Type: application/json
|
|
Date: Thu, 16 Aug 2018 14:23:22 GMT
|
|
Server: Python/3.5 GNS3/2.2.0dev2
|
|
X-Route: /v2/projects/{project_id}/links/{link_id}
|
|
|
|
{
|
|
"capture_file_name": null,
|
|
"capture_file_path": null,
|
|
"capturing": false,
|
|
"filters": {
|
|
"frequency_drop": [
|
|
50
|
|
],
|
|
"latency": [
|
|
10
|
|
]
|
|
},
|
|
"link_id": "873cfd7c-e61a-41c8-ac60-1068f67d2832",
|
|
"link_type": "ethernet",
|
|
"nodes": [
|
|
{
|
|
"adapter_number": 0,
|
|
"label": {
|
|
"text": "Hello",
|
|
"x": 64,
|
|
"y": 0
|
|
},
|
|
"node_id": "cbd224a2-fc0e-4a41-9dae-6ddd1b8ce297",
|
|
"port_number": 3
|
|
},
|
|
{
|
|
"adapter_number": 2,
|
|
"label": {
|
|
"rotation": 0,
|
|
"style": "font-size: 10; font-style: Verdana",
|
|
"text": "2/4",
|
|
"x": -10,
|
|
"y": -10
|
|
},
|
|
"node_id": "16dcbe64-5544-443b-bfed-798e6b89bd7d",
|
|
"port_number": 4
|
|
}
|
|
],
|
|
"project_id": "c12478fd-66df-4eac-ace8-fcd9aeb15028",
|
|
"suspend": false
|
|
}
|