16 AdaptorPool::AdaptorPool() {
19 AdaptorPool::~AdaptorPool() {
24 const string& orig = pool->get(
"pool")->stringValue();
26 for (
char ch : orig) {
27 if ((ch ==
' ') || (ch ==
'\t') || (ch ==
'\n')) {
29 }
else if (ch ==
'-') {
38 canon.assign(v.begin(), v.end());
40 pool->set(
"pool", Element::create(canon));
47 if (model == IETF_DHCPV6_SERVER) {
48 fromSubnetIetf6(subnet, pools);
49 }
else if ((model != KEA_DHCP4_SERVER) &&
50 (model != KEA_DHCP6_SERVER)) {
52 "fromSubnet not implemented for the model: " << model);
58 Adaptor::fromParent(
"valid-lifetime", subnet, pools);
59 Adaptor::fromParent(
"preferred-lifetime", subnet, pools);
60 Adaptor::fromParent(
"renew-timer", subnet, pools);
61 Adaptor::fromParent(
"rebind-timer", subnet, pools);
65 AdaptorPool::toSubnet(
const string& model,
ElementPtr subnet,
67 if (model == IETF_DHCPV6_SERVER) {
68 toSubnetIetf6(subnet, pools);
69 }
else if ((model != KEA_DHCP4_SERVER) &&
70 (model != KEA_DHCP6_SERVER)) {
72 "toSubnet not implemented for the model: " << model);
78 Adaptor::toParent(
"valid-lifetime", subnet, pools);
79 Adaptor::toParent(
"preferred-lifetime", subnet, pools);
80 Adaptor::toParent(
"renew-timer", subnet, pools);
81 Adaptor::toParent(
"rebind-timer", subnet, pools);
A generic exception that is thrown when a function is not implemented.
boost::shared_ptr< Element > ElementPtr
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Element > ConstElementPtr
Defines the logger used by the top-level component of kea-dhcp-ddns.