Kea  2.1.7-git
isc::dhcp::CBControlDHCPv4 Class Reference

Implementation of the mechanisms to control the use of the Configuration Backends by the DHCPv4 server. More...

#include <cb_ctl_dhcp4.h>

+ Inheritance diagram for isc::dhcp::CBControlDHCPv4:

Protected Member Functions

virtual void databaseConfigApply (const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &lb_modification_time, const db::AuditEntryCollection &audit_entries)
 DHCPv4 server specific method to fetch and apply back end configuration into the local configuration. More...
 
- Protected Member Functions inherited from isc::dhcp::CBControlDHCP< ConfigBackendDHCPv4Mgr >
void addGlobalsToConfig (SrvConfigPtr external_cfg, data::StampedValueCollection &cb_globals) const
 Adds globals fetched from config backend(s) to a SrvConfig instance. More...
 
- Protected Member Functions inherited from isc::process::CBControlBase< ConfigBackendDHCPv4Mgr >
db::AuditEntryCollection fetchConfigElement (const db::AuditEntryCollection &audit_entries, const std::string &object_type) const
 Returns audit entries for new or updated configuration elements of specific type to be fetched from the database. More...
 
ConfigBackendDHCPv4Mgr & getMgr () const
 Returns the instance of the Config Backend Manager used by this object. More...
 
void updateLastAuditRevisionTimeId (const db::AuditEntryCollection &audit_entries)
 Updates timestamp of the most recent audit entry fetched from the database. More...
 

Additional Inherited Members

- Public Types inherited from isc::process::CBControlBase< ConfigBackendDHCPv4Mgr >
enum  FetchMode
 Fetch mode used in invocations to databaseConfigFetch. More...
 
- Public Member Functions inherited from isc::dhcp::CBControlDHCP< ConfigBackendDHCPv4Mgr >
 CBControlDHCP ()
 Constructor. More...
 
- Public Member Functions inherited from isc::process::CBControlBase< ConfigBackendDHCPv4Mgr >
 CBControlBase ()
 Constructor. More...
 
virtual ~CBControlBase ()
 Virtual destructor. More...
 
bool databaseConfigConnect (const ConfigPtr &srv_cfg)
 (Re)connects to the specified configuration backends. More...
 
void databaseConfigDisconnect ()
 Disconnects from the configuration backends. More...
 
virtual void databaseConfigFetch (const ConfigPtr &srv_cfg, const FetchMode &fetch_mode=FetchMode::FETCH_ALL)
 Fetches the entire or partial configuration from the database. More...
 
void reset ()
 Resets the state of this object. More...
 
- Static Protected Member Functions inherited from isc::process::CBControlBase< ConfigBackendDHCPv4Mgr >
static boost::posix_time::ptime getInitialAuditRevisionTime ()
 Convenience method returning initial timestamp to set the last_audit_revision_time_ to. More...
 
- Protected Attributes inherited from isc::process::CBControlBase< ConfigBackendDHCPv4Mgr >
uint64_t last_audit_revision_id_
 Stores the most recent audit revision identifier. More...
 
boost::posix_time::ptime last_audit_revision_time_
 Stores the most recent audit revision timestamp. More...
 

Detailed Description

Implementation of the mechanisms to control the use of the Configuration Backends by the DHCPv4 server.

It implements fetching and merging DHCPv4 server configuration from the database into the staging or current configuration.

Template Parameters
ConfigBackendMgrTypeType of the Config Backend Manager used by the server implementing this class. For example, for the DHCPv4 server it will be ConfigBackendDHCPv4Mgr.

Definition at line 26 of file cb_ctl_dhcp4.h.

Member Function Documentation

◆ databaseConfigApply()

void isc::dhcp::CBControlDHCPv4::databaseConfigApply ( const db::BackendSelector backend_selector,
const db::ServerSelector server_selector,
const boost::posix_time::ptime &  lb_modification_time,
const db::AuditEntryCollection audit_entries 
)
protectedvirtual

DHCPv4 server specific method to fetch and apply back end configuration into the local configuration.

Parameters
backend_selectorBackend selector.
server_selectorServer selector.
lb_modification_timeLower bound modification time for the configuration elements to be fetched.
audit_entriesAudit entries fetched from the database since the last configuration update. This collection is empty if there were no updates.

Implements isc::process::CBControlBase< ConfigBackendDHCPv4Mgr >.

Definition at line 46 of file cb_ctl_dhcp4.cc.

References isc::dhcp::ClientClassDictionary::createOptions(), isc::db::AuditEntry::DELETE, isc::dhcp::DHCPSRV_CFGMGR_CONFIG4_MERGED, isc::dhcp::DHCPSRV_CFGMGR_IPV4_RESERVATIONS_NON_UNIQUE_IGNORED, isc::dhcp::dhcpsrv_logger, isc::process::hasObjectId(), isc::dhcp::ClientClassDictionary::initMatchExpr(), LOG_INFO, and LOG_WARN.

+ Here is the call graph for this function:

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