![]() |
Kea 3.1.1
|
A class for parsing extended host reservation data. More...
#include <host_data_parser.h>
Public Member Functions | |
isc::dhcp::HostPtr | parseWithSubnet (isc::data::ConstElementPtr host_data, bool required=true) |
Parser specified parameter as host reservation data. | |
A class for parsing extended host reservation data.
This template class provides a convenient interface for parsing extended host reservation data. Extended means that it is the typical host reservation as used in configuration file, with the addition of subnet-id parameter. It is not needed in the configuration file, because it's always obvious from the context (HR is defined in a subnet that has subnet-id). However, in reservation-add, reservation-del, reservation-update commands, the subnet-id parameter has to be specified explicitly.
ParserBase | base class to be extended |
Definition at line 30 of file host_data_parser.h.
|
inline |
Parser specified parameter as host reservation data.
This method expects the input to be a ConstElementPtr tree structure that represents host reservation information. If parsing is successful, it returns HostPtr to the Host object that was created.
This method calls parse method from the ParserBase class. This method may throw additional exception types.
host_data | Element tree to be parsed |
required | True (default) if the subnet-id entry is required, false otherwise. |
BadValue | if subnet-id is required but missing, or has invalid format. |
Definition at line 48 of file host_data_parser.h.
Referenced by isc::host_cmds::HostCmdsImpl::reservationAddHandler(), and isc::host_cmds::HostCmdsImpl::reservationUpdateHandler().