mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
APi for listing VM in controller
This commit is contained in:
6 files changed
+53
-2
No files matched your search
@@ -51,6 +51,17 @@ class ProjectHandler:
|
||||
response.set_status(201)
|
||||
response.json(project)
|
||||
|
||||
@classmethod
|
||||
@Route.get(
|
||||
r"/projects",
|
||||
description="List projects",
|
||||
status_codes={
|
||||
200: "List of projects",
|
||||
})
|
||||
def list_projects(request, response):
|
||||
controller = Controller.instance()
|
||||
response.json([ p for p in controller.projects.values() ])
|
||||
|
||||
@classmethod
|
||||
@Route.get(
|
||||
r"/projects/{project_id}",
|
||||
|
||||
Reference in new issue
Block a user