Kea 2.7.6
|
Netconf Configuration Context. More...
#include <netconf_cfg_mgr.h>
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. | |
CfgServersMapPtr & | getCfgServersMap () |
Returns non-const reference to the managed servers map. | |
const CfgServersMapPtr & | getCfgServersMap () const |
Returns const reference to the managed servers map. | |
isc::data::ElementPtr | getConfiguredGlobals () const |
Returns pointer to configured global parameters. | |
isc::hooks::HooksConfig & | getHooksConfig () |
Returns non-const reference to configured hooks libraries. | |
const isc::hooks::HooksConfig & | getHooksConfig () 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::LoggingInfoStorage & | getLoggingInfo () 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. | |
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) | |
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.
isc::netconf::NetconfConfig::NetconfConfig | ( | ) |
Default constructor.
Definition at line 30 of file netconf_cfg_mgr.cc.
|
inline |
Adds a parameter to the collection configured globals.
name | std::string name of the global to add. |
value | ElementPtr containing the value of the global. |
Definition at line 50 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 41 of file netconf_cfg_mgr.cc.
References addConfiguredGlobal(), isc_throw, isc::data::Element::list, and isc::data::Element::map.
|
inline |
Returns non-const reference to the managed servers map.
Definition at line 58 of file netconf_cfg_mgr.h.
|
inline |
Returns const reference to the managed servers map.
Definition at line 65 of file netconf_cfg_mgr.h.
|
inline |
Returns pointer to configured global parameters.
Definition at line 39 of file netconf_cfg_mgr.h.
|
inline |
Returns non-const reference to configured hooks libraries.
Definition at line 72 of file netconf_cfg_mgr.h.
|
inline |
Returns const reference to configured hooks libraries.
Definition at line 79 of file netconf_cfg_mgr.h.
|
finaloverridevirtual |
Unparse a configuration object.
Returns an element which must parse into the same object, i.e.
Reimplemented from isc::process::ConfigBase.
Definition at line 147 of file netconf_cfg_mgr.cc.
References isc::data::UserContext::contextToElement(), isc::data::Element::createMap(), isc::hooks::HooksConfig::toElement(), and isc::process::ConfigBase::toElement().