77 const ParamsList NetconfSimpleParser::INHERIT_TO_SERVERS = {
89 size_t NetconfSimpleParser::setAllDefaults(
const ElementPtr& global) {
93 cnt = setDefaults(global, NETCONF_DEFAULTS);
98 for (
auto it : mutable_servers->mapValue()) {
100 cnt += setServerDefaults(it.first, server);
101 mutable_servers->set(it.first, server);
103 global->set(
"managed-servers", mutable_servers);
109 size_t NetconfSimpleParser::deriveParameters(
ElementPtr global) {
116 for (
auto it : mutable_servers->mapValue()) {
121 mutable_servers->set(it.first, mutable_server);
123 global->set(
"managed-servers", mutable_servers);
130 NetconfSimpleParser::setServerDefaults(
const std::string name,
134 if (name ==
"dhcp4") {
135 cnt += setDefaults(server, DHCP4_DEFAULTS);
136 }
else if (name ==
"dhcp6") {
137 cnt += setDefaults(server, DHCP6_DEFAULTS);
138 }
else if (name ==
"d2") {
139 cnt += setDefaults(server, D2_DEFAULTS);
140 }
else if (name ==
"ca") {
141 cnt += setDefaults(server, CA_DEFAULTS);
149 cnt += setDefaults(mutable_ctrl_sock, CTRL_SOCK_DEFAULTS);
150 server->set(
"control-socket", mutable_ctrl_sock);
163 ctx->setContext(user_context);
169 for (
auto it : servers->mapValue()) {
172 ctx->getCfgServersMap()->insert(make_pair(it.first, server));
182 hooks_parser.
parse(libraries, hooks);
190 HooksManager::prepareUnloadLibraries();
191 static_cast<void>(HooksManager::unloadLibraries());
static size_t deriveParams(isc::data::ConstElementPtr parent, isc::data::ElementPtr child, const ParamsList ¶ms)
Derives (inherits) parameters from parent scope to a child.
Wrapper class that holds hooks libraries configuration.
const isc::hooks::HookLibsCollection & get() const
Provides access to the configured hooks libraries.
void verifyLibraries(const isc::data::Element::Position &position, bool multi_threading_enabled) const
Verifies that libraries stored in libraries_ are valid.
void loadLibraries(bool multi_threading_enabled) const
Commits hooks libraries configuration.
Parser for hooks library list.
void parse(HooksConfig &libraries, isc::data::ConstElementPtr value)
Parses parameters value.
CfgServerPtr parse(data::ConstElementPtr server_config)
Performs the actual parsing of the given value from the "managed-servers" map.
ElementPtr copy(ConstElementPtr from, int level)
Copy the data up to a nesting level.
std::vector< std::string > ParamsList
This defines a list of all parameters that are derived (or inherited) between contexts.
boost::shared_ptr< const Element > ConstElementPtr
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet).
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< NetconfConfig > NetconfConfigPtr
Pointer to a configuration context.
std::shared_ptr< CfgServer > CfgServerPtr
Defines a pointer for CfgServer instances.
Defines the logger used by the top-level component of kea-lfc.
A collection of classes for housing and parsing the application configuration necessary for the Netco...