18#include <boost/pointer_cast.hpp>
78 }
catch (
const std::exception& ex) {
86 "Process run method failed: " << ex.
what());
93NetconfProcess::runIO() {
112 getCfgMgr()->simpleParseConfig(config_set, check_only);
120 return (boost::dynamic_pointer_cast<NetconfCfgMgr>(
getCfgMgr()));
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
void initSysrepo()
Initialize sysrepo sessions.
void init(NetconfCfgMgrPtr cfg_mgr)
Initialization.
Ctrl Netconf Configuration Manager.
virtual ~NetconfProcess()
Destructor.
NetconfCfgMgrPtr getNetconfCfgMgr()
Returns a pointer to the configuration manager.
virtual void run()
Implements the process's event loop.
static bool shut_down
Global (globally visible) shutdown flag.
virtual void init()
Initialize the Netconf process.
NetconfProcess(const char *name, const asiolink::IOServicePtr &io_service)
Constructor.
virtual isc::data::ConstElementPtr configure(isc::data::ConstElementPtr config_set, bool check_only=false)
Processes the given configuration.
virtual isc::data::ConstElementPtr shutdown(isc::data::ConstElementPtr args)
Initiates the process's shutdown process.
Exception thrown if the process encountered an operational error.
Application Process Interface.
void setShutdownFlag(bool value)
Sets the process shut down flag to the given value.
void stopIOService()
Convenience method for stopping IOservice processing.
asiolink::IOServicePtr & getIoService()
Fetches the controller's IOService.
bool shouldShutdown() const
Checks if the process has been instructed to shut down.
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 createAnswer()
Creates a standard config/command level success answer message (i.e.
ConstElementPtr parseAnswer(int &rcode, const ConstElementPtr &msg)
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...
isc::log::Logger netconf_logger(NETCONF_LOGGER_NAME)
Base logger for the netconf agent.
boost::shared_ptr< NetconfCfgMgr > NetconfCfgMgrPtr
Defines a shared pointer to NetconfCfgMgr.
boost::shared_ptr< DCfgMgrBase > DCfgMgrBasePtr
Defines a shared pointer to DCfgMgrBase.
Wrappers for thread related functionality.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Contains declarations for loggers used by the Kea netconf agent.