Kea 2.7.5
isc::netconf::NetconfCfgMgr Class Reference

Ctrl Netconf Configuration Manager. More...

#include <netconf_cfg_mgr.h>

+ Inheritance diagram for isc::netconf::NetconfCfgMgr:

Public Member Functions

 NetconfCfgMgr ()
 Constructor.
 
virtual ~NetconfCfgMgr ()=default
 Destructor.
 
std::string getConfigSummary (const uint32_t selection) override final
 Returns configuration summary in the textual format.
 
NetconfConfigPtr getNetconfConfig ()
 Convenience method that returns the Netconf configuration context.
 
std::list< std::list< std::string > > jsonPathsToRedact () const override final
 Return a list of all paths that contain passwords or secrets for kea-netconf.
 
- Public Member Functions inherited from isc::process::DCfgMgrBase
 DCfgMgrBase (ConfigPtr context)
 Constructor.
 
virtual ~DCfgMgrBase ()
 Destructor.
 
ConfigPtrgetContext ()
 Fetches the configuration context.
 
isc::data::ConstElementPtr redactConfig (isc::data::ConstElementPtr const &config) const
 Redact the configuration.
 
isc::data::ConstElementPtr simpleParseConfig (isc::data::ConstElementPtr config, bool check_only=false, const std::function< void()> &post_config_cb=nullptr)
 Acts as the receiver of new configurations.
 

Protected Member Functions

process::ConfigPtr createNewContext () override final
 Creates a new, blank NetconfConfig context.
 
isc::data::ConstElementPtr parse (isc::data::ConstElementPtr config, bool check_only) override final
 Parses configuration of Netconf.
 
- Protected Member Functions inherited from isc::process::DCfgMgrBase
void resetContext ()
 Replaces existing context with a new, empty context.
 
virtual void setCfgDefaults (isc::data::ElementPtr mutable_config)
 Adds default values to the given config.
 
void setContext (ConfigPtr &context)
 Update the current context.
 

Detailed Description

Ctrl Netconf Configuration Manager.

Provides the mechanisms for managing the Netconf application's configuration.

Definition at line 121 of file netconf_cfg_mgr.h.

Constructor & Destructor Documentation

◆ NetconfCfgMgr()

isc::netconf::NetconfCfgMgr::NetconfCfgMgr ( )

Constructor.

Definition at line 55 of file netconf_cfg_mgr.cc.

◆ ~NetconfCfgMgr()

virtual isc::netconf::NetconfCfgMgr::~NetconfCfgMgr ( )
virtualdefault

Destructor.

Member Function Documentation

◆ createNewContext()

ConfigPtr isc::netconf::NetconfCfgMgr::createNewContext ( )
finaloverrideprotectedvirtual

Creates a new, blank NetconfConfig context.

This method is used at the beginning of configuration process to create a fresh, empty copy of a NetconfConfig. This new context will be populated during the configuration process and will replace the existing context provided the configuration process completes without error.

Returns
Returns a ConfigPtr to the new context instance.

Implements isc::process::DCfgMgrBase.

Definition at line 90 of file netconf_cfg_mgr.cc.

◆ getConfigSummary()

string isc::netconf::NetconfCfgMgr::getConfigSummary ( const uint32_t selection)
finaloverridevirtual

Returns configuration summary in the textual format.

Parameters
selectionBitfield which describes the parts of the configuration to be returned. This parameter is ignored for Netconf.
Returns
Summary of the configuration in the textual format.

Implements isc::process::DCfgMgrBase.

Definition at line 60 of file netconf_cfg_mgr.cc.

References getNetconfConfig().

+ Here is the call graph for this function:

◆ getNetconfConfig()

NetconfConfigPtr isc::netconf::NetconfCfgMgr::getNetconfConfig ( )
inline

Convenience method that returns the Netconf configuration context.

Returns
returns a pointer to the configuration context.

Definition at line 133 of file netconf_cfg_mgr.h.

References isc::data::UserContext::getContext().

Referenced by getConfigSummary(), and parse().

+ Here is the call graph for this function:

◆ jsonPathsToRedact()

list< list< string > > isc::netconf::NetconfCfgMgr::jsonPathsToRedact ( ) const
finaloverridevirtual

Return a list of all paths that contain passwords or secrets for kea-netconf.

Returns
the list of lists of sequential JSON map keys needed to reach the passwords and secrets.

Reimplemented from isc::process::DCfgMgrBase.

Definition at line 169 of file netconf_cfg_mgr.cc.

◆ parse()

isc::data::ConstElementPtr isc::netconf::NetconfCfgMgr::parse ( isc::data::ConstElementPtr config,
bool check_only )
finaloverrideprotectedvirtual

Parses configuration of Netconf.

Parameters
configPointer to a configuration specified for netconf.
check_onlyBoolean flag indicating if this method should only verify correctness of the provided configuration.
Returns
Pointer to a result of configuration parsing.

Reimplemented from isc::process::DCfgMgrBase.

Definition at line 95 of file netconf_cfg_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::data::copy(), isc::config::createAnswer(), isc::netconf::NetconfSimpleParser::deriveParameters(), getNetconfConfig(), isc_throw, LOG_ERROR, isc::netconf::NETCONF_CONFIG_CHECK_FAIL, isc::netconf::NETCONF_CONFIG_FAIL, isc::netconf::netconf_logger, isc::netconf::NetconfSimpleParser::parse(), and isc::netconf::NetconfSimpleParser::setAllDefaults().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: