summaryrefslogtreecommitdiff
path: root/tools/merge.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2015-08-20 17:35:25 +0200
committerLinus Nordberg <linus@nordu.net>2015-08-20 17:35:25 +0200
commit03b95596ecc425cfbb0d29d40ba9accbc9e67729 (patch)
tree500fc13e4f7731444b80bef5e93570dea21f36cd /tools/merge.py
parentb9694d350c5a9db0730772334b65b13532eec545 (diff)
Follow internal HTTP API URL changes.internal-api
Diffstat (limited to 'tools/merge.py')
-rwxr-xr-xtools/merge.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/merge.py b/tools/merge.py
index f02ce39..2065a2d 100755
--- a/tools/merge.py
+++ b/tools/merge.py
@@ -83,7 +83,7 @@ def fsync_logorder():
def get_new_entries(node, baseurl):
try:
- result = http_request(baseurl + "ct/storage/fetchnewentries", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
+ result = http_request(baseurl + "plop/v1/storage/fetchnewentries", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
parsed_result = json.loads(result)
if parsed_result.get(u"result") == u"ok":
return [base64.b64decode(entry) for entry in parsed_result[u"entries"]]
@@ -96,7 +96,7 @@ def get_new_entries(node, baseurl):
def get_entries(node, baseurl, hashes):
try:
params = urllib.urlencode({"hash":[base64.b64encode(hash) for hash in hashes]}, doseq=True)
- result = http_request(baseurl + "ct/storage/getentry?" + params, key=own_key, verifynode=node, publickeydir=paths["publickeys"])
+ result = http_request(baseurl + "plop/v1/storage/getentry?" + params, key=own_key, verifynode=node, publickeydir=paths["publickeys"])
parsed_result = json.loads(result)
if parsed_result.get(u"result") == u"ok":
entries = dict([(base64.b64decode(entry["hash"]), base64.b64decode(entry["entry"])) for entry in parsed_result[u"entries"]])
@@ -111,7 +111,7 @@ def get_entries(node, baseurl, hashes):
def get_curpos(node, baseurl):
try:
- result = http_request(baseurl + "ct/frontend/currentposition", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
+ result = http_request(baseurl + "plop/v1/frontend/currentposition", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
parsed_result = json.loads(result)
if parsed_result.get(u"result") == u"ok":
return parsed_result[u"position"]
@@ -123,7 +123,7 @@ def get_curpos(node, baseurl):
def get_verifiedsize(node, baseurl):
try:
- result = http_request(baseurl + "catlfish/merge/verifiedsize", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
+ result = http_request(baseurl + "plop/v1/merge/verifiedsize", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
parsed_result = json.loads(result)
if parsed_result.get(u"result") == u"ok":
return parsed_result[u"size"]
@@ -137,7 +137,7 @@ def get_verifiedsize(node, baseurl):
def sendlog(node, baseurl, submission):
try:
- result = http_request(baseurl + "ct/frontend/sendlog",
+ result = http_request(baseurl + "plop/v1/frontend/sendlog",
json.dumps(submission), key=own_key, verifynode=node, publickeydir=paths["publickeys"])
return json.loads(result)
except urllib2.HTTPError, e:
@@ -155,7 +155,7 @@ def sendlog(node, baseurl, submission):
def backup_sendlog(node, baseurl, submission):
try:
- result = http_request(baseurl + "catlfish/merge/sendlog",
+ result = http_request(baseurl + "plop/v1/merge/sendlog",
json.dumps(submission), key=own_key, verifynode=node, publickeydir=paths["publickeys"])
return json.loads(result)
except urllib2.HTTPError, e:
@@ -173,7 +173,7 @@ def backup_sendlog(node, baseurl, submission):
def sendentry(node, baseurl, entry, hash):
try:
- result = http_request(baseurl + "ct/frontend/sendentry",
+ result = http_request(baseurl + "plop/v1/frontend/sendentry",
json.dumps({"entry":base64.b64encode(entry), "treeleafhash":base64.b64encode(hash)}), key=own_key,
verifynode=node, publickeydir=paths["publickeys"])
return json.loads(result)
@@ -191,7 +191,7 @@ def sendentry(node, baseurl, entry, hash):
def sendentry_merge(node, baseurl, entry, hash):
try:
- result = http_request(baseurl + "catlfish/merge/sendentry",
+ result = http_request(baseurl + "plop/v1/merge/sendentry",
json.dumps({"entry":base64.b64encode(entry), "treeleafhash":base64.b64encode(hash)}), key=own_key,
verifynode=node, publickeydir=paths["publickeys"])
return json.loads(result)
@@ -209,7 +209,7 @@ def sendentry_merge(node, baseurl, entry, hash):
def sendsth(node, baseurl, submission):
try:
- result = http_request(baseurl + "ct/frontend/sendsth",
+ result = http_request(baseurl + "plop/v1/frontend/sendsth",
json.dumps(submission), key=own_key, verifynode=node, publickeydir=paths["publickeys"])
return json.loads(result)
except urllib2.HTTPError, e:
@@ -226,7 +226,7 @@ def sendsth(node, baseurl, submission):
def verifyroot(node, baseurl, treesize):
try:
- result = http_request(baseurl + "catlfish/merge/verifyroot",
+ result = http_request(baseurl + "plop/v1/merge/verifyroot",
json.dumps({"tree_size":treesize}), key=own_key, verifynode=node, publickeydir=paths["publickeys"])
return json.loads(result)
except urllib2.HTTPError, e:
@@ -243,7 +243,7 @@ def verifyroot(node, baseurl, treesize):
def setverifiedsize(node, baseurl, treesize):
try:
- result = http_request(baseurl + "catlfish/merge/setverifiedsize",
+ result = http_request(baseurl + "plop/v1/merge/setverifiedsize",
json.dumps({"size":treesize}), key=own_key, verifynode=node, publickeydir=paths["publickeys"])
return json.loads(result)
except urllib2.HTTPError, e:
@@ -260,7 +260,7 @@ def setverifiedsize(node, baseurl, treesize):
def get_missingentries(node, baseurl):
try:
- result = http_request(baseurl + "ct/frontend/missingentries", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
+ result = http_request(baseurl + "plop/v1/frontend/missingentries", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
parsed_result = json.loads(result)
if parsed_result.get(u"result") == u"ok":
return parsed_result[u"entries"]
@@ -272,7 +272,7 @@ def get_missingentries(node, baseurl):
def get_missingentriesforbackup(node, baseurl):
try:
- result = http_request(baseurl + "catlfish/merge/missingentries", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
+ result = http_request(baseurl + "plop/v1/merge/missingentries", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
parsed_result = json.loads(result)
if parsed_result.get(u"result") == u"ok":
return parsed_result[u"entries"]