import os, sys
-from allmydata.scripts.common import BasedirMixin, BaseOptions
+from allmydata.scripts.common import BasedirOptions
from allmydata.util.assertutil import precondition
from allmydata.util.encodingutil import listdir_unicode, argv_to_unicode, quote_output
import allmydata
-class CreateClientOptions(BasedirMixin, BaseOptions):
+class CreateClientOptions(BasedirOptions):
optParameters = [
# we provide 'create-node'-time options for the most common
# configuration knobs. The rest can be controlled by editing
"Specify which TCP port to run the HTTP interface on. Use 'none' to disable."),
]
+ def getSynopsis(self):
+ return "Usage: %s create-client [options] [NODEDIR]" % (self.command_name,)
+
+
class CreateNodeOptions(CreateClientOptions):
optFlags = [
("no-storage", None, "Do not offer storage service to other nodes."),
]
-class CreateIntroducerOptions(BasedirMixin, BaseOptions):
+ def getSynopsis(self):
+ return "Usage: %s create-node [options] [NODEDIR]" % (self.command_name,)
+
+
+class CreateIntroducerOptions(BasedirOptions):
default_nodedir = None
- optParameters = [
- ["node-directory", "d", None, "Specify which directory the introducer should be created in. [no default]"],
- ]
+ def getSynopsis(self):
+ return "Usage: %s create-introducer [options] NODEDIR" % (self.command_name,)
+
client_tac = """
# -*- python -*-
c.write("enabled = false\n")
c.write("\n")
+ c.write("[drop_upload]\n")
+ c.write("# Shall this node automatically upload files created or modified in a local directory?\n")
+ c.write("enabled = false\n")
+ c.write("# To specify the target of uploads, a mutable directory writecap URI must be placed\n"
+ "# in 'private/drop_upload_dircap'.\n")
+ c.write("local.directory = ~/drop_upload\n")
+ c.write("\n")
+
c.close()
from allmydata.util import fileutil