]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
rename "my_private_dir.uri" to "my_private_dir.cap"
authorZooko O'Whielacronx <zooko@zooko.com>
Tue, 18 Dec 2007 01:35:25 +0000 (18:35 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Tue, 18 Dec 2007 01:35:25 +0000 (18:35 -0700)
src/allmydata/client.py
src/allmydata/scripts/cli.py
src/allmydata/scripts/create_node.py
src/allmydata/test/test_cli.py
src/allmydata/test/test_system.py

index 7bf9bf3f98a8fa9831916d1226770c85f4296334..41be23de87df8d51f0b7886be663637a211be916 100644 (file)
@@ -30,7 +30,7 @@ class Client(node.Node, Referenceable, testutil.PollMixin):
     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__
@@ -115,12 +115,12 @@ class Client(node.Node, Referenceable, testutil.PollMixin):
 
     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()
index 6d03b758ed2e9a5aa569183760407a0151c3af60..b14f08beb6a0c6bac58be7743286e98d28934cad 100644 (file)
@@ -11,7 +11,7 @@ class VDriveOptions(BaseOptions, usage.Options):
          "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,
@@ -20,7 +20,7 @@ class VDriveOptions(BaseOptions, usage.Options):
         ["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 ."],
         ]
 
@@ -41,7 +41,7 @@ class VDriveOptions(BaseOptions, usage.Options):
 
         # 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
index 7423925d6fd459054a07925ec4615cd67404cedd..541041f0f354035c92226188d737cfdc72e726da 100644 (file)
@@ -56,9 +56,9 @@ def create_client(basedir, config, out=sys.stdout, err=sys.stderr):
         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"
 
index 71550fa9e35cbc95b5e734a742f4da655c084d91..1b4375ef4b99af9b092350b11543d895154897d6 100644 (file)
@@ -20,7 +20,7 @@ class CLI(unittest.TestCase):
         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/")
index e9e7ad50fea9b1cee40e66d391cb60b6437a4710..ea928108950fb08d983d2b45855d0b370868cff1 100644 (file)
@@ -70,7 +70,7 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase):
             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)