CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cmd_abort.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_PUBLISH_CMD_ABORT_H_
6 #define CVMFS_PUBLISH_CMD_ABORT_H_
7 
8 #include <string>
9 #include <vector>
10 
11 #include "publish/command.h"
12 
13 namespace publish {
14 
15 class CmdAbort : public Command {
16  public:
17  virtual std::string GetName() const { return "abort"; }
18  virtual std::string GetBrief() const {
19  return "Abort the currently open transaction";
20  }
21  virtual std::string GetDescription() const {
22  return "Returns to the state before the current transaction was opened. "
23  "All changes staged in the current transaction are discarded. "
24  "Repositories attached to a gateway return their lease.";
25  }
26  virtual std::string GetUsage() const {
27  return "[options] <repository name>";
28  }
29  virtual std::vector<std::string> DoGetExamples() const {
30  std::vector<std::string> e;
31  e.push_back("-f myrepo.cvmfs.io "
32  "# abort without asking for confirmation");
33  return e;
34  }
35  virtual ParameterList GetParams() const {
36  ParameterList p;
37  p.push_back(Parameter::Switch("force", 'f',
38  "Do not ask for confirmation"));
39  return p;
40  }
41 
42  virtual int Main(const Options &options);
43 }; // class CmdAbort
44 
45 } // namespace publish
46 
47 #endif // CVMFS_PUBLISH_CMD_ABORT_H_
virtual std::string GetName() const
Definition: cmd_abort.h:17
virtual std::string GetUsage() const
Definition: cmd_abort.h:26
static Parameter Switch(const std::string &key, char short_key, const std::string &desc)
Definition: command.h:79
virtual std::string GetDescription() const
Definition: cmd_abort.h:21
std::vector< Parameter > ParameterList
Definition: command.h:92
virtual ParameterList GetParams() const
Definition: cmd_abort.h:35
virtual std::vector< std::string > DoGetExamples() const
Definition: cmd_abort.h:29
virtual std::string GetBrief() const
Definition: cmd_abort.h:18
virtual int Main(const Options &options)
Definition: cmd_abort.cc:23