12 #include <boost/foreach.hpp>
278 const ParamsList SimpleParser6::INHERIT_TO_SUBNET6 = {
279 "preferred-lifetime",
280 "min-preferred-lifetime",
281 "max-preferred-lifetime",
286 "min-valid-lifetime",
287 "max-valid-lifetime",
288 "calculate-tee-times",
291 "store-extended-info",
335 const SimpleKeywords SimpleParser6::SHARED_NETWORK6_PARAMETERS = {
389 const SimpleDefaults SimpleParser6::DHCP_QUEUE_CONTROL6_DEFAULTS = {
396 const SimpleDefaults SimpleParser6::DHCP_MULTI_THREADING6_DEFAULTS = {
417 cnt = setDefaults(global, GLOBAL6_DEFAULTS);
422 BOOST_FOREACH(
ElementPtr option_def, option_defs->listValue()) {
430 BOOST_FOREACH(
ElementPtr single_option, options->listValue()) {
438 cnt += setListDefaults(subnets, SUBNET6_DEFAULTS);
445 cnt += setDefaults(mutable_cfg, IFACE6_DEFAULTS);
451 BOOST_FOREACH(
ElementPtr net, shared->listValue()) {
453 cnt += setDefaults(net, SHARED_NETWORK6_DEFAULTS);
457 cnt += setListDefaults(subs, SHARED_SUBNET6_DEFAULTS);
467 mutable_cfg = boost::const_pointer_cast<
Element>(queue_control);
470 global->set(
"dhcp-queue-control", mutable_cfg);
473 cnt += setDefaults(mutable_cfg, DHCP_QUEUE_CONTROL6_DEFAULTS);
478 if (multi_threading) {
479 mutable_cfg = boost::const_pointer_cast<
Element>(multi_threading);
482 global->set(
"multi-threading", mutable_cfg);
485 cnt += setDefaults(mutable_cfg, DHCP_MULTI_THREADING6_DEFAULTS);
491 mutable_cfg = boost::const_pointer_cast<
Element>(sanity_checks);
494 global->set(
"sanity-checks", mutable_cfg);
497 cnt += setDefaults(mutable_cfg, SANITY_CHECKS6_DEFAULTS);
508 BOOST_FOREACH(
ElementPtr single_subnet, subnets->listValue()) {
519 BOOST_FOREACH(
ElementPtr net, shared->listValue()) {
527 subnets = net->get(
"subnet6");
529 BOOST_FOREACH(
ElementPtr single_subnet, subnets->listValue()) {
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet).
boost::shared_ptr< Element > ElementPtr
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
static size_t deriveParams(isc::data::ConstElementPtr parent, isc::data::ElementPtr child, const ParamsList ¶ms)
Derives (inherits) parameters from parent scope to a child.
static size_t setDefaults(isc::data::ElementPtr scope, const SimpleDefaults &default_values)
Sets the default values.
boost::shared_ptr< const Element > ConstElementPtr
Defines the logger used by the top-level component of kea-dhcp-ddns.
std::vector< std::string > ParamsList
This defines a list of all parameters that are derived (or inherited) between contexts.
The Element class represents a piece of data, used by the command channel and configuration parts...