53 }
catch (
const std::exception& ex) {
61 "Process run method failed: " << ex.what());
68NetconfProcess::runIO() {
88 getCfgMgr()->simpleParseConfig(config_set, check_only);
96 }
catch (
const std::exception& ex) {
97 std::ostringstream err;
98 err <<
"Error initializing hooks: "
108 return (boost::dynamic_pointer_cast<NetconfCfgMgr>(
getCfgMgr()));
it forwards queries to a single upstream resolver and passes the answers back to the client It is constructed with the address of the forward server Queries are initiated with the question to ask the forward a buffer into which to write the answer
static IOServiceMgr & instance()
Access the IOServiceMgr singleton instance.
void pollIOServices()
Poll IOService objects.
Ctrl Netconf Configuration Manager.
NetconfCfgMgrPtr getNetconfCfgMgr()
Returns a pointer to the configuration manager.
void init() override final
Initialize the Netconf process.
void run() override final
Implements the process's event loop.
isc::data::ConstElementPtr shutdown(isc::data::ConstElementPtr args) override final
Initiates the process's shutdown process.
NetconfProcess(const char *name, const asiolink::IOServicePtr &io_service)
Constructor.
isc::data::ConstElementPtr configure(isc::data::ConstElementPtr config_set, bool check_only=false) override final
Processes the given configuration.
Exception thrown if the process encountered an operational error.
void setShutdownFlag(bool value)
Sets the process shut down flag to the given value.
DProcessBase(const char *app_name, asiolink::IOServicePtr io_service, DCfgMgrBasePtr cfg_mgr)
Constructor.
void stopIOService()
Convenience method for stopping IOservice processing.
bool shouldShutdown() const
Checks if the process has been instructed to shut down.
asiolink::IOServicePtr & getIOService()
Fetches the controller's IOService.
DCfgMgrBasePtr & getCfgMgr()
Fetches the process's configuration manager.
This file contains several functions and constants that are used for handling commands and responses ...
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
#define LOG_FATAL(LOGGER, MESSAGE)
Macro to conveniently test fatal output and log it.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
ConstElementPtr parseAnswer(int &rcode, const ConstElementPtr &msg)
Parses a standard config/command level answer and returns arguments or text status code.
const int CONTROL_RESULT_ERROR
Status code indicating a general failure.
ConstElementPtr createAnswer(const int status_code, const std::string &text, const ConstElementPtr &arg)
Creates a standard config/command level answer message.
const int CONTROL_RESULT_SUCCESS
Status code indicating a successful operation.
boost::shared_ptr< const Element > ConstElementPtr
const int DBGLVL_START_SHUT
This is given a value of 0 as that is the level selected if debugging is enabled without giving a lev...
const isc::log::MessageID NETCONF_FAILED
isc::log::Logger netconf_logger(NETCONF_LOGGER_NAME)
Base logger for the netconf agent.
const isc::log::MessageID NETCONF_STARTED
const isc::log::MessageID NETCONF_RUN_EXIT
boost::shared_ptr< NetconfCfgMgr > NetconfCfgMgrPtr
Defines a shared pointer to NetconfCfgMgr.
boost::shared_ptr< DCfgMgrBase > DCfgMgrBasePtr
Defines a shared pointer to DCfgMgrBase.
Defines the logger used by the top-level component of kea-lfc.
Contains declarations for loggers used by the Kea netconf agent.