mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Return compute port information via API. Ref #1420.
This commit is contained in:
1 parent
eb97ebf311
commit
22f7ca0243
5 files changed
+98
-2
No files matched your search
@@ -769,3 +769,15 @@ class Controller:
|
||||
yield from project.delete()
|
||||
self.remove_project(project)
|
||||
return res
|
||||
|
||||
@asyncio.coroutine
|
||||
def compute_ports(self, compute_id):
|
||||
"""
|
||||
Get the ports used by a compute.
|
||||
|
||||
:param compute_id: ID of the compute
|
||||
"""
|
||||
|
||||
compute = self.get_compute(compute_id)
|
||||
response = yield from compute.get("/network/ports")
|
||||
return response.json
|
||||
Reference in new issue
Block a user