summaryrefslogtreecommitdiff
path: root/subplot
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-03-12 07:52:05 +0200
committerLars Wirzenius <liw@liw.fi>2022-03-13 08:55:48 +0200
commit29e68de7973f2b294c50b7d33ef216a8f095b9f9 (patch)
tree4103f4c460d0db422b999b4f19097cd489b2a6ca /subplot
parent5e79c4f9b3e5789d1d40c2144ba6c3b6a868dae7 (diff)
downloadobnam2-29e68de7973f2b294c50b7d33ef216a8f095b9f9.tar.gz
feat! rename metadata field "sha256" to "label"
The field still contains a cleartext SHa256 of the cleartext chunk data, but this makes it clearer that it may contain other data. This is a breaking change: the server API won't work with an old client, and the new client won't work with an old server. To avoid the breakage would require more effort than is warranted at this time, given the very small number of users of Obnam. Sorry. Sponsored-by: author
Diffstat (limited to 'subplot')
-rw-r--r--subplot/server.py4
-rw-r--r--subplot/server.yaml4
2 files changed, 4 insertions, 4 deletions
diff --git a/subplot/server.py b/subplot/server.py
index 2a3e397..de63836 100644
--- a/subplot/server.py
+++ b/subplot/server.py
@@ -69,8 +69,8 @@ def get_chunk_by_id(ctx, chunk_id=None):
_request(ctx, requests.get, url)
-def find_chunks_with_sha(ctx, sha=None):
- url = f"{ctx['server_url']}/chunks?sha256={sha}"
+def find_chunks_with_label(ctx, sha=None):
+ url = f"{ctx['server_url']}/chunks?label={sha}"
_request(ctx, requests.get, url)
diff --git a/subplot/server.yaml b/subplot/server.yaml
index faf8f49..7b7d461 100644
--- a/subplot/server.yaml
+++ b/subplot/server.yaml
@@ -31,11 +31,11 @@
python:
function: get_chunk_by_id
-- when: "I GET /chunks?sha256={sha}"
+- when: "I GET /chunks?label={sha}"
regex: false
impl:
python:
- function: find_chunks_with_sha
+ function: find_chunks_with_label
- when: "I DELETE /chunks/<{var}>"
impl: