mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge branch '2.1' into 2.2
# Conflicts: # gns3server/version.py # requirements.txt
This commit is contained in:
commit
96d5e351f7
235 files changed
+3037
-864
No files matched your search
@@ -307,6 +307,28 @@ class NodeHandler:
|
||||
yield from project.delete_node(request.match_info["node_id"])
|
||||
response.set_status(204)
|
||||
|
||||
@Route.get(
|
||||
r"/projects/{project_id}/nodes/{node_id}/links",
|
||||
parameters={
|
||||
"project_id": "Project UUID",
|
||||
"node_id": "Node UUID"
|
||||
},
|
||||
status_codes={
|
||||
200: "Links returned",
|
||||
400: "Invalid request",
|
||||
404: "Instance doesn't exist"
|
||||
},
|
||||
description="Return all the links connected to this node")
|
||||
def links(request, response):
|
||||
|
||||
project = yield from Controller.instance().get_loaded_project(request.match_info["project_id"])
|
||||
node = project.get_node(request.match_info["node_id"])
|
||||
links = []
|
||||
for link in node.links:
|
||||
links.append(link.__json__())
|
||||
response.json(links)
|
||||
response.set_status(200)
|
||||
|
||||
@Route.get(
|
||||
r"/projects/{project_id}/nodes/{node_id}/dynamips/auto_idlepc",
|
||||
parameters={
|
||||
|
||||
Reference in new issue
Block a user