From d383ff1c1a7c52efcae767ab866389b507077b35 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Wed, 7 Aug 2024 15:55:01 +0200 Subject: rest: add cache/fetch Add POST cache/fetch request to request download of images in the client's cache. Resquest payload structure: { 'clients': ['10.141.10.21', '10.141.10.22'] 'image': 'windows.img' 'type': 'TIPTORRENT' 'repository': '12.141.10.2' } The clients listed in the 'clients' field will receive a cache/fetch POST request with the payload received by the server without the 'clients' field. The clients respond with the contents of their cache so the server can update the database. --- src/rest.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/rest.h') diff --git a/src/rest.h b/src/rest.h index 61169fe..fea0849 100644 --- a/src/rest.h +++ b/src/rest.h @@ -42,6 +42,7 @@ enum og_cmd_type { OG_CMD_RUN_SCHEDULE, OG_CMD_IMAGES, OG_CMD_CACHE_DELETE, + OG_CMD_CACHE_FETCH, OG_CMD_MAX }; @@ -128,6 +129,7 @@ enum og_rest_uri { OG_URI_IMAGE_RESTRICT, OG_URI_CACHE_LIST, OG_URI_CACHE_DELETE, + OG_URI_CACHE_FETCH, OG_URI_PART_SETUP, OG_URI_RUN_SCHEDULE, OG_URI_TASK_RUN, -- cgit v1.2.3-18-g5258