Notifications¶
Notifications can be received from the controller, they can be used to update your local data.
Notification endpoints¶
Listen to the HTTP stream endpoint or to the Websocket endpoint.
It is recommended to use the Websocket endpoint.
Available notifications¶
ping¶
Keep-alive between client and controller. Also used to receive the current CPU and memory usage.
{
"compute_id": 12
}
compute.created¶
A compute has been created.
{
"capabilities": {
"node_types": [],
"version": null
},
"compute_id": "my_compute",
"connected": false,
"cpu_usage_percent": null,
"host": "localhost",
"memory_usage_percent": null,
"name": "http://julien@localhost:84",
"port": 84,
"protocol": "http",
"user": "julien"
}
compute.updated¶
A compute has been updated.
{
"capabilities": {
"node_types": [],
"version": null
},
"compute_id": "my_compute_id",
"connected": false,
"cpu_usage_percent": null,
"host": "localhost",
"memory_usage_percent": null,
"name": "http://julien@localhost:84",
"port": 84,
"protocol": "https",
"user": "julien"
}
compute.deleted¶
A compute has been deleted.
{
"capabilities": {
"node_types": [],
"version": null
},
"compute_id": "my_compute_id",
"connected": false,
"cpu_usage_percent": null,
"host": "localhost",
"memory_usage_percent": null,
"name": "http://julien@localhost:84",
"port": 84,
"protocol": "http",
"user": "julien"
}
node.updated¶
A node has been updated.
{
"command_line": "",
"compute_id": "local",
"console": 5006,
"console_host": "127.0.0.1",
"console_type": "telnet",
"first_port_name": null,
"height": 59,
"label": {
"rotation": 0,
"style": "font-family: TypeWriter;font-size: 10;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
"text": "PC2",
"x": 18,
"y": -25
},
"name": "PC2",
"node_directory": "/tmp/pytest-of-grossmj/pytest-23/test_load_project0/project-files/vpcs/748bcd89-624a-40eb-a8d3-1d2e85c99b51",
"node_id": "748bcd89-624a-40eb-a8d3-1d2e85c99b51",
"node_type": "vpcs",
"port_name_format": "Ethernet{0}",
"port_segment_size": 0,
"ports": [
{
"adapter_number": 0,
"data_link_types": {
"Ethernet": "DLT_EN10MB"
},
"link_type": "ethernet",
"name": "Ethernet0",
"port_number": 0,
"short_name": "e0"
}
],
"project_id": "3c1be6f9-b4ba-4737-b209-63c47c23359f",
"properties": {},
"status": "stopped",
"symbol": ":/symbols/computer.svg",
"width": 65,
"x": -71,
"y": -98,
"z": 1
}
node.deleted¶
A node has been deleted.
link.created¶
A link has been created. Note that a link is not connected to any node when it is created.
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"link_id": "c0c00ce2-d6b4-407e-b125-1723c3a8af93",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"rotation": 0,
"style": "font-size: 10; font-style: Verdana",
"text": "0/3",
"x": -10,
"y": -10
},
"node_id": "5fd46ee8-414c-44c0-8bb9-c0e710d8513c",
"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": "22582b05-a01c-4010-9428-34c8c3b9dce0",
"port_number": 4
}
],
"project_id": "7ab38231-b22e-4fd0-aee1-cb41c268c55f",
"suspend": false
}
link.updated¶
A link has been updated.
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {
"frequency_drop": [
50
],
"latency": [
10
]
},
"link_id": "8382d2ec-103b-4255-8073-d6754b2f72fc",
"link_type": "ethernet",
"nodes": [
{
"adapter_number": 0,
"label": {
"text": "Hello",
"x": 64,
"y": 0
},
"node_id": "52e2c403-926e-470e-b27c-ae29c659ad72",
"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": "7c514eac-e305-4fe3-b9d4-35db2558c172",
"port_number": 4
}
],
"project_id": "3f20f6cd-0674-41da-9ed9-36fbf90b87d5",
"suspend": false
}
link.deleted¶
A link has been deleted.
{
"capture_file_name": null,
"capture_file_path": null,
"capturing": false,
"filters": {},
"link_id": "10456b36-5917-4992-a1c0-d2e07a56f2a2",
"link_type": "ethernet",
"nodes": [],
"project_id": "e2cf6437-055d-49f0-bcc6-5026d5a795d6",
"suspend": false
}
drawing.created¶
A drawing has been created.
{
"drawing_id": "510703c2-6ba8-47d5-bcbf-20a3fe6790af",
"project_id": "972df51a-85cc-4762-bb3f-f03bd52d7b2c",
"rotation": 0,
"svg": "<svg height=\"210\" width=\"500\"><line x1=\"0\" y1=\"0\" x2=\"200\" y2=\"200\" style=\"stroke:rgb(255,0,0);stroke-width:2\" /></svg>",
"x": 10,
"y": 20,
"z": 0
}
drawing.updated¶
A drawing has been updated. The svg field is only included if it has changed in order to reduce data transfer.
{
"drawing_id": "5f9c48be-d144-4666-a66f-5bc6d93e2f32",
"project_id": "600de23c-5af1-44a1-8c67-3023ceb6e6c7",
"rotation": 0,
"x": 42,
"y": 20,
"z": 0
}
drawing.deleted¶
A drawing has been deleted.
{
"drawing_id": "7447cc2c-18fb-4db7-87a7-11b81ebd036d",
"project_id": "74c2978e-03fe-4873-ac04-433fb93cb2b0",
"rotation": 0,
"svg": "<svg></svg>",
"x": 0,
"y": 0,
"z": 0
}
project.updated¶
A project has been updated.
{
"auto_close": true,
"auto_open": false,
"auto_start": false,
"filename": "test.gns3",
"grid_size": 0,
"name": "test2",
"path": "/tmp/tmpos2k9l46/projects/10010203-0405-0607-0809-0a0b0c0d0e0f",
"project_id": "10010203-0405-0607-0809-0a0b0c0d0e0f",
"scene_height": 1000,
"scene_width": 2000,
"show_grid": false,
"show_interface_labels": false,
"show_layers": false,
"snap_to_grid": false,
"status": "opened",
"supplier": null,
"variables": [
{
"name": "TEST1"
},
{
"name": "TEST2",
"value": "value1"
}
],
"zoom": 100
}
project.closed¶
A project has been closed.
{
"auto_close": true,
"auto_open": false,
"auto_start": false,
"filename": "test.gns3",
"grid_size": 0,
"name": "test",
"path": "/tmp/tmpirgd0q7l/projects/2010428c-85a1-4416-b018-69ae822e297b",
"project_id": "2010428c-85a1-4416-b018-69ae822e297b",
"scene_height": 1000,
"scene_width": 2000,
"show_grid": false,
"show_interface_labels": false,
"show_layers": false,
"snap_to_grid": false,
"status": "closed",
"supplier": null,
"variables": null,
"zoom": 100
}
snapshot.restored¶
A snapshot has been restored
settings.updated¶
GUI settings have been updated. Will be removed in a later release.
{
"modification_uuid": "c8a68ba6-b99c-491d-b12b-9ff4089f04ac",
"test": true
}