api: add endpoint serving the project .gns3 topology file

GET /v3/projects/{project_id}/gns3file returns the raw .gns3 file as
application/json so the WebUI can render topology thumbnails without
opening the project. Adds a public Project.topology_file property.
This commit is contained in:
YueGuobin committed 2026-08-24 22:19:09 +08:00
1 parent 9a0501936c
commit 1649fb7b7a
4 files changed
+61 -3

No files matched your search

+8
View File
@@ -1685,6 +1685,14 @@ class Project:
def _topology_file(self):
return os.path.join(self.path, self._filename)
@property
def topology_file(self):
"""
Absolute path of the .gns3 topology file
"""
return self._topology_file()
@locking
async def open(self, auto_start=True):
"""