Kea  1.9.9-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::ConstElementPtr 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...
 
virtual isc::data::ElementPtr toElement () const
 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 32 of file netconf_cfg_mgr.h.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 23 of file netconf_cfg_mgr.cc.

Member Function Documentation

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 52 of file netconf_cfg_mgr.h.

Referenced by extractConfiguredGlobals().

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

Saves scalar elements from the global scope of a configuration.

Definition at line 34 of file netconf_cfg_mgr.cc.

References addConfiguredGlobal(), and isc_throw.

+ Here is the call graph for this function:

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 60 of file netconf_cfg_mgr.h.

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 67 of file netconf_cfg_mgr.h.

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

Returns pointer to configured global parameters.

Todo:
revisit this at the toElement first use.

Definition at line 41 of file netconf_cfg_mgr.h.

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 74 of file netconf_cfg_mgr.h.

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 81 of file netconf_cfg_mgr.h.

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

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 146 of file netconf_cfg_mgr.cc.

References isc::data::UserContext::contextToElement(), and isc::hooks::HooksConfig::toElement().

+ Here is the call graph for this function:


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