mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Add controller endpoints to get VirtualBox VMs, VMware VMs and Docker images
This commit is contained in:
1 parent
3b7dfe5929
commit
7d49b80e6b
6 files changed
+91
-66
No files matched your search
@@ -620,23 +620,6 @@ class Compute:
|
||||
raise ControllerError(f"Connection lost to {self._id} during {method} {action}")
|
||||
return res.json
|
||||
|
||||
async def images(self, type):
|
||||
"""
|
||||
Return the list of images available for this type on the compute node.
|
||||
"""
|
||||
|
||||
res = await self.http_query("GET", f"/{type}/images", timeout=None)
|
||||
images = res.json
|
||||
|
||||
try:
|
||||
if type in ["qemu", "dynamips", "iou"]:
|
||||
images = sorted(images, key=itemgetter("filename"))
|
||||
else:
|
||||
images = sorted(images, key=itemgetter("image"))
|
||||
except OSError as e:
|
||||
raise ComputeError(f"Cannot list images: {str(e)}")
|
||||
return images
|
||||
|
||||
async def list_files(self, project):
|
||||
"""
|
||||
List files in the project on computes
|
||||
|
||||
Reference in new issue
Block a user