diff --git a/lib/cli/calistcommand.cpp b/lib/cli/calistcommand.cpp index 64962ca5d..f693ad72f 100644 --- a/lib/cli/calistcommand.cpp +++ b/lib/cli/calistcommand.cpp @@ -14,16 +14,32 @@ namespace po = boost::program_options; REGISTER_CLICOMMAND("ca/list", CAListCommand); +/** + * Provide a long CLI description sentence. + * + * @return text + */ String CAListCommand::GetDescription() const { return "Lists pending certificate signing requests."; } +/** + * Provide a short CLI description. + * + * @return text + */ String CAListCommand::GetShortDescription() const { return "lists pending certificate signing requests"; } +/** + * Initialize available CLI parameters. + * + * @param visibleDesc Register visible parameters. + * @param hiddenDesc Register hidden parameters. + */ void CAListCommand::InitParameters(boost::program_options::options_description& visibleDesc, boost::program_options::options_description& hiddenDesc) const { @@ -36,7 +52,7 @@ void CAListCommand::InitParameters(boost::program_options::options_description& /** * The entry point for the "ca list" CLI command. * - * @returns An exit status. + * @return An exit status. */ int CAListCommand::Run(const boost::program_options::variables_map& vm, const std::vector& ap) const { diff --git a/lib/cli/caremovecommand.cpp b/lib/cli/caremovecommand.cpp index 30f1bf1dd..d8944944e 100644 --- a/lib/cli/caremovecommand.cpp +++ b/lib/cli/caremovecommand.cpp @@ -10,21 +10,41 @@ using namespace icinga; REGISTER_CLICOMMAND("ca/remove", CARemoveCommand); +/** + * Provide a long CLI description sentence. + * + * @return text + */ String CARemoveCommand::GetDescription() const { return "Removes an outstanding certificate request."; } +/** + * Provide a short CLI description. + * + * @return text + */ String CARemoveCommand::GetShortDescription() const { return "removes an outstanding certificate request"; } +/** + * Define minimum arguments without key parameter. + * + * @return number of arguments + */ int CARemoveCommand::GetMinArguments() const { return 1; } +/** + * Impersonate as Icinga user. + * + * @return impersonate level + */ ImpersonationLevel CARemoveCommand::GetImpersonationLevel() const { return ImpersonateIcinga; diff --git a/lib/cli/carestorecommand.cpp b/lib/cli/carestorecommand.cpp index 75ab2149e..502036830 100644 --- a/lib/cli/carestorecommand.cpp +++ b/lib/cli/carestorecommand.cpp @@ -10,21 +10,41 @@ using namespace icinga; REGISTER_CLICOMMAND("ca/restore", CARestoreCommand); +/** + * Provide a long CLI description sentence. + * + * @return text + */ String CARestoreCommand::GetDescription() const { return "Restores a previously removed certificate request."; } +/** + * Provide a short CLI description. + * + * @return text + */ String CARestoreCommand::GetShortDescription() const { return "restores a removed certificate request"; } +/** + * Define minimum arguments without key parameter. + * + * @return number of arguments + */ int CARestoreCommand::GetMinArguments() const { return 1; } +/** + * Impersonate as Icinga user. + * + * @return impersonate level + */ ImpersonationLevel CARestoreCommand::GetImpersonationLevel() const { return ImpersonateIcinga; diff --git a/lib/cli/casigncommand.cpp b/lib/cli/casigncommand.cpp index 368b378f0..96d2c2c87 100644 --- a/lib/cli/casigncommand.cpp +++ b/lib/cli/casigncommand.cpp @@ -10,21 +10,41 @@ using namespace icinga; REGISTER_CLICOMMAND("ca/sign", CASignCommand); +/** + * Provide a long CLI description sentence. + * + * @return text + */ String CASignCommand::GetDescription() const { return "Signs an outstanding certificate request."; } +/** + * Provide a short CLI description. + * + * @return text + */ String CASignCommand::GetShortDescription() const { return "signs an outstanding certificate request"; } +/** + * Define minimum arguments without key parameter. + * + * @return number of arguments + */ int CASignCommand::GetMinArguments() const { return 1; } +/** + * Impersonate as Icinga user. + * + * @return impersonate level + */ ImpersonationLevel CASignCommand::GetImpersonationLevel() const { return ImpersonateIcinga; @@ -33,7 +53,7 @@ ImpersonationLevel CASignCommand::GetImpersonationLevel() const /** * The entry point for the "ca sign" CLI command. * - * @returns An exit status. + * @return An exit status. */ int CASignCommand::Run(const boost::program_options::variables_map& vm, const std::vector& ap) const {