summaryrefslogtreecommitdiffstats
path: root/src/windows/ogOperations.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-08-08 10:26:06 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-08-09 11:04:56 +0200
commitfe40f9c5d66916cad4cee8d5b2d9e172fc1c0477 (patch)
tree624d4660cef9c2e8efea72d6e0e463d1bd887fb1 /src/windows/ogOperations.py
parent89d711be2a59aba8ba2e6fd1c07bc1ee0d20fe55 (diff)
src: add POST cache/fetch method
Add API REST method to fetch an image. Consolidate image fetch loging for cache/fetch and image/restore. Resquest payload structure: { 'image': 'linux.img' 'type': 'TIPTORRENT' 'repository': '12.141.10.2' } The client will try to fetch'image' from 'repository' into cache. Resquest response structure: { 'cache': [ {'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'}, {'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'} ] }
Diffstat (limited to 'src/windows/ogOperations.py')
-rw-r--r--src/windows/ogOperations.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/windows/ogOperations.py b/src/windows/ogOperations.py
index d0230eb..45413ba 100644
--- a/src/windows/ogOperations.py
+++ b/src/windows/ogOperations.py
@@ -113,6 +113,9 @@ class OgWindowsOperations:
def cache_delete(self, request, ogRest):
raise NotImplementedError
+ def cache_fetch(self, request, ogRest):
+ raise NotImplementedError
+
def refresh(self, ogRest):
return {"status": "WIN"}