| Kea 3.0.2-git

isc::netconf::NetconfConfig Class Reference

Netconf Configuration Context. More...

`#include <netconf_cfg_mgr.h>`

Inheritance diagram for isc::netconf::NetconfConfig:
[legend]

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

  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().

## ◆ 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, Element::list, and 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 58 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 65 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 39 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 72 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 79 of file netconf_cfg_mgr.h.

## ◆ toElement()

ElementPtr isc::netconf::NetconfConfig::toElement | ( |  | ) | const
| final override 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)
isc::netconf::NetconfConfig::toElement
isc::data::ElementPtr toElement() const override final
Unparse a configuration object.
Definition netconf_cfg_mgr.cc:147
isc::config
Definition command_interpreter.cc:23

Returns
  a pointer to a configuration which can be parsed into the initial configuration object

Reimplemented from isc::process::ConfigBase.

Definition at line 147 of file netconf_cfg_mgr.cc.

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

Here is the call graph for this function:

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

- netconf_cfg_mgr.h
- netconf_cfg_mgr.cc