Kea 3.1.1
isc::host_cmds::HostCmdsImpl Class Reference

Wrapper class around reservation command handlers. More...

+ Inheritance diagram for isc::host_cmds::HostCmdsImpl:

Classes

class  Parameters
 Parameters specified for reservation-get and reservation-del. More...
 

Public Member Functions

 HostCmdsImpl ()
 Constructor.
 
 ~HostCmdsImpl ()
 Destructor.
 
int reservationAddHandler (CalloutHandle &handle)
 reservation-add command handler
 
int reservationDelHandler (CalloutHandle &handle)
 reservation-del command handler
 
int reservationGetAllHandler (CalloutHandle &handle)
 reservation-get-all command handler
 
int reservationGetByAddressHandler (CalloutHandle &handle)
 reservation-get-by-address command handler
 
int reservationGetByHostnameHandler (CalloutHandle &handle)
 reservation-get-by-hostname command handler
 
int reservationGetByIdHandler (CalloutHandle &handle)
 reservation-get-by-id command handler
 
int reservationGetHandler (CalloutHandle &handle)
 reservation-get command handler
 
int reservationGetPageHandler (CalloutHandle &handle)
 reservation-get-page command handler
 
int reservationUpdateHandler (CalloutHandle &handle)
 reservation-update command handler
 

Detailed Description

Wrapper class around reservation command handlers.

Definition at line 42 of file host_cmds.cc.

Constructor & Destructor Documentation

◆ HostCmdsImpl()

isc::host_cmds::HostCmdsImpl::HostCmdsImpl ( )

Constructor.

Definition at line 319 of file host_cmds.cc.

References isc::dhcp::CfgMgr::getFamily(), isc::dhcp::HostMgr::getHostDataSource(), isc::dhcp::CfgMgr::instance(), and isc::dhcp::HostMgr::instance().

+ Here is the call graph for this function:

◆ ~HostCmdsImpl()

isc::host_cmds::HostCmdsImpl::~HostCmdsImpl ( )

Destructor.

Definition at line 340 of file host_cmds.cc.

Member Function Documentation

◆ reservationAddHandler()

int isc::host_cmds::HostCmdsImpl::reservationAddHandler ( CalloutHandle & handle)

reservation-add command handler

Provides the implementation for isc::host_cmds::HostCmds::reservationAddHandler

Parameters
handleCallout context - which is expected to contain the add command JSON text in the "command" argument
Returns
0 upon success, non-zero otherwise

Definition at line 345 of file host_cmds.cc.

References isc::dhcp::HostMgr::add(), isc::dhcp::ALTERNATE_SOURCES, isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::extractCommand(), isc::dhcp::HostMgr::getHostDataSource(), isc::host_cmds::host_cmds_logger, HOST_CMDS_RESERV_ADD, HOST_CMDS_RESERV_ADD_FAILED, HOST_CMDS_RESERV_ADD_SUCCESS, isc::dhcp::HostMgr::instance(), isc_throw, LOG_ERROR, LOG_INFO, isc::host_cmds::HostDataParser< ParserBase >::parseWithSubnet(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), isc::dhcp::IPv6Resrv::TYPE_NA, and isc::dhcp::UNSPECIFIED_SOURCE.

+ Here is the call graph for this function:

◆ reservationDelHandler()

◆ reservationGetAllHandler()

int isc::host_cmds::HostCmdsImpl::reservationGetAllHandler ( CalloutHandle & handle)

◆ reservationGetByAddressHandler()

◆ reservationGetByHostnameHandler()

int isc::host_cmds::HostCmdsImpl::reservationGetByHostnameHandler ( CalloutHandle & handle)

reservation-get-by-hostname command handler

Provides the implementation for isc::host_cmds::HostCmds::reservationGetByHostnameHandler

Parameters
handleCallout context - which is expected to contain the reservation-get-by-hostname command JSON text in the "command" argument
Returns
0 upon success, non-zero otherwise

Definition at line 1271 of file host_cmds.cc.

References isc::dhcp::ALL_SOURCES, isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_SUCCESS, Element::create(), isc::config::createAnswer(), Element::createList(), Element::createMap(), isc::config::CmdsImpl::extractCommand(), isc::dhcp::HostMgr::getAllbyHostname(), isc::dhcp::HostMgr::getAllbyHostname4(), isc::dhcp::HostMgr::getAllbyHostname6(), isc::host_cmds::HostCmdsImpl::Parameters::has_subnet_id, isc::host_cmds::host_cmds_logger, HOST_CMDS_RESERV_GET_BY_HOSTNAME, HOST_CMDS_RESERV_GET_BY_HOSTNAME_FAILED, HOST_CMDS_RESERV_GET_BY_HOSTNAME_SUCCESS, isc::host_cmds::HostCmdsImpl::Parameters::hostname, isc::dhcp::HostMgr::instance(), isc::asiolink::IOAddress::IPV4_ZERO_ADDRESS(), isc_throw, LOG_ERROR, LOG_INFO, isc::host_cmds::HostCmdsImpl::Parameters::operation_target, isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setResponse(), isc::host_cmds::HostCmdsImpl::Parameters::subnet_id, and isc::dhcp::UNSPECIFIED_SOURCE.

+ Here is the call graph for this function:

◆ reservationGetByIdHandler()

int isc::host_cmds::HostCmdsImpl::reservationGetByIdHandler ( CalloutHandle & handle)

◆ reservationGetHandler()

◆ reservationGetPageHandler()

◆ reservationUpdateHandler()


The documentation for this class was generated from the following file: