Kea 2.7.5
|
Base class for implementing mechanisms to control the use of the Configuration Backends by DHCPv4 and DHCPv6 servers. More...
#include <cb_ctl_dhcp.h>
Public Member Functions | |
CBControlDHCP () | |
Constructor. | |
Public Member Functions inherited from isc::process::CBControlBase< ConfigBackendMgrType > | |
CBControlBase () | |
Constructor. | |
virtual | ~CBControlBase () |
Virtual destructor. | |
bool | databaseConfigConnect (const ConfigPtr &srv_cfg) |
(Re)connects to the specified configuration backends. | |
void | databaseConfigDisconnect () |
Disconnects from the configuration backends. | |
virtual void | databaseConfigFetch (const ConfigPtr &srv_cfg, const FetchMode &fetch_mode=FetchMode::FETCH_ALL) |
Fetches the entire or partial configuration from the database. | |
void | reset () |
Resets the state of this object. | |
Static Public Member Functions | |
static bool | translateName (std::string const &name, std::string ¶m_name, std::string &sub_param_name) |
It translates the top level map parameters from flat naming format (e.g. | |
Protected Member Functions | |
void | translateAndAddGlobalsToConfig (SrvConfigPtr external_cfg, data::StampedValueCollection &cb_globals) const |
It translates the top level map parameters from flat naming format (e.g. | |
Protected Member Functions inherited from isc::process::CBControlBase< ConfigBackendMgrType > | |
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)=0 |
Server specific method to fetch and apply back end configuration into the local configuration. | |
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. | |
ConfigBackendMgrType & | getMgr () const |
Returns the instance of the Config Backend Manager used by this object. | |
void | updateLastAuditRevisionTimeId (const db::AuditEntryCollection &audit_entries) |
Updates timestamp of the most recent audit entry fetched from the database. | |
Additional Inherited Members | |
Public Types inherited from isc::process::CBControlBase< ConfigBackendMgrType > | |
enum class | FetchMode { FETCH_ALL , FETCH_UPDATE } |
Fetch mode used in invocations to databaseConfigFetch . More... | |
Static Protected Member Functions inherited from isc::process::CBControlBase< ConfigBackendMgrType > | |
static boost::posix_time::ptime | getInitialAuditRevisionTime () |
Convenience method returning initial timestamp to set the last_audit_revision_time_ to. | |
Protected Attributes inherited from isc::process::CBControlBase< ConfigBackendMgrType > | |
uint64_t | last_audit_revision_id_ |
Stores the most recent audit revision identifier. | |
boost::posix_time::ptime | last_audit_revision_time_ |
Stores the most recent audit revision timestamp. | |
Base class for implementing mechanisms to control the use of the Configuration Backends by DHCPv4 and DHCPv6 servers.
It includes common methods used by the DHCPv4 and DHCPv6 specific derivations.
ConfigBackendMgrType | Type 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 27 of file cb_ctl_dhcp.h.
|
inline |
Constructor.
Definition at line 31 of file cb_ctl_dhcp.h.
|
inlineprotected |
It translates the top level map parameters from flat naming format (e.g.
param-name.sub-param-name) to proper ElementMap objects and adds all globals fetched from config backend(s) to a SrvConfig instance
Iterates over the given collection of global parameters and adds them to the given configuration's list of configured globals.
external_cfg | SrvConfig instance to update |
cb_globals | collection of global parameters supplied by configuration backend |
Definition at line 72 of file cb_ctl_dhcp.h.
References isc::data::Element::createMap(), and isc::dhcp::CBControlDHCP< ConfigBackendMgrType >::translateName().
|
inlinestatic |
It translates the top level map parameters from flat naming format (e.g.
param-name.sub-param-name) to the respective param-name and sub-param-name. If the name does not contain '.', the param-name will contain the initial name.
name | The name in flat format (e.g. map-name.element-name). | |
[out] | param_name | The resulting top level param name. |
[out] | sub_param_name | The resulting sub param name inside the map. |
Definition at line 46 of file cb_ctl_dhcp.h.
Referenced by isc::dhcp::CBControlDHCP< ConfigBackendMgrType >::translateAndAddGlobalsToConfig().