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/client.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/client.c') diff --git a/src/client.c b/src/client.c index ca446d7..d5e0391 100644 --- a/src/client.c +++ b/src/client.c @@ -1110,6 +1110,9 @@ int og_agent_state_process_response(struct og_client *cli) case OG_CMD_CACHE_DELETE: err = og_resp_update_cache(root, cli); break; + case OG_CMD_CACHE_FETCH: + err = og_resp_update_cache(root, cli); + break; default: err = -1; break; -- cgit v1.2.3-18-g5258