Kea 2.7.6
|
Ctrl Agent Configuration Manager. More...
#include <ca_cfg_mgr.h>
Public Member Functions | |
CtrlAgentCfgMgr () | |
Constructor. | |
virtual | ~CtrlAgentCfgMgr () |
Destructor. | |
virtual std::string | getConfigSummary (const uint32_t selection) override |
Returns configuration summary in the textual format. | |
CtrlAgentCfgContextPtr | getCtrlAgentCfgContext () |
Convenience method that returns the Control Agent configuration context. | |
Public Member Functions inherited from isc::process::DCfgMgrBase | |
DCfgMgrBase (ConfigPtr context) | |
Constructor. | |
virtual | ~DCfgMgrBase () |
Destructor. | |
ConfigPtr & | getContext () |
Fetches the configuration context. | |
isc::data::ConstElementPtr | redactConfig (isc::data::ConstElementPtr const &config) const |
Redact the configuration. | |
isc::data::ConstElementPtr | simpleParseConfig (isc::data::ConstElementPtr config, bool check_only=false, const std::function< void()> &post_config_cb=nullptr) |
Acts as the receiver of new configurations. | |
Protected Member Functions | |
virtual process::ConfigPtr | createNewContext () override |
Creates a new, blank CtrlAgentCfgContext context. | |
std::list< std::list< std::string > > | jsonPathsToRedact () const final override |
Return a list of all paths that contain passwords or secrets. | |
virtual isc::data::ConstElementPtr | parse (isc::data::ConstElementPtr config, bool check_only) override |
Parses configuration of the Control Agent. | |
Protected Member Functions inherited from isc::process::DCfgMgrBase | |
void | resetContext () |
Replaces existing context with a new, empty context. | |
virtual void | setCfgDefaults (isc::data::ElementPtr mutable_config) |
Adds default values to the given config. | |
void | setContext (ConfigPtr &context) |
Update the current context. | |
Ctrl Agent Configuration Manager.
Provides the mechanisms for managing the Control Agent application's configuration.
Definition at line 271 of file ca_cfg_mgr.h.
isc::agent::CtrlAgentCfgMgr::CtrlAgentCfgMgr | ( | ) |
Constructor.
Definition at line 39 of file ca_cfg_mgr.cc.
|
virtual |
Destructor.
Definition at line 43 of file ca_cfg_mgr.cc.
|
overrideprotectedvirtual |
Creates a new, blank CtrlAgentCfgContext context.
This method is used at the beginning of configuration process to create a fresh, empty copy of a CtrlAgentCfgContext. This new context will be populated during the configuration process and will replace the existing context provided the configuration process completes without error.
Implements isc::process::DCfgMgrBase.
Definition at line 89 of file ca_cfg_mgr.cc.
|
overridevirtual |
Returns configuration summary in the textual format.
selection | Bitfield which describes the parts of the configuration to be returned. This parameter is ignored for the Control Agent. |
Implements isc::process::DCfgMgrBase.
Definition at line 47 of file ca_cfg_mgr.cc.
References getCtrlAgentCfgContext().
|
inline |
Convenience method that returns the Control Agent configuration context.
Definition at line 284 of file ca_cfg_mgr.h.
References isc::process::DCfgMgrBase::getContext().
Referenced by getConfigSummary(), and parse().
|
finaloverrideprotectedvirtual |
Return a list of all paths that contain passwords or secrets.
Used in isc::process::DCfgMgrBase::redactConfig.
Reimplemented from isc::process::DCfgMgrBase.
Definition at line 144 of file ca_cfg_mgr.cc.
|
overrideprotectedvirtual |
Parses configuration of the Control Agent.
config | Pointer to a configuration specified for the agent. |
check_only | Boolean flag indicating if this method should only verify correctness of the provided configuration. |
Reimplemented from isc::process::DCfgMgrBase.
Definition at line 94 of file ca_cfg_mgr.cc.
References isc::agent::agent_logger, isc::agent::AgentSimpleParser::checkTlsSetup(), isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::agent::CTRL_AGENT_CONFIG_CHECK_FAIL, isc::agent::CTRL_AGENT_CONFIG_FAIL, getCtrlAgentCfgContext(), isc_throw, LOG_ERROR, isc::agent::AgentSimpleParser::parse(), and isc::agent::AgentSimpleParser::setAllDefaults().