STOREDIR = 'storage'
NODETYPE = "client"
SUICIDE_PREVENTION_HOTLINE_FILE = "suicide_prevention_hotline"
- PRIVATE_DIRECTORY_URI = "my_private_dir.uri"
+ MY_PRIVATE_DIR_FILE = "my_private_dir.cap"
# we're pretty narrow-minded right now
OLDEST_SUPPORTED_VERSION = allmydata.__version__
def _maybe_create_private_directory(self):
"""
- If 'my_private_dir.uri' exists, then I try to read a mutable
+ If 'my_private_dir.cap' exists, then I try to read a mutable
directory URI from it. If it exists but doesn't contain a well-formed
read-write mutable directory URI, then I create a new mutable
directory and write its URI into that file.
"""
- privdirfile = os.path.join(self.basedir, self.PRIVATE_DIRECTORY_URI)
+ privdirfile = os.path.join(self.basedir, self.MY_PRIVATE_DIR_FILE)
if os.path.exists(privdirfile):
try:
theuri = open(privdirfile, "r").read().strip()
"Look here to find out which Tahoe node should be used for all "
"operations. The directory should either contain a full Tahoe node, "
"or a file named node.url which points to some other Tahoe node. "
- "It should also contain a file named my_private_dir.uri which contains "
+ "It should also contain a file named my_private_dir.cap which contains "
"the root dirnode URI that should be used."
],
["node-url", "u", None,
["root-uri", "r", "private",
"Which dirnode URI should be used as a root directory. The "
"string 'private' is also, and means we should use the "
- "private vdrive as found in the my_private_dir.uri file in the "
+ "private vdrive as found in the my_private_dir.cap file in the "
"--node-directory ."],
]
# also compute self['root-uri']
if self['root-uri'] == "private":
- uri_file = os.path.join(self['node-directory'], "my_private_dir.uri")
+ uri_file = os.path.join(self['node-directory'], "my_private_dir.cap")
self['root-uri'] = open(uri_file, "r").read().strip()
else:
from allmydata import uri
f = open(os.path.join(basedir, "webport"), "w")
f.write(config['webport'] + "\n")
f.close()
- # Create an empty my_private_dir.uri file, indicating that the node
+ # Create an empty my_private_dir.cap file, indicating that the node
# should fill it with the URI after creating the directory.
- open(os.path.join(basedir, "my_private_dir.uri"), "w")
+ open(os.path.join(basedir, "my_private_dir.cap"), "w")
print >>out, "client created in %s" % basedir
print >>out, " please copy introducer.furl into the directory"
filenode_uri = uri.WriteableSSKFileURI(writekey="\x00"*16,
fingerprint="\x00"*32)
private_uri = uri.NewDirectoryURI(filenode_uri).to_string()
- open("cli/test_options/my_private_dir.uri", "w").write(private_uri + "\n")
+ open("cli/test_options/my_private_dir.cap", "w").write(private_uri + "\n")
o = cli.ListOptions()
o.parseOptions(["--node-directory", "cli/test_options"])
self.failUnlessEqual(o['node-url'], "http://localhost:8080/")
if i == 0:
open(os.path.join(basedir, "webport"), "w").write("tcp:0:interface=127.0.0.1")
if self.createprivdir:
- open(os.path.join(basedir, "my_private_dir.uri"), "w")
+ open(os.path.join(basedir, "my_private_dir.cap"), "w")
open(os.path.join(basedir, "introducer.furl"), "w").write(self.introducer_furl)
c = self.add_service(client.Client(basedir=basedir))
self.clients.append(c)