CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cmd_mkfs.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_PUBLISH_CMD_MKFS_H_
6 #define CVMFS_PUBLISH_CMD_MKFS_H_
7 
8 #include <string>
9 
10 #include "publish/command.h"
11 
12 namespace publish {
13 
14 class CmdMkfs : public Command {
15  public:
16  virtual std::string GetName() const { return "mkfs"; }
17  virtual std::string GetBrief() const {
18  return "Create a new, empty repository";
19  }
20  virtual ParameterList GetParams() const {
21  ParameterList p;
22  p.push_back(Parameter::Optional("stratum0", 'w', "stratum0 url",
23  "HTTP endpoint of the authoritative storage if not localhost"));
24 
25  p.push_back(Parameter::Optional("storage", 'u', "upstream storage",
26  "Upstream storage definition if other than local file system"));
27 
28  p.push_back(Parameter::Optional("owner", 'o', "user name",
29  "User account that should own the published files"));
30 
31  p.push_back(Parameter::Switch("replicable", 'm',
32  "Enable to mark the repository as source for stratum 1 copies"));
33 
34  p.push_back(Parameter::Optional("unionfs", 'f', "aufs | overlayfs",
35  "Enforce aufs or overlayfs if both are available"));
36 
37  p.push_back(Parameter::Optional("s3config", 's', "s3 config file",
38  "Settings for an S3 bucket, use with -w and -u flags"));
39 
40  p.push_back(Parameter::Switch("no-autotags", 'g',
41  "Disable automatic creation of timestamp tags, useful with --gc"));
42 
43  p.push_back(Parameter::Optional("autotag-span", 'G', "timespan",
44  "Specify a `date` compatible time windows for keeping auto tags"));
45 
46  p.push_back(Parameter::Optional("hash", 'a', "algorithm",
47  "Select a secure hash algorithm: sha1 (default) or rmd160 or shake128"));
48 
49  p.push_back(Parameter::Switch("gc", 'z',
50  "Make the repository garbage-collectable"));
51 
52  p.push_back(Parameter::Switch("volatile", 'v',
53  "Mark the repository contents as volatile for client caches"));
54 
55  p.push_back(Parameter::Optional("compression", 'Z', "algorithm",
56  "Select the compression algorithm: zlib (default) or none"));
57 
58  p.push_back(Parameter::Optional("import-keychain", 'k', "directory",
59  "Use existing keys instead of creating new ones"));
60 
61  p.push_back(Parameter::Optional("export-keychain", 'K', "directory",
62  "Write repository keychain to directory different from /etc/cvmfs/keys"));
63 
64  p.push_back(Parameter::Switch("no-apache", 'p',
65  "Disable creation of Apache config files, e.g. for S3 backend"));
66 
67  p.push_back(Parameter::Switch("no-publisher", 'P',
68  "Only create repository but do not configure node as a publisher"));
69 
70  p.push_back(Parameter::Switch("keycard", 'R',
71  "Require a master key card for the whitelist signature"));
72 
73  p.push_back(Parameter::Optional("auth", 'V', "auth spec",
74  "Set the membership requirement to access the repository"));
75 
76  p.push_back(Parameter::Switch("external", 'X',
77  "Enable to use this repository for external data"));
78  return p;
79  }
80  virtual std::string GetUsage() const {
81  return "[options] <fully qualified repository name>";
82  }
83  virtual unsigned GetMinPlainArgs() const { return 1; }
84 
85  virtual int Main(const Options &options);
86 };
87 
88 } // namespace publish
89 
90 #endif // CVMFS_PUBLISH_CMD_MKFS_H_
virtual std::string GetName() const
Definition: cmd_mkfs.h:16
static Parameter Optional(const std::string &key, char short_key, const std::string &arg_name, const std::string &desc)
Definition: command.h:73
virtual unsigned GetMinPlainArgs() const
Definition: cmd_mkfs.h:83
virtual int Main(const Options &options)
Definition: cmd_mkfs.cc:24
static Parameter Switch(const std::string &key, char short_key, const std::string &desc)
Definition: command.h:79
virtual std::string GetBrief() const
Definition: cmd_mkfs.h:17
std::vector< Parameter > ParameterList
Definition: command.h:92
virtual std::string GetUsage() const
Definition: cmd_mkfs.h:80
virtual ParameterList GetParams() const
Definition: cmd_mkfs.h:20