10 #include <boost/foreach.hpp> 23 <<
" not found (" << map->getPosition() <<
")");
25 std::string str = value->stringValue();
28 }
catch (
const std::exception& ex) {
30 "invalid NameChangeRequest protocol (" << str
31 <<
") specified for parameter '" << name
32 <<
"' (" << value->getPosition() <<
")");
41 <<
" not found (" << map->getPosition() <<
")");
43 std::string str = value->stringValue();
46 }
catch (
const std::exception& ex) {
48 "invalid NameChangeRequest format (" << str
49 <<
") specified for parameter '" << name
50 <<
"' (" << value->getPosition() <<
")");
121 cnt = setDefaults(global, D2_GLOBAL_DEFAULTS);
124 if (global->find(
"tsig-keys")) {
126 cnt += setListDefaults(keys, TSIG_KEY_DEFAULTS);
130 global->set(
"tsig-keys", list);
135 cnt += setManagerDefaults(global,
"forward-ddns", DDNS_DOMAIN_MGR_DEFAULTS);
138 cnt += setManagerDefaults(global,
"reverse-ddns", DDNS_DOMAIN_MGR_DEFAULTS);
148 cnt += setDefaults(domain, domain_defaults);
149 if (domain->find(
"dns-servers")) {
152 cnt += setListDefaults(servers, DNS_SERVER_DEFAULTS);
161 const std::string& mgr_name,
165 if (!global->find(mgr_name)) {
168 global->set(mgr_name, map);
173 boost::const_pointer_cast<Element>(global->get(mgr_name));
176 cnt += setDefaults(mgr, mgr_defaults);
181 if (mgr->find(
"ddns-domains")) {
183 BOOST_FOREACH(
ElementPtr domain, domains->listValue()) {
186 cnt += setDdnsDomainDefaults(domain, DDNS_DOMAIN_DEFAULTS);
207 ctx->setKeys(parser.
parse(keys));
215 ctx->setForwardMgr(mgr);
223 ctx->setReverseMgr(mgr);
230 uint32_t dns_server_timeout = 0;
236 if ((ip_address.
toText() ==
"0.0.0.0") ||
237 (ip_address.
toText() ==
"::")) {
239 << ip_address <<
"\"" 240 <<
" (" << config->get(
"ip-address")->getPosition() <<
")");
247 ncr_protocol = getProtocol(config,
"ncr-protocol");
251 <<
" is not yet supported " 252 <<
" (" << config->get(
"ncr-protocol")->getPosition() <<
")");
255 ncr_format = getFormat(config,
"ncr-format");
259 <<
" is not yet supported" 260 <<
" (" << config->get(
"ncr-format")->getPosition() <<
")");
265 ctx->setContext(user);
271 ncr_protocol, ncr_format));
273 ctx->getD2Params() = params;
boost::shared_ptr< D2Params > D2ParamsPtr
Defines a pointer for D2Params instances.
NameChangeProtocol stringToNcrProtocol(const std::string &protocol_str)
Function which converts labels to NameChangeProtocol enum values.
DdnsDomainListMgrPtr parse(data::ConstElementPtr mgr_config, const std::string &mgr_name, const TSIGKeyInfoMapPtr keys)
Performs the actual parsing of the given manager element.
boost::shared_ptr< DdnsDomainListMgr > DdnsDomainListMgrPtr
Defines a pointer for DdnsDomain instances.
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet)
Parser for DdnsDomainListMgr.
Exception thrown when the error during configuration handling occurs.
boost::shared_ptr< Element > ElementPtr
NameChangeFormat
Defines the list of data wire formats supported.
TSIGKeyInfoMapPtr parse(data::ConstElementPtr key_list_config)
Performs the parsing of the given list "tsig-key" elements.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
std::string ncrProtocolToString(NameChangeProtocol protocol)
Function which converts NameChangeProtocol enums to text labels.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< D2CfgContext > D2CfgContextPtr
Pointer to a configuration context.
uint32_t getUint32(isc::data::ConstElementPtr scope, const std::string &name)
Returns a value converted to uint32_t.
static isc::asiolink::IOAddress getAddress(const ConstElementPtr &scope, const std::string &name)
Returns a IOAddress parameter from a scope.
Defines the logger used by the top-level component of kea-dhcp-ddns.
std::string toText() const
Convert the address to a string.
std::string ncrFormatToString(NameChangeFormat format)
Function which converts NameChangeFormat enums to text labels.
NameChangeProtocol
Defines the list of socket protocols supported.
NameChangeFormat stringToNcrFormat(const std::string &fmt_str)
Function which converts labels to NameChangeFormat enum values.
Parser for a list of TSIGKeyInfos.
The IOAddress class represents an IP addresses (version agnostic)
A collection of classes for housing and parsing the application configuration necessary for the DHCP-...
Acts as a storage vault for D2 global scalar parameters.