Kea 2.7.6
|
Utility class to represent host reservation configurations internally as a map keyed by subnet IDs, externally as a list Element. More...
#include <cfg_hosts_util.h>
Public Types | |
typedef std::map< SubnetID, isc::data::ElementPtr > | CfgHostsMap |
The type of the internal map. | |
Public Member Functions | |
void | add (SubnetID id, isc::data::ElementPtr resv) |
Add a host reservation to the map. | |
isc::data::ElementPtr | externalize () const |
Externalize the map to a list Element. | |
isc::data::ConstElementPtr | get (SubnetID id) const |
Return the host reservations for a subnet ID. | |
void | internalize (isc::data::ConstElementPtr list) |
Internalize a list Element. | |
Utility class to represent host reservation configurations internally as a map keyed by subnet IDs, externally as a list Element.
Definition at line 18 of file cfg_hosts_util.h.
The type of the internal map.
Definition at line 22 of file cfg_hosts_util.h.
void isc::dhcp::CfgHostsList::add | ( | SubnetID | id, |
isc::data::ElementPtr | resv ) |
Add a host reservation to the map.
Definition at line 74 of file cfg_hosts_util.cc.
References isc::data::Element::createList().
ElementPtr isc::dhcp::CfgHostsList::externalize | ( | ) | const |
Externalize the map to a list Element.
Definition at line 63 of file cfg_hosts_util.cc.
References isc::data::Element::create(), isc::data::Element::createList(), and isc::data::Element::createMap().
ConstElementPtr isc::dhcp::CfgHostsList::get | ( | SubnetID | id | ) | const |
Return the host reservations for a subnet ID.
id | the subnet ID |
Definition at line 85 of file cfg_hosts_util.cc.
References isc::data::Element::createList().
Referenced by isc::dhcp::SrvConfig::toElement().
void isc::dhcp::CfgHostsList::internalize | ( | isc::data::ConstElementPtr | list | ) |
Internalize a list Element.
This method gets a list Element and builds the internal map from it.
list | the list Element |
Definition at line 20 of file cfg_hosts_util.cc.
References isc::data::Element::integer, isc_throw, isc::data::Element::list, and isc::data::Element::map.
Referenced by isc::dhcp::SrvConfig::toElement().