18#include <sysrepo-cpp/Session.hpp>
94 static void logChanges(sysrepo::S_Session sess,
const std::string& model);
113 bool checkModule(
const std::string& module_name)
const;
174 std::map<const std::string, const std::string>
modules_;
void getModules()
Retrieve names and revisions of installed modules through the sysrepo API.
sysrepo::S_Session running_sess_
Sysrepo running datastore session.
sysrepo::S_Session startup_sess_
Sysrepo startup datastore session.
void yangConfig(const CfgServersMapPair &service_pair)
Retrieve Kea server configuration from the YANG startup datastore and applies it to servers.
virtual ~NetconfAgent()
Destructor (call clear).
static sr_error_t done(sysrepo::S_Session sess, const CfgServersMapPair &service_pair)
SR_EV_DONE callback.
void subscribeConfig(const CfgServersMapPair &service_pair)
Subscribe changes for a module in YANG datastore.
void initSysrepo()
Initialize sysrepo sessions.
std::map< const std::string, sysrepo::S_Subscribe > subscriptions_
Subscription map.
void keaConfig(const CfgServersMapPair &service_pair)
Get and display Kea server configuration.
static sr_error_t change(sysrepo::S_Session sess, const CfgServersMapPair &service_pair)
SR_EV_CHANGE callback.
void announceShutdown() const
Set the shutdown flag of the process to true so that it can exit at the earliest convenient time.
sysrepo::S_Connection conn_
Sysrepo connection.
static void logChanges(sysrepo::S_Session sess, const std::string &model)
Log changes.
void checkModules(CfgServersMapPtr const &servers={}) const
Check module availability.
bool shouldShutdown() const
Check the shutdown flag of the process.
void init(NetconfCfgMgrPtr cfg_mgr)
Initialization.
void subscribeToNotifications(const CfgServersMapPair &service_pair)
Subscribe to notifications for a given YANG module.
bool checkModule(const std::string &module_name) const
Check essential module availability.
std::map< const std::string, const std::string > modules_
Available modules and revisions in Sysrepo.
Contains declarations for control socket communication.
Contains declarations for HTTP control socket communication.
boost::shared_ptr< NetconfCfgMgr > NetconfCfgMgrPtr
Defines a shared pointer to NetconfCfgMgr.
boost::shared_ptr< CfgServersMap > CfgServersMapPtr
Defines a pointer to map of CfgServers.
boost::shared_ptr< NetconfAgent > NetconfAgentPtr
Type definition for the pointer to the NetconfAgent.
std::pair< std::string, CfgServerPtr > CfgServersMapPair
Defines a iterator pairing of name and CfgServer.
Defines the logger used by the top-level component of kea-lfc.
Contains declarations for stdout control socket communication.
Contains declarations for UNIX control socket communication.