Skip to content
Snippets Groups Projects
Commit e037e725 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

explain the purpose of each of these

parent 11dbcc71
No related branches found
No related tags found
1 merge request!10End-to-end with ristretto
#!/usr/bin/env python3
#
# Create a new file via the web interface of a Tahoe-LAFS client node and then
# retrieve the contents of that file. Exit with success if the retrieved
# contents match what was uploaded originally.
#
from sys import argv
from os import urandom
from subprocess import check_output
......@@ -23,11 +29,13 @@ def get_api_root(path):
with open(path + u"/node.url") as f:
return f.read().strip()
def put(api_root, data):
response = requests.put(api_root + u"uri", BytesIO(data))
response.raise_for_status()
return response.text
def get(api_root, cap):
response = requests.get(api_root + u"uri/" + cap, stream=True)
response.raise_for_status()
......
#!/usr/bin/env python3
#
# Get a paid voucher and tell the Tahoe-LAFS client node to redeem it for some
# ZKAPs from an issuer. Exit with success when the Tahoe-LAFS client node
# reports that the voucher has been redeemed.
#
from sys import argv
from requests import post, get, put
from json import dumps
......
#!/usr/bin/env python3
#
# Create a PrivateStorage.io-enabled Tahoe-LAFS client node and run it as a
# daemon. Exit with success when we think we've started it.
#
from os import environ
from sys import argv
from shutil import which
......
#!/usr/bin/env python3
#
# Create a Tahoe-LAFS introducer node and run it as a daemon. Exit with
# success when it is accepting introducer client connections.
#
from sys import argv
from os import environ, makedirs, rename
from shutil import which
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment