summaryrefslogtreecommitdiffstats
path: root/src/rest.h
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-23 16:20:41 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-30 11:16:25 +0200
commit111f077d17737ffa7367a7a4af7b32336d15e05e (patch)
tree3ca939e07c7f579022aa2bee1efb63902f1d62db /src/rest.h
parent6666aba8b7063d4475636336d7798a30c26dde92 (diff)
rest: add cache/delete
Add POST cache/delete request to request deletion of images in the client's cache. Resquest payload structure: { 'clients': ['10.141.10.21', '10.141.10.22'] 'images': ['windows.img', 'linux.img'] } The clients listed in the 'clients' field will receive a cache/delete POST request with the 'clients' field removed and only containing 'images' from the payload received by the server. Each client will try to delete as many images as available in their cache from the list of files in 'images'. The clients will give response with the contents of the cache so the server can update the database.
Diffstat (limited to 'src/rest.h')
-rw-r--r--src/rest.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rest.h b/src/rest.h
index fbe0e43..1c5cc47 100644
--- a/src/rest.h
+++ b/src/rest.h
@@ -40,6 +40,7 @@ enum og_cmd_type {
OG_CMD_SETUP,
OG_CMD_RUN_SCHEDULE,
OG_CMD_IMAGES,
+ OG_CMD_CACHE_DELETE,
OG_CMD_MAX
};
@@ -117,6 +118,7 @@ enum og_rest_uri {
OG_URI_IMAGE_RESTORE,
OG_URI_IMAGE_DELETE,
OG_URI_CACHE_LIST,
+ OG_URI_CACHE_DELETE,
OG_URI_PART_SETUP,
OG_URI_RUN_SCHEDULE,
OG_URI_TASK_RUN,