20#include <sysrepo-cpp/Session.hpp>
92 static void logChanges(sysrepo::Session sess, std::string_view
const& model);
111 bool checkModule(
const std::string& module_name)
const;
169 std::map<const std::string, const std::string>
modules_;
void subscribeToDataChanges(const CfgServersMapPair &service_pair)
Subscribe changes for a module in YANG datastore.
std::optional< sysrepo::Session > running_sess_
Sysrepo running datastore session.
void getModules()
Retrieve names and revisions of installed modules through the sysrepo API.
static void logChanges(sysrepo::Session sess, std::string_view const &model)
Log changes.
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).
void initSysrepo()
Initialize sysrepo sessions.
void keaConfig(const CfgServersMapPair &service_pair)
Get and display Kea server configuration.
void announceShutdown() const
Set the shutdown flag of the process to true so that it can exit at the earliest convenient time.
void checkModules(CfgServersMapPtr const &servers={}) const
Check module availability.
std::map< const std::string, sysrepo::Subscription > subscriptions_
Subscription map.
bool shouldShutdown() const
Check the shutdown flag of the process.
static sysrepo::ErrorCode change(sysrepo::Session sess, const CfgServersMapPair &service_pair)
Event::Change callback.
std::optional< sysrepo::Session > startup_sess_
Sysrepo startup datastore session.
static sysrepo::ErrorCode done(sysrepo::Session sess, const CfgServersMapPair &service_pair)
Event::Done callback.
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.
std::pair< std::string, CfgServerPtr > CfgServersMapPair
Defines a iterator pairing of name and CfgServer.
std::shared_ptr< NetconfAgent > NetconfAgentPtr
Type definition for the pointer to the NetconfAgent.
boost::shared_ptr< NetconfCfgMgr > NetconfCfgMgrPtr
Defines a shared pointer to NetconfCfgMgr.
std::shared_ptr< CfgServersMap > CfgServersMapPtr
Defines a pointer to map of CfgServers.
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.