Kea  2.3.5-git
isc::netconf::NetconfConfig Class Reference

Netconf Configuration Context. More...

#include <netconf_cfg_mgr.h>

+ Inheritance diagram for isc::netconf::NetconfConfig:

Public Member Functions

 NetconfConfig ()
 Default constructor. More...
 
void addConfiguredGlobal (const std::string &name, isc::data::ConstElementPtr value)
 Adds a parameter to the collection configured globals. More...
 
void extractConfiguredGlobals (isc::data::ConstElementPtr config)
 Saves scalar elements from the global scope of a configuration. More...
 
CfgServersMapPtrgetCfgServersMap ()
 Returns non-const reference to the managed servers map. More...
 
const CfgServersMapPtrgetCfgServersMap () const
 Returns const reference to the managed servers map. More...
 
isc::data::ElementPtr getConfiguredGlobals () const
 Returns pointer to configured global parameters. More...
 
isc::hooks::HooksConfiggetHooksConfig ()
 Returns non-const reference to configured hooks libraries. More...
 
const isc::hooks::HooksConfiggetHooksConfig () const
 Returns const reference to configured hooks libraries. More...
 
isc::data::ElementPtr toElement () const override final
 Unparse a configuration object. More...
 
- Public Member Functions inherited from isc::process::ConfigBase
const process::LoggingInfoStoragegetLoggingInfo () const
 Returns logging specific configuration. More...
 
void addLoggingInfo (const process::LoggingInfo &logging_info)
 Sets logging specific configuration. More...
 
void applyLoggingCfg () const
 Apply logging configuration to log4cplus. More...
 
bool equals (const ConfigBase &other) const
 Compares two configuration. More...
 
virtual void merge (ConfigBase &other)
 Merges specified configuration into this configuration. More...
 
process::ConstConfigControlInfoPtr getConfigControlInfo () const
 Fetches a read-only copy of the configuration control information. More...
 
void setConfigControlInfo (const process::ConfigControlInfoPtr &config_ctl_info)
 Set the configuration control information. More...
 
void setServerTag (const util::Optional< std::string > &server_tag)
 Sets the server's logical name. More...
 
util::Optional< std::string > getServerTag () const
 Returns the server's logical name. More...
 
boost::posix_time::ptime getLastCommitTime () const
 Returns the last commit timestamp. More...
 
void setLastCommitTime (const boost::posix_time::ptime &last_commit_time)
 Sets the last commit timestamp. More...
 
- Public Member Functions inherited from isc::data::UserContext
void contextToElement (data::ElementPtr map) const
 Merge unparse a user_context object. More...
 
data::ConstElementPtr getContext () const
 Returns const pointer to the user context. More...
 
void setContext (const data::ConstElementPtr &ctx)
 Sets user context. More...
 
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr toElement (data::ConstElementPtr map)
 Copy an Element map. More...
 
- Protected Member Functions inherited from isc::process::ConfigBase
void copy (ConfigBase &new_config) const
 Copies the current configuration to a new configuration. More...
 
- Protected Attributes inherited from isc::data::UserContext
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL) More...
 

Detailed Description

Netconf Configuration Context.

Implement the storage container for configuration context. It provides a single enclosure for the storage of configuration parameters and any other Netconf specific information that needs to be accessible during configuration parsing as well as to the application as a whole. It is derived from the context base class, ConfigBase.

Definition at line 31 of file netconf_cfg_mgr.h.

Constructor & Destructor Documentation

◆ NetconfConfig()

isc::netconf::NetconfConfig::NetconfConfig ( )

Default constructor.

Definition at line 30 of file netconf_cfg_mgr.cc.

Referenced by getHooksConfig().

Member Function Documentation

◆ addConfiguredGlobal()

void isc::netconf::NetconfConfig::addConfiguredGlobal ( const std::string &  name,
isc::data::ConstElementPtr  value 
)
inline

Adds a parameter to the collection configured globals.

Parameters
namestd::string name of the global to add.
valueElementPtr containing the value of the global.

Definition at line 51 of file netconf_cfg_mgr.h.

Referenced by extractConfiguredGlobals().

◆ extractConfiguredGlobals()

void isc::netconf::NetconfConfig::extractConfiguredGlobals ( isc::data::ConstElementPtr  config)

Saves scalar elements from the global scope of a configuration.

Definition at line 41 of file netconf_cfg_mgr.cc.

References addConfiguredGlobal(), and isc_throw.

Referenced by getConfiguredGlobals().

+ Here is the call graph for this function:

◆ getCfgServersMap() [1/2]

CfgServersMapPtr& isc::netconf::NetconfConfig::getCfgServersMap ( )
inline

Returns non-const reference to the managed servers map.

Returns
non-const reference to the managed servers map.

Definition at line 59 of file netconf_cfg_mgr.h.

◆ getCfgServersMap() [2/2]

const CfgServersMapPtr& isc::netconf::NetconfConfig::getCfgServersMap ( ) const
inline

Returns const reference to the managed servers map.

Returns
const reference to the managed servers map.

Definition at line 66 of file netconf_cfg_mgr.h.

◆ getConfiguredGlobals()

isc::data::ElementPtr isc::netconf::NetconfConfig::getConfiguredGlobals ( ) const
inline

Returns pointer to configured global parameters.

Todo:
revisit this at the toElement first use.

Definition at line 40 of file netconf_cfg_mgr.h.

References extractConfiguredGlobals().

+ Here is the call graph for this function:

◆ getHooksConfig() [1/2]

isc::hooks::HooksConfig& isc::netconf::NetconfConfig::getHooksConfig ( )
inline

Returns non-const reference to configured hooks libraries.

Returns
non-const reference to configured hooks libraries.

Definition at line 73 of file netconf_cfg_mgr.h.

◆ getHooksConfig() [2/2]

const isc::hooks::HooksConfig& isc::netconf::NetconfConfig::getHooksConfig ( ) const
inline

Returns const reference to configured hooks libraries.

Returns
const reference to configured hooks libraries.

Definition at line 80 of file netconf_cfg_mgr.h.

References NetconfConfig(), and toElement().

+ Here is the call graph for this function:

◆ toElement()

ElementPtr isc::netconf::NetconfConfig::toElement ( ) const
finaloverridevirtual

Unparse a configuration object.

Returns an element which must parse into the same object, i.e.

for all valid config C parse(parse(C)->toElement()) == parse(C)
Returns
a pointer to a configuration which can be parsed into the initial configuration object

Reimplemented from isc::process::ConfigBase.

Definition at line 149 of file netconf_cfg_mgr.cc.

Referenced by getHooksConfig().


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