]> granicus.if.org Git - icinga2/blob - lib/cli/featurelistcommand.cpp
add some object locking to the Dump method (which could theoreticylly suffer from...
[icinga2] / lib / cli / featurelistcommand.cpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #include "cli/featurelistcommand.hpp"
4 #include "cli/featureutility.hpp"
5 #include "base/logger.hpp"
6 #include "base/convert.hpp"
7 #include "base/console.hpp"
8 #include <boost/algorithm/string/join.hpp>
9 #include <iostream>
10
11 using namespace icinga;
12 namespace po = boost::program_options;
13
14 REGISTER_CLICOMMAND("feature/list", FeatureListCommand);
15
16 String FeatureListCommand::GetDescription() const
17 {
18         return "Lists all available Icinga 2 features.";
19 }
20
21 String FeatureListCommand::GetShortDescription() const
22 {
23         return "lists all available features";
24 }
25
26 /**
27  * The entry point for the "feature list" CLI command.
28  *
29  * @returns An exit status.
30  */
31 int FeatureListCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
32 {
33         return FeatureUtility::ListFeatures();
34 }