mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
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:
4 files changed
+61
-3
No files matched your search
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user