CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cmd_commit.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_PUBLISH_CMD_COMMIT_H_
6 #define CVMFS_PUBLISH_CMD_COMMIT_H_
7 
8 #include <string>
9 #include <vector>
10 
11 #include "publish/command.h"
12 
13 namespace publish {
14 
15 class CmdCommit : public Command {
16  public:
17  virtual std::string GetName() const { return "commit"; }
18 
19  virtual std::string GetBrief() const {
20  return "Commit changes made inside the ephemeral shell";
21  }
22 
23  virtual std::string GetDescription() const {
24  return "Commit new content from the ephemeral shell";
25  }
26 
27  virtual std::string GetUsage() const {
28  return "[options] <repository name>";
29  }
30 
31  virtual ParameterList GetParams() const {
32  ParameterList p;
33  p.push_back(Parameter::Optional(
34  "repo-config", 'x', "repository configuration",
35  "Path to the configuration of the repository gateway"));
36  return p;
37  }
38 
39  virtual std::vector<std::string> GetExamples() const {
40  std::vector<std::string> e;
41  e.push_back(
42  "commit myrepo.cvmfs.io "
43  "# commit changes to myrepo.cvmfs.io");
44  return e;
45  }
46 
47  virtual int Main(const Options &options);
48 };
49 
50 } // namespace publish
51 
52 #endif // CVMFS_PUBLISH_CMD_COMMIT_H_
virtual std::string GetUsage() const
Definition: cmd_commit.h:27
static Parameter Optional(const std::string &key, char short_key, const std::string &arg_name, const std::string &desc)
Definition: command.h:73
virtual int Main(const Options &options)
Definition: cmd_commit.cc:25
virtual std::string GetName() const
Definition: cmd_commit.h:17
virtual std::string GetBrief() const
Definition: cmd_commit.h:19
virtual std::vector< std::string > GetExamples() const
Definition: cmd_commit.h:39
std::vector< Parameter > ParameterList
Definition: command.h:92
virtual ParameterList GetParams() const
Definition: cmd_commit.h:31
virtual std::string GetDescription() const
Definition: cmd_commit.h:23