2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2014-10-13 18:09:58 +02:00
|
|
|
|
|
|
|
#include "cli/featurelistcommand.hpp"
|
2014-10-18 19:31:52 +02:00
|
|
|
#include "cli/featureutility.hpp"
|
2014-10-19 14:21:12 +02:00
|
|
|
#include "base/logger.hpp"
|
2014-10-18 19:31:52 +02:00
|
|
|
#include "base/convert.hpp"
|
|
|
|
#include "base/console.hpp"
|
2014-10-13 18:09:58 +02:00
|
|
|
#include <boost/algorithm/string/join.hpp>
|
2014-10-18 19:31:52 +02:00
|
|
|
#include <iostream>
|
2014-10-13 18:09:58 +02:00
|
|
|
|
|
|
|
using namespace icinga;
|
|
|
|
namespace po = boost::program_options;
|
|
|
|
|
|
|
|
REGISTER_CLICOMMAND("feature/list", FeatureListCommand);
|
|
|
|
|
2018-01-04 04:25:35 +01:00
|
|
|
String FeatureListCommand::GetDescription() const
|
2014-10-13 18:09:58 +02:00
|
|
|
{
|
2017-07-25 13:35:20 +02:00
|
|
|
return "Lists all available Icinga 2 features.";
|
2014-10-13 18:09:58 +02:00
|
|
|
}
|
|
|
|
|
2018-01-04 04:25:35 +01:00
|
|
|
String FeatureListCommand::GetShortDescription() const
|
2014-10-13 18:09:58 +02:00
|
|
|
{
|
2017-07-25 13:35:20 +02:00
|
|
|
return "lists all available features";
|
2014-10-13 18:09:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The entry point for the "feature list" CLI command.
|
|
|
|
*
|
|
|
|
* @returns An exit status.
|
|
|
|
*/
|
|
|
|
int FeatureListCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
|
|
|
{
|
2014-10-21 18:35:43 +02:00
|
|
|
return FeatureUtility::ListFeatures();
|
2014-10-20 13:58:21 +02:00
|
|
|
}
|