diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-08-07 15:55:01 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-08-09 10:47:18 +0200 |
commit | d383ff1c1a7c52efcae767ab866389b507077b35 (patch) | |
tree | 52e04f1d31590803514fd65e8e4a1a53962eaea8 /src/client.c | |
parent | 6bc71b201dafd552a46b8e9ab5ee8f1ee5577c17 (diff) |
rest: add cache/fetchv1.2.5-17
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.
Diffstat (limited to 'src/client.c')
-rw-r--r-- | src/client.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |