mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge branch '3.1' into api-issue-05-2xftmd
This commit is contained in:
46 files changed
+2108
-210
No files matched your search
@@ -757,7 +757,9 @@ class Project:
|
||||
try:
|
||||
return self._nodes[node_id]
|
||||
except KeyError:
|
||||
raise ControllerNotFoundError(f"Node ID {node_id} doesn't exist")
|
||||
raise ControllerNotFoundError(
|
||||
f"Node ID {node_id} doesn't exist", code="node_not_found", details={"node_id": node_id}
|
||||
)
|
||||
|
||||
def _get_closed_data(self, section, id_key):
|
||||
"""
|
||||
@@ -826,7 +828,9 @@ class Project:
|
||||
try:
|
||||
return self._drawings[drawing_id]
|
||||
except KeyError:
|
||||
raise ControllerNotFoundError(f"Drawing ID {drawing_id} doesn't exist")
|
||||
raise ControllerNotFoundError(
|
||||
f"Drawing ID {drawing_id} doesn't exist", code="drawing_not_found", details={"drawing_id": drawing_id}
|
||||
)
|
||||
|
||||
@open_required
|
||||
async def delete_drawing(self, drawing_id):
|
||||
@@ -1110,7 +1114,9 @@ class Project:
|
||||
try:
|
||||
return self._links[link_id]
|
||||
except KeyError:
|
||||
raise ControllerNotFoundError(f"Link ID {link_id} doesn't exist")
|
||||
raise ControllerNotFoundError(
|
||||
f"Link ID {link_id} doesn't exist", code="link_not_found", details={"link_id": link_id}
|
||||
)
|
||||
|
||||
@property
|
||||
def links(self):
|
||||
@@ -1471,7 +1477,11 @@ class Project:
|
||||
try:
|
||||
return self._snapshots[snapshot_id]
|
||||
except KeyError:
|
||||
raise ControllerNotFoundError(f"Snapshot ID {snapshot_id} doesn't exist")
|
||||
raise ControllerNotFoundError(
|
||||
f"Snapshot ID {snapshot_id} doesn't exist",
|
||||
code="snapshot_not_found",
|
||||
details={"snapshot_id": snapshot_id},
|
||||
)
|
||||
|
||||
def _load_snapshot_config(self):
|
||||
|
||||
|
||||
Reference in new issue
Block a user