From 8de2b785a9be79f9cc0caa0011293f95a42d4d31 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 23 May 2024 11:17:35 +0200 Subject: src: add POST cache/delete method Add API REST method to delete cache contents. Resquest payload structure: { 'images': ['windows.img', 'linux.img'] } The client will try to delete as many images in cache as available with names matching the list of filenames in the 'images' field. Resquest response structure: { 'cache': [ {'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'}, {'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'} ] } --- src/virtual/ogOperations.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/virtual') diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py index 3cfe83a..2b69fd1 100644 --- a/src/virtual/ogOperations.py +++ b/src/virtual/ogOperations.py @@ -458,6 +458,9 @@ class OgVirtualOperations: return True + def cache_delete(self, request, ogRest): + raise NotImplementedError + def software(self, request, path, ogRest): DPKG_PATH = '/var/lib/dpkg/status' -- cgit v1.2.3-18-g5258