2018-06-14 11:39:31 +03:00
|
|
|
curl -i -X PUT 'http://localhost:3080/v2/projects/3f20f6cd-0674-41da-9ed9-36fbf90b87d5/links/8382d2ec-103b-4255-8073-d6754b2f72fc' -d '{"filters": {"frequency_drop": [50], "latency": [10]}, "nodes": [{"adapter_number": 0, "label": {"text": "Hello", "x": 64, "y": 0}, "node_id": "52e2c403-926e-470e-b27c-ae29c659ad72", "port_number": 3}, {"adapter_number": 2, "node_id": "7c514eac-e305-4fe3-b9d4-35db2558c172", "port_number": 4}]}'
|
2018-01-08 10:26:44 +02:00
|
|
|
|
2018-06-14 11:39:31 +03:00
|
|
|
PUT /v2/projects/3f20f6cd-0674-41da-9ed9-36fbf90b87d5/links/8382d2ec-103b-4255-8073-d6754b2f72fc HTTP/1.1
|
2018-01-08 10:26:44 +02:00
|
|
|
{
|
|
|
|
"filters": {
|
|
|
|
"frequency_drop": [
|
|
|
|
50
|
|
|
|
],
|
|
|
|
"latency": [
|
|
|
|
10
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"nodes": [
|
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
|
|
|
"label": {
|
|
|
|
"text": "Hello",
|
|
|
|
"x": 64,
|
|
|
|
"y": 0
|
|
|
|
},
|
2018-06-14 11:39:31 +03:00
|
|
|
"node_id": "52e2c403-926e-470e-b27c-ae29c659ad72",
|
2018-01-08 10:26:44 +02:00
|
|
|
"port_number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
2018-06-14 11:39:31 +03:00
|
|
|
"node_id": "7c514eac-e305-4fe3-b9d4-35db2558c172",
|
2018-01-08 10:26:44 +02:00
|
|
|
"port_number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HTTP/1.1 201
|
|
|
|
Connection: close
|
|
|
|
Content-Length: 1022
|
|
|
|
Content-Type: application/json
|
2018-06-14 11:39:31 +03:00
|
|
|
Date: Thu, 14 Jun 2018 08:35:14 GMT
|
|
|
|
Server: Python/3.5 GNS3/2.1.8dev1
|
2018-01-08 10:26:44 +02:00
|
|
|
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
|
|
|
|
]
|
|
|
|
},
|
2018-06-14 11:39:31 +03:00
|
|
|
"link_id": "8382d2ec-103b-4255-8073-d6754b2f72fc",
|
2018-01-08 10:26:44 +02:00
|
|
|
"link_type": "ethernet",
|
|
|
|
"nodes": [
|
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
|
|
|
"label": {
|
|
|
|
"text": "Hello",
|
|
|
|
"x": 64,
|
|
|
|
"y": 0
|
|
|
|
},
|
2018-06-14 11:39:31 +03:00
|
|
|
"node_id": "52e2c403-926e-470e-b27c-ae29c659ad72",
|
2018-01-08 10:26:44 +02:00
|
|
|
"port_number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
|
|
|
"label": {
|
|
|
|
"rotation": 0,
|
|
|
|
"style": "font-size: 10; font-style: Verdana",
|
|
|
|
"text": "2/4",
|
|
|
|
"x": -10,
|
|
|
|
"y": -10
|
|
|
|
},
|
2018-06-14 11:39:31 +03:00
|
|
|
"node_id": "7c514eac-e305-4fe3-b9d4-35db2558c172",
|
2018-01-08 10:26:44 +02:00
|
|
|
"port_number": 4
|
|
|
|
}
|
|
|
|
],
|
2018-06-14 11:39:31 +03:00
|
|
|
"project_id": "3f20f6cd-0674-41da-9ed9-36fbf90b87d5",
|
2018-01-08 10:26:44 +02:00
|
|
|
"suspend": false
|
|
|
|
}
|