Kea  2.3.5-git
isc::dhcp::CfgConsistency Class Reference

Parameters for various consistency checks. More...

#include <cfg_consistency.h>

+ Inheritance diagram for isc::dhcp::CfgConsistency:

Public Types

enum  ExtendedInfoSanity { EXTENDED_INFO_CHECK_NONE, EXTENDED_INFO_CHECK_FIX, EXTENDED_INFO_CHECK_STRICT, EXTENDED_INFO_CHECK_PEDANTIC }
 Values for extended info sanity checks done for leases. More...
 
enum  LeaseSanity {
  LEASE_CHECK_NONE, LEASE_CHECK_WARN, LEASE_CHECK_FIX, LEASE_CHECK_FIX_DEL,
  LEASE_CHECK_DEL
}
 Values for subnet-id sanity checks done for leases. More...
 

Public Member Functions

 CfgConsistency ()
 Constructor. More...
 
ExtendedInfoSanity getExtendedInfoSanityCheck () const
 Returns specific sanity checks mode for extended info. More...
 
LeaseSanity getLeaseSanityCheck () const
 Returns specific sanity checks mode for leases. More...
 
void setExtendedInfoSanityCheck (ExtendedInfoSanity l)
 Sets specific sanity checks mode for extended info. More...
 
void setLeaseSanityCheck (LeaseSanity l)
 Sets specific sanity checks mode for leases. More...
 
virtual isc::data::ElementPtr toElement () const
 Returns JSON representation. More...
 
- Public Member Functions inherited from isc::data::UserContext
void contextToElement (data::ElementPtr map) const
 Merge unparse a user_context object. More...
 
data::ConstElementPtr getContext () const
 Returns const pointer to the user context. More...
 
void setContext (const data::ConstElementPtr &ctx)
 Sets user context. More...
 
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor. More...
 

Static Public Member Functions

static std::string sanityCheckToText (LeaseSanity check_type)
 Converts lease sanity check value to printable text. More...
 
static std::string sanityCheckToText (ExtendedInfoSanity check_type)
 Converts extended info sanity check value to printable text. More...
 
- Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr toElement (data::ConstElementPtr map)
 Copy an Element map. More...
 

Additional Inherited Members

- Protected Attributes inherited from isc::data::UserContext
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL) More...
 

Detailed Description

Parameters for various consistency checks.

Definition at line 19 of file cfg_consistency.h.

Member Enumeration Documentation

◆ ExtendedInfoSanity

Values for extended info sanity checks done for leases.

Enumerator
EXTENDED_INFO_CHECK_NONE 
EXTENDED_INFO_CHECK_FIX 
EXTENDED_INFO_CHECK_STRICT 
EXTENDED_INFO_CHECK_PEDANTIC 

Definition at line 36 of file cfg_consistency.h.

◆ LeaseSanity

Values for subnet-id sanity checks done for leases.

Enumerator
LEASE_CHECK_NONE 
LEASE_CHECK_WARN 
LEASE_CHECK_FIX 
LEASE_CHECK_FIX_DEL 
LEASE_CHECK_DEL 

Definition at line 24 of file cfg_consistency.h.

Constructor & Destructor Documentation

◆ CfgConsistency()

isc::dhcp::CfgConsistency::CfgConsistency ( )
inline

Constructor.

Definition at line 45 of file cfg_consistency.h.

References toElement().

+ Here is the call graph for this function:

Member Function Documentation

◆ getExtendedInfoSanityCheck()

ExtendedInfoSanity isc::dhcp::CfgConsistency::getExtendedInfoSanityCheck ( ) const
inline

Returns specific sanity checks mode for extended info.

Returns
sanity checks mode

Definition at line 84 of file cfg_consistency.h.

References sanityCheckToText().

+ Here is the call graph for this function:

◆ getLeaseSanityCheck()

LeaseSanity isc::dhcp::CfgConsistency::getLeaseSanityCheck ( ) const
inline

Returns specific sanity checks mode for leases.

Returns
sanity checks mode

Definition at line 65 of file cfg_consistency.h.

References sanityCheckToText().

+ Here is the call graph for this function:

◆ sanityCheckToText() [1/2]

std::string isc::dhcp::CfgConsistency::sanityCheckToText ( LeaseSanity  check_type)
static

Converts lease sanity check value to printable text.

Parameters
check_typesanity mode to be converted

Definition at line 27 of file cfg_consistency.cc.

Referenced by getExtendedInfoSanityCheck(), isc::dhcp::Memfile_LeaseMgr::getLeases6ByLink(), and getLeaseSanityCheck().

◆ sanityCheckToText() [2/2]

std::string isc::dhcp::CfgConsistency::sanityCheckToText ( ExtendedInfoSanity  check_type)
static

Converts extended info sanity check value to printable text.

Parameters
check_typesanity mode to be converted

Definition at line 44 of file cfg_consistency.cc.

◆ setExtendedInfoSanityCheck()

void isc::dhcp::CfgConsistency::setExtendedInfoSanityCheck ( ExtendedInfoSanity  l)
inline

Sets specific sanity checks mode for extended info.

Parameters
lsanity checks mode

Definition at line 77 of file cfg_consistency.h.

◆ setLeaseSanityCheck()

void isc::dhcp::CfgConsistency::setLeaseSanityCheck ( LeaseSanity  l)
inline

Sets specific sanity checks mode for leases.

Parameters
lsanity checks mode

Definition at line 58 of file cfg_consistency.h.

◆ toElement()

isc::data::ElementPtr isc::dhcp::CfgConsistency::toElement ( ) const
virtual

Returns JSON representation.

Returns
Element pointer

Implements isc::data::CfgToElement.

Definition at line 17 of file cfg_consistency.cc.

Referenced by CfgConsistency().


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