Rename FilesystemOptions to FileStoreOptions. refs #2345

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2014-12-01 21:52:44 +00:00 committed by Brian Warner
parent 2055a66cf2
commit d3acf82776

View File

@ -9,7 +9,7 @@ NODEURL_RE=re.compile("http(s?)://([^:]*)(:([1-9][0-9]*))?")
_default_nodedir = get_default_nodedir()
class FilesystemOptions(BaseOptions):
class FileStoreOptions(BaseOptions):
optParameters = [
["node-url", "u", None,
"Specify the URL of the Tahoe gateway node, such as "
@ -46,7 +46,7 @@ class FilesystemOptions(BaseOptions):
self.aliases = aliases # maps alias name to dircap
class MakeDirectoryOptions(FilesystemOptions):
class MakeDirectoryOptions(FileStoreOptions):
optParameters = [
("format", None, None, "Create a directory with the given format: SDMF or MDMF (case-insensitive)"),
]
@ -61,7 +61,7 @@ class MakeDirectoryOptions(FilesystemOptions):
synopsis = "[options] [REMOTE_DIR]"
description = """Create a new directory, either unlinked or as a subdirectory."""
class AddAliasOptions(FilesystemOptions):
class AddAliasOptions(FileStoreOptions):
def parseArgs(self, alias, cap):
self.alias = argv_to_unicode(alias)
if self.alias.endswith(u':'):
@ -71,7 +71,7 @@ class AddAliasOptions(FilesystemOptions):
synopsis = "[options] ALIAS[:] DIRCAP"
description = """Add a new alias for an existing directory."""
class CreateAliasOptions(FilesystemOptions):
class CreateAliasOptions(FileStoreOptions):
def parseArgs(self, alias):
self.alias = argv_to_unicode(alias)
if self.alias.endswith(u':'):
@ -80,14 +80,14 @@ class CreateAliasOptions(FilesystemOptions):
synopsis = "[options] ALIAS[:]"
description = """Create a new directory and add an alias for it."""
class ListAliasesOptions(FilesystemOptions):
class ListAliasesOptions(FileStoreOptions):
synopsis = "[options]"
description = """Display a table of all configured aliases."""
optFlags = [
("readonly-uri", None, "Show read-only dircaps instead of readwrite"),
]
class ListOptions(FilesystemOptions):
class ListOptions(FileStoreOptions):
optFlags = [
("long", "l", "Use long format: show file sizes, and timestamps."),
("uri", None, "Show file/directory URIs."),
@ -128,7 +128,7 @@ class ListOptions(FilesystemOptions):
modified.
"""
class GetOptions(FilesystemOptions):
class GetOptions(FileStoreOptions):
def parseArgs(self, arg1, arg2=None):
# tahoe get FOO |less # write to stdout
# tahoe get tahoe:FOO |less # same
@ -156,7 +156,7 @@ class GetOptions(FilesystemOptions):
% tahoe get tahoe:FOO bar # same
"""
class PutOptions(FilesystemOptions):
class PutOptions(FileStoreOptions):
optFlags = [
("mutable", "m", "Create a mutable file instead of an immutable one (like --format=SDMF)"),
]
@ -202,7 +202,7 @@ class PutOptions(FilesystemOptions):
% tahoe put bar MUTABLE-FILE-WRITECAP # modify the mutable file in-place
"""
class CpOptions(FilesystemOptions):
class CpOptions(FileStoreOptions):
optFlags = [
("recursive", "r", "Copy source directory recursively."),
("verbose", "v", "Be noisy about what is happening."),
@ -249,7 +249,7 @@ class CpOptions(FilesystemOptions):
contents.
"""
class UnlinkOptions(FilesystemOptions):
class UnlinkOptions(FileStoreOptions):
def parseArgs(self, where):
self.where = argv_to_unicode(where)
@ -260,7 +260,7 @@ class RmOptions(UnlinkOptions):
synopsis = "[options] REMOTE_FILE"
description = "Remove a named file from its parent directory."
class MvOptions(FilesystemOptions):
class MvOptions(FileStoreOptions):
def parseArgs(self, frompath, topath):
self.from_file = argv_to_unicode(frompath)
self.to_file = argv_to_unicode(topath)
@ -279,7 +279,7 @@ class MvOptions(FilesystemOptions):
the grid -- use 'tahoe cp' for that.
"""
class LnOptions(FilesystemOptions):
class LnOptions(FileStoreOptions):
def parseArgs(self, frompath, topath):
self.from_file = argv_to_unicode(frompath)
self.to_file = argv_to_unicode(topath)
@ -311,7 +311,7 @@ class LnOptions(FilesystemOptions):
class BackupConfigurationError(Exception):
pass
class BackupOptions(FilesystemOptions):
class BackupOptions(FileStoreOptions):
optFlags = [
("verbose", "v", "Be noisy about what is happening."),
("ignore-timestamps", None, "Do not use backupdb timestamps to decide whether a local file is unchanged."),
@ -380,7 +380,7 @@ class BackupOptions(FilesystemOptions):
--link-dest=TO/Archives/(previous) FROM TO/Archives/(new); ln -sf
TO/Archives/(new) TO/Latest'."""
class WebopenOptions(FilesystemOptions):
class WebopenOptions(FileStoreOptions):
optFlags = [
("info", "i", "Open the t=info page for the file"),
]
@ -394,7 +394,7 @@ class WebopenOptions(FilesystemOptions):
directory on the grid. When run without arguments, open the Welcome
page."""
class ManifestOptions(FilesystemOptions):
class ManifestOptions(FileStoreOptions):
optFlags = [
("storage-index", "s", "Only print storage index strings, not pathname+cap."),
("verify-cap", None, "Only print verifycap, not pathname+cap."),
@ -409,7 +409,7 @@ class ManifestOptions(FilesystemOptions):
Print a list of all files and directories reachable from the given
starting point."""
class StatsOptions(FilesystemOptions):
class StatsOptions(FileStoreOptions):
optFlags = [
("raw", "r", "Display raw JSON data instead of parsed"),
]
@ -421,7 +421,7 @@ class StatsOptions(FilesystemOptions):
Print statistics about of all files and directories reachable from the
given starting point."""
class CheckOptions(FilesystemOptions):
class CheckOptions(FileStoreOptions):
optFlags = [
("raw", None, "Display raw JSON data instead of parsed."),
("verify", None, "Verify all hashes, instead of merely querying share presence."),
@ -437,7 +437,7 @@ class CheckOptions(FilesystemOptions):
verify their hashes. Optionally repair the file if any problems were
found."""
class DeepCheckOptions(FilesystemOptions):
class DeepCheckOptions(FileStoreOptions):
optFlags = [
("raw", None, "Display raw JSON data instead of parsed."),
("verify", None, "Verify all hashes, instead of merely querying share presence."),