2018-11-20 09:21:32 +00:00
|
|
|
curl -i -X PUT 'http://localhost:3080/v2/projects/4854a4b1-83bd-43c5-b556-532979f5e45f/links/c939cbf3-c221-472c-84ce-4c4fc41801de' -d '{"filters": {"frequency_drop": [50], "latency": [10]}, "nodes": [{"adapter_number": 0, "label": {"text": "Hello", "x": 64, "y": 0}, "node_id": "047905b7-88ea-40c5-b3c5-917ef5952203", "port_number": 3}, {"adapter_number": 2, "node_id": "52052251-cbea-4740-93d6-aa4f2f3f5784", "port_number": 4}]}'
|
2018-01-08 08:26:44 +00:00
|
|
|
|
2018-11-20 09:21:32 +00:00
|
|
|
PUT /v2/projects/4854a4b1-83bd-43c5-b556-532979f5e45f/links/c939cbf3-c221-472c-84ce-4c4fc41801de HTTP/1.1
|
2018-01-08 08:26:44 +00:00
|
|
|
{
|
|
|
|
"filters": {
|
|
|
|
"frequency_drop": [
|
|
|
|
50
|
|
|
|
],
|
|
|
|
"latency": [
|
|
|
|
10
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"nodes": [
|
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
|
|
|
"label": {
|
|
|
|
"text": "Hello",
|
|
|
|
"x": 64,
|
|
|
|
"y": 0
|
|
|
|
},
|
2018-11-20 09:21:32 +00:00
|
|
|
"node_id": "047905b7-88ea-40c5-b3c5-917ef5952203",
|
2018-01-08 08:26:44 +00:00
|
|
|
"port_number": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"adapter_number": 2,
|
2018-11-20 09:21:32 +00:00
|
|
|
"node_id": "52052251-cbea-4740-93d6-aa4f2f3f5784",
|
2018-01-08 08:26:44 +00:00
|
|
|
"port_number": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HTTP/1.1 201
|
|
|
|
Connection: close
|
|
|
|
Content-Length: 1022
|
|
|
|
Content-Type: application/json
|
2018-11-20 09:21:32 +00:00
|
|
|
Date: Tue, 20 Nov 2018 08:48:32 GMT
|
|
|
|
Server: Python/3.6 GNS3/2.2.0dev5
|
2018-01-08 08:26:44 +00: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-11-20 09:21:32 +00:00
|
|
|
"link_id": "c939cbf3-c221-472c-84ce-4c4fc41801de",
|
2018-01-08 08:26:44 +00:00
|
|
|
"link_type": "ethernet",
|
|
|
|
"nodes": [
|
|
|
|
{
|
|
|
|
"adapter_number": 0,
|
|
|
|
"label": {
|
|
|
|
"text": "Hello",
|
|
|
|
"x": 64,
|
|
|
|
"y": 0
|
|
|
|
},
|
2018-11-20 09:21:32 +00:00
|
|
|
"node_id": "047905b7-88ea-40c5-b3c5-917ef5952203",
|
2018-01-08 08:26:44 +00: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-11-20 09:21:32 +00:00
|
|
|
"node_id": "52052251-cbea-4740-93d6-aa4f2f3f5784",
|
2018-01-08 08:26:44 +00:00
|
|
|
"port_number": 4
|
|
|
|
}
|
|
|
|
],
|
2018-11-20 09:21:32 +00:00
|
|
|
"project_id": "4854a4b1-83bd-43c5-b556-532979f5e45f",
|
2018-01-08 08:26:44 +00:00
|
|
|
"suspend": false
|
|
|
|
}
|