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

Additional Inherited Members

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

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.

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(), isc_throw, isc::data::Element::list, and isc::data::Element::map.

+ 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.

◆ 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.

◆ 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)
isc::data::ElementPtr toElement() const override final
Unparse a configuration object.
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.

References isc::data::UserContext::contextToElement(), isc::data::Element::createMap(), isc::hooks::HooksConfig::toElement(), and isc::process::ConfigBase::toElement().

+ Here is the call graph for this function:

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