18 AdaptorPool::AdaptorPool() {
21 AdaptorPool::~AdaptorPool() {
26 const string& orig = pool->get(
"pool")->stringValue();
28 for (
char ch : orig) {
29 if ((ch ==
' ') || (ch ==
'\t') || (ch ==
'\n')) {
31 }
else if (ch ==
'-') {
40 canon.assign(v.begin(), v.end());
42 pool->set(
"pool", Element::create(canon));
49 if (model == IETF_DHCPV6_SERVER) {
50 fromSubnetIetf6(subnet, pools);
51 }
else if ((model != KEA_DHCP4_SERVER) &&
52 (model != KEA_DHCP6_SERVER)) {
54 "fromSubnet not implemented for the model: " << model);
60 Adaptor::fromParent(
"valid-lifetime", subnet, pools);
61 Adaptor::fromParent(
"preferred-lifetime", subnet, pools);
62 Adaptor::fromParent(
"renew-timer", subnet, pools);
63 Adaptor::fromParent(
"rebind-timer", subnet, pools);
67 AdaptorPool::toSubnet(
const string& model,
ElementPtr subnet,
69 if (model == IETF_DHCPV6_SERVER) {
70 toSubnetIetf6(subnet, pools);
71 }
else if ((model != KEA_DHCP4_SERVER) &&
72 (model != KEA_DHCP6_SERVER)) {
74 "toSubnet not implemented for the model: " << model);
80 Adaptor::toParent(
"valid-lifetime", subnet, pools);
81 Adaptor::toParent(
"preferred-lifetime", subnet, pools);
82 Adaptor::toParent(
"renew-timer", subnet, pools);
83 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.