class GenerateKeypairOptions(BaseOptions):
def getSynopsis(self):
- return "Usage: tahoe admin generate-keypair"
+ return "Usage: tahoe [global-opts] admin generate-keypair"
def getUsage(self, width=None):
t = BaseOptions.getUsage(self, width)
self.privkey = privkey
def getSynopsis(self):
- return "Usage: tahoe admin derive-pubkey PRIVKEY"
+ return "Usage: tahoe [global-opts] admin derive-pubkey PRIVKEY"
def getUsage(self, width=None):
t = BaseOptions.getUsage(self, width)
if not hasattr(self, 'subOptions'):
raise usage.UsageError("must specify a subcommand")
def getSynopsis(self):
- return "Usage: tahoe admin SUBCOMMAND"
+ return "Usage: tahoe [global-opts] admin SUBCOMMAND"
def getUsage(self, width=None):
t = BaseOptions.getUsage(self, width)
t += """
raise usage.UsageError("%s is an invalid format" % self['format'])
def getSynopsis(self):
- return "Usage: %s mkdir [options] [REMOTE_DIR]" % (self.command_name,)
+ return "Usage: %s [global-opts] mkdir [options] [REMOTE_DIR]" % (self.command_name,)
longdesc = """Create a new directory, either unlinked or as a subdirectory."""
self.cap = cap
def getSynopsis(self):
- return "Usage: %s add-alias [options] ALIAS[:] DIRCAP" % (self.command_name,)
+ return "Usage: %s [global-opts] add-alias [options] ALIAS[:] DIRCAP" % (self.command_name,)
longdesc = """Add a new alias for an existing directory."""
self.alias = self.alias[:-1]
def getSynopsis(self):
- return "Usage: %s create-alias [options] ALIAS[:]" % (self.command_name,)
+ return "Usage: %s [global-opts] create-alias [options] ALIAS[:]" % (self.command_name,)
longdesc = """Create a new directory and add an alias for it."""
class ListAliasesOptions(FilesystemOptions):
def getSynopsis(self):
- return "Usage: %s list-aliases [options]" % (self.command_name,)
+ return "Usage: %s [global-opts] list-aliases [options]" % (self.command_name,)
longdesc = """Display a table of all configured aliases."""
self.to_file = None
def getSynopsis(self):
- return "Usage: %s get [options] REMOTE_FILE LOCAL_FILE" % (self.command_name,)
+ return "Usage: %s [global-opts] get [options] REMOTE_FILE LOCAL_FILE" % (self.command_name,)
longdesc = """
Retrieve a file from the grid and write it to the local filesystem. If
raise usage.UsageError("%s is an invalid format" % self['format'])
def getSynopsis(self):
- return "Usage: %s put [options] LOCAL_FILE REMOTE_FILE" % (self.command_name,)
+ return "Usage: %s [global-opts] put [options] LOCAL_FILE REMOTE_FILE" % (self.command_name,)
longdesc = """
Put a file into the grid, copying its contents from the local filesystem.
self.destination = argv_to_unicode(args[-1])
def getSynopsis(self):
- return "Usage: %s cp [options] FROM.. TO" % (self.command_name,)
+ return "Usage: %s [global-opts] cp [options] FROM.. TO" % (self.command_name,)
longdesc = """
Use 'tahoe cp' to copy files between a local filesystem and a Tahoe grid.
self.where = argv_to_unicode(where)
def getSynopsis(self):
- return "Usage: %s unlink [options] REMOTE_FILE" % (self.command_name,)
+ return "Usage: %s [global-opts] unlink [options] REMOTE_FILE" % (self.command_name,)
class RmOptions(UnlinkOptions):
def getSynopsis(self):
- return "Usage: %s rm [options] REMOTE_FILE" % (self.command_name,)
+ return "Usage: %s [global-opts] rm [options] REMOTE_FILE" % (self.command_name,)
class MvOptions(FilesystemOptions):
def parseArgs(self, frompath, topath):
self.to_file = argv_to_unicode(topath)
def getSynopsis(self):
- return "Usage: %s mv [options] FROM TO" % (self.command_name,)
+ return "Usage: %s [global-opts] mv [options] FROM TO" % (self.command_name,)
longdesc = """
Use 'tahoe mv' to move files that are already on the grid elsewhere on
self.to_file = argv_to_unicode(topath)
def getSynopsis(self):
- return "Usage: %s ln [options] FROM_LINK TO_LINK" % (self.command_name,)
+ return "Usage: %s [global-opts] ln [options] FROM_LINK TO_LINK" % (self.command_name,)
longdesc = """
Use 'tahoe ln' to duplicate a link (directory entry) already on the grid
self.to_dir = argv_to_unicode(topath)
def getSynopsis(self):
- return "Usage: %s backup [options] FROM ALIAS:TO" % (self.command_name,)
+ return "Usage: %s [global-opts] backup [options] FROM ALIAS:TO" % (self.command_name,)
def opt_exclude(self, pattern):
"""Ignore files matching a glob pattern. You may give multiple
self.where = argv_to_unicode(where)
def getSynopsis(self):
- return "Usage: %s webopen [options] [ALIAS:PATH]" % (self.command_name,)
+ return "Usage: %s [global-opts] webopen [options] [ALIAS:PATH]" % (self.command_name,)
longdesc = """Open a web browser to the contents of some file or
directory on the grid. When run without arguments, open the Welcome
self.where = argv_to_unicode(where)
def getSynopsis(self):
- return "Usage: %s manifest [options] [ALIAS:PATH]" % (self.command_name,)
+ return "Usage: %s [global-opts] manifest [options] [ALIAS:PATH]" % (self.command_name,)
longdesc = """Print a list of all files and directories reachable from
the given starting point."""
self.where = argv_to_unicode(where)
def getSynopsis(self):
- return "Usage: %s stats [options] [ALIAS:PATH]" % (self.command_name,)
+ return "Usage: %s [global-opts] stats [options] [ALIAS:PATH]" % (self.command_name,)
longdesc = """Print statistics about of all files and directories
reachable from the given starting point."""
self.where = argv_to_unicode(where)
def getSynopsis(self):
- return "Usage: %s check [options] [ALIAS:PATH]" % (self.command_name,)
+ return "Usage: %s [global-opts] check [options] [ALIAS:PATH]" % (self.command_name,)
longdesc = """
Check a single file or directory: count how many shares are available and
self.where = argv_to_unicode(where)
def getSynopsis(self):
- return "Usage: %s deep-check [options] [ALIAS:PATH]" % (self.command_name,)
+ return "Usage: %s [global-opts] deep-check [options] [ALIAS:PATH]" % (self.command_name,)
longdesc = """
Check all files and directories reachable from the given starting point
]
def getSynopsis(self):
- return "Usage: %s create-client [options] [NODEDIR]" % (self.command_name,)
+ return "Usage: %s [global-opts] create-client [options] [NODEDIR]" % (self.command_name,)
class CreateNodeOptions(CreateClientOptions):
]
def getSynopsis(self):
- return "Usage: %s create-node [options] [NODEDIR]" % (self.command_name,)
+ return "Usage: %s [global-opts] create-node [options] [NODEDIR]" % (self.command_name,)
class CreateIntroducerOptions(BasedirOptions):
default_nodedir = None
def getSynopsis(self):
- return "Usage: %s create-introducer [options] NODEDIR" % (self.command_name,)
+ return "Usage: %s [global-opts] create-introducer [options] NODEDIR" % (self.command_name,)
client_tac = """
class DumpOptions(BaseOptions):
def getSynopsis(self):
- return "Usage: tahoe debug dump-share SHARE_FILENAME"
+ return "Usage: tahoe [global-opts] debug dump-share SHARE_FILENAME"
optFlags = [
["offsets", None, "Display a table of section offsets."],
class DumpCapOptions(BaseOptions):
def getSynopsis(self):
- return "Usage: tahoe debug dump-cap [options] FILECAP"
+ return "Usage: tahoe [global-opts] debug dump-cap [options] FILECAP"
optParameters = [
["nodeid", "n",
None, "Specify the storage server nodeid (ASCII), to construct WE and secrets."],
class FindSharesOptions(BaseOptions):
def getSynopsis(self):
- return "Usage: tahoe debug find-shares STORAGE_INDEX NODEDIRS.."
+ return "Usage: tahoe [global-opts] debug find-shares STORAGE_INDEX NODEDIRS.."
def parseArgs(self, storage_index_s, *nodedirs):
from allmydata.util.encodingutil import argv_to_abspath
raise usage.UsageError("must specify at least one node directory")
def getSynopsis(self):
- return "Usage: tahoe debug catalog-shares NODEDIRS.."
+ return "Usage: tahoe [global-opts] debug catalog-shares NODEDIRS.."
def getUsage(self, width=None):
t = BaseOptions.getUsage(self, width)
class CorruptShareOptions(BaseOptions):
def getSynopsis(self):
- return "Usage: tahoe debug corrupt-share SHARE_FILENAME"
+ return "Usage: tahoe [global-opts] debug corrupt-share SHARE_FILENAME"
optParameters = [
["offset", "o", "block-random", "Specify which bit to flip."],
class ReplOptions(BaseOptions):
def getSynopsis(self):
- return "Usage: tahoe debug repl"
+ return "Usage: tahoe [global-opts] debug repl"
def repl(options):
import code
class TrialOptions(twisted_trial.Options):
def getSynopsis(self):
- return "Usage: tahoe debug trial [options] [[file|package|module|TestCase|testmethod]...]"
+ return "Usage: tahoe [global-opts] debug trial [options] [[file|package|module|TestCase|testmethod]...]"
def parseOptions(self, all_subargs, *a, **kw):
self.trial_args = list(all_subargs)
t = OptionsClass.getSynopsis(self)
i = t.find("Usage: flogtool ")
if i >= 0:
- return "Usage: tahoe debug flogtool " + t[i+len("Usage: flogtool "):]
+ return "Usage: tahoe [global-opts] debug flogtool " + t[i+len("Usage: flogtool "):]
else:
- return "Usage: tahoe debug flogtool %s [options]" % (subcmd,)
+ return "Usage: tahoe [global-opts] debug flogtool %s [options]" % (subcmd,)
return (subcmd, shortcut, FixedOptionsClass, desc)
class FlogtoolOptions(foolscap_cli.Options):
self.subCommands = map(fixOptionsClass, self.subCommands)
def getSynopsis(self):
- return "Usage: tahoe debug flogtool (%s) [command options]" % ("|".join([x[0] for x in self.subCommands]))
+ return "Usage: tahoe [global-opts] debug flogtool (%s) [command options]" % ("|".join([x[0] for x in self.subCommands]))
def parseOptions(self, all_subargs, *a, **kw):
self.flogtool_args = list(all_subargs)
default_nodedir = None
def getSynopsis(self):
- return "Usage: %s create-key-generator [options] NODEDIR" % (self.command_name,)
+ return "Usage: %s [global-opts] create-key-generator [options] NODEDIR" % (self.command_name,)
keygen_tac = """
self.no_command_needed = True
def getSynopsis(self):
- return "\nUsage: tahoe [global-options] <command> [command-options]"
+ return "\nUsage: tahoe [global-opts] <command> [command-options]"
def getUsage(self, **kwargs):
t = usage.Options.getUsage(self, **kwargs)
]
def getSynopsis(self):
- return "Usage: %s start [options] [NODEDIR]" % (self.command_name,)
+ return "Usage: %s [global-opts] start [options] [NODEDIR]" % (self.command_name,)
class StopOptions(BasedirOptions):
def getSynopsis(self):
- return "Usage: %s stop [options] [NODEDIR]" % (self.command_name,)
+ return "Usage: %s [global-opts] stop [options] [NODEDIR]" % (self.command_name,)
class RestartOptions(BasedirOptions):
]
def getSynopsis(self):
- return "Usage: %s restart [options] [NODEDIR]" % (self.command_name,)
+ return "Usage: %s [global-opts] restart [options] [NODEDIR]" % (self.command_name,)
class RunOptions(BasedirOptions):
default_nodedir = u"."
def getSynopsis(self):
- return "Usage: %s run [options] [NODEDIR]" % (self.command_name,)
+ return "Usage: %s [global-opts] run [options] [NODEDIR]" % (self.command_name,)
def start(opts, out=sys.stdout, err=sys.stderr):
default_nodedir = None
def getSynopsis(self):
- return "Usage: %s create-stats-gatherer [options] NODEDIR" % (self.command_name,)
+ return "Usage: %s [global-opts] create-stats-gatherer [options] NODEDIR" % (self.command_name,)
stats_gatherer_tac = """