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) {
51 }
else if ((model != KEA_DHCP4_SERVER) &&
52 (model != KEA_DHCP6_SERVER)) {
54 "fromSubnet not implemented for the model: " << model);
69 if (model == IETF_DHCPV6_SERVER) {
71 }
else if ((model != KEA_DHCP4_SERVER) &&
72 (model != KEA_DHCP6_SERVER)) {
74 "toSubnet not implemented for the model: " << model);
A generic exception that is thrown when a function is not implemented.
static void toSubnetIetf6(isc::data::ElementPtr subnet, isc::data::ConstElementPtr pools)
To subnet for ietf-dhcpv6-server.
static void fromSubnetIetf6(isc::data::ConstElementPtr subnet, isc::data::ConstElementPtr pools)
From subnets for ietf-dhcpv6-server.
AdaptorPool()
Constructor.
static void toSubnet(const std::string &model, isc::data::ElementPtr subnet, isc::data::ConstElementPtr pools)
Move parameters from pools to the subnet.
virtual ~AdaptorPool()
Destructor.
static void fromSubnet(const std::string &model, isc::data::ConstElementPtr subnet, isc::data::ConstElementPtr pools)
Moves parameters from subnets to pools.
static void canonizePool(isc::data::ElementPtr pool)
Canonize pool.
static void fromParent(const std::string &name, isc::data::ConstElementPtr parent, isc::data::ConstElementPtr list)
Moves a parameter from parent to a list of children.
static void toParent(const std::string &name, isc::data::ElementPtr parent, isc::data::ConstElementPtr list)
Moves a parameter to a parent.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
Defines the logger used by the top-level component of kea-lfc.