#include <agent/ca_controller.h>
#include <agent/ca_process.h>
+#include <agent/parser_context.h>
using namespace isc::process;
return (new CtrlAgentProcess(getAppName().c_str(), getIOService()));
}
+isc::data::ConstElementPtr
+CtrlAgentController::parseFile(const std::string& name) {
+ ParserContext parser;
+ return (parser.parseFile(name, ParserContext::PARSER_AGENT));
+}
+
CtrlAgentController::CtrlAgentController()
: DControllerBase(agent_app_name_, agent_bin_name_) {
}
/// by convention this should match the executable name.
static const char* agent_bin_name_;
+ /// @brief Parses the configuration file using Agent::ParserContext (bison)
+ ///
+ /// @param name name of the text file to be parsed
+ /// @return Element tree structure representing parsed configuration
+ isc::data::ConstElementPtr
+ parseFile(const std::string& name);
+
private:
/// @brief Creates an instance of the Control Agent application