Kea
1.9.9-git
|
Control Agent Configuration Context. More...
#include <ca_cfg_mgr.h>
Public Member Functions | |
CtrlAgentCfgContext () | |
Default constructor. More... | |
virtual process::ConfigPtr | clone () |
Creates a clone of this context object. More... | |
const isc::http::HttpAuthConfigPtr & | getAuthConfig () const |
Returns HTTP authentication configuration. More... | |
std::string | getCertFile () const |
Returns cert-file parameter. More... | |
bool | getCertRequired () const |
Returns cert-required parameter. More... | |
isc::data::ConstElementPtr | getControlSocketInfo (const std::string &service) const |
Returns information about control socket. More... | |
std::string | getControlSocketInfoSummary () const |
Returns socket configuration summary in a textual format. More... | |
isc::hooks::HooksConfig & | getHooksConfig () |
Returns non-const reference to configured hooks libraries. More... | |
const isc::hooks::HooksConfig & | getHooksConfig () const |
Returns const reference to configured hooks libraries. More... | |
std::string | getHttpHost () const |
Returns http-host parameter. More... | |
uint16_t | getHttpPort () const |
Returns the TCP post the HTTP server will listen on. More... | |
std::string | getKeyFile () const |
Returns key-file parameter. More... | |
std::string | getTrustAnchor () const |
Returns trust-anchor parameter. More... | |
void | setAuthConfig (const isc::http::HttpAuthConfigPtr &auth_config) |
Sets HTTP authentication configuration. More... | |
void | setCertFile (const std::string &cert) |
Sets cert-file parameter. More... | |
void | setCertRequired (bool required) |
Sets cert-required parameter. More... | |
void | setControlSocketInfo (const isc::data::ConstElementPtr &control_socket, const std::string &service) |
Sets information about the control socket. More... | |
void | setHttpHost (const std::string &host) |
Sets http-host parameter. More... | |
void | setHttpPort (const uint16_t port) |
Sets http port. More... | |
void | setKeyFile (const std::string &key) |
Sets key-file parameter. More... | |
void | setTrustAnchor (const std::string &ca) |
Sets trust-anchor parameter. More... | |
virtual isc::data::ElementPtr | toElement () const |
Unparse a configuration object. More... | |
Public Member Functions inherited from isc::process::ConfigBase | |
const process::LoggingInfoStorage & | getLoggingInfo () const |
Returns logging specific configuration. More... | |
void | addLoggingInfo (const process::LoggingInfo &logging_info) |
Sets logging specific configuration. More... | |
void | applyLoggingCfg () const |
Apply logging configuration to log4cplus. More... | |
bool | equals (const ConfigBase &other) const |
Compares two configuration. More... | |
virtual void | merge (ConfigBase &other) |
Merges specified configuration into this configuration. More... | |
process::ConstConfigControlInfoPtr | getConfigControlInfo () const |
Fetches a read-only copy of the configuration control information. More... | |
void | setConfigControlInfo (const process::ConfigControlInfoPtr &config_ctl_info) |
Set the configuration control information. More... | |
void | setServerTag (const util::Optional< std::string > &server_tag) |
Sets the server's logical name. More... | |
util::Optional< std::string > | getServerTag () const |
Returns the server's logical name. More... | |
boost::posix_time::ptime | getLastCommitTime () const |
Returns the last commit timestamp. More... | |
void | setLastCommitTime (const boost::posix_time::ptime &last_commit_time) |
Sets the last commit timestamp. 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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::data::UserContext | |
static data::ElementPtr | toElement (data::ConstElementPtr map) |
Copy an Element map. More... | |
Protected Member Functions inherited from isc::process::ConfigBase | |
void | copy (ConfigBase &new_config) const |
Copies the current configuration to a new configuration. More... | |
Protected Attributes inherited from isc::data::UserContext | |
data::ConstElementPtr | user_context_ |
Pointer to the user context (may be NULL) More... | |
Control Agent Configuration Context.
Implement the storage container for configuration context. It provides a single enclosure for the storage of configuration parameters and any other Control Agent specific information that needs to be accessible during configuration parsing as well as to the application as a whole. It is derived from the context base class, ConfigBase.
Definition at line 32 of file ca_cfg_mgr.h.
isc::agent::CtrlAgentCfgContext::CtrlAgentCfgContext | ( | ) |
|
inlinevirtual |
Creates a clone of this context object.
Note this method does not do deep copy the information about control sockets. That data is stored as ConstElementPtr (a shared pointer) to the actual data.
Definition at line 44 of file ca_cfg_mgr.h.
References CtrlAgentCfgContext().
|
inline |
Returns HTTP authentication configuration.
Definition at line 116 of file ca_cfg_mgr.h.
|
inline |
Returns cert-file parameter.
Definition at line 145 of file ca_cfg_mgr.h.
|
inline |
Returns cert-required parameter.
Definition at line 175 of file ca_cfg_mgr.h.
data::ConstElementPtr isc::agent::CtrlAgentCfgContext::getControlSocketInfo | ( | const std::string & | service | ) | const |
Returns information about control socket.
This method returns Element tree structure that describes the control socket (or null pointer if the socket is not defined for a particular server type). This information is expected to be compatible with data passed to isc::config::CommandMgr::openCommandSocket.
service | server being controlled |
Definition at line 152 of file ca_cfg_mgr.cc.
std::string isc::agent::CtrlAgentCfgContext::getControlSocketInfoSummary | ( | ) | const |
Returns socket configuration summary in a textual format.
Definition at line 164 of file ca_cfg_mgr.cc.
|
inline |
Returns non-const reference to configured hooks libraries.
Definition at line 182 of file ca_cfg_mgr.h.
|
inline |
Returns const reference to configured hooks libraries.
Definition at line 189 of file ca_cfg_mgr.h.
|
inline |
Returns http-host parameter.
Definition at line 86 of file ca_cfg_mgr.h.
|
inline |
Returns the TCP post the HTTP server will listen on.
Definition at line 98 of file ca_cfg_mgr.h.
|
inline |
Returns key-file parameter.
Definition at line 159 of file ca_cfg_mgr.h.
|
inline |
Returns trust-anchor parameter.
Definition at line 131 of file ca_cfg_mgr.h.
|
inline |
Sets HTTP authentication configuration.
auth_config | HTTP authentication configuration. |
Definition at line 107 of file ca_cfg_mgr.h.
|
inline |
Sets cert-file parameter.
cert | Server certificate file name |
Definition at line 138 of file ca_cfg_mgr.h.
|
inline |
Sets cert-required parameter.
required | Client certificates are required when true (the default) or optional when false |
Definition at line 167 of file ca_cfg_mgr.h.
void isc::agent::CtrlAgentCfgContext::setControlSocketInfo | ( | const isc::data::ConstElementPtr & | control_socket, |
const std::string & | service | ||
) |
Sets information about the control socket.
This method stores Element tree structure that describes the control socket. This information is expected to be compatible with data passed to isc::config::CommandMgr::openCommandSocket.
control_socket | Element that holds control-socket map |
service | server being controlled |
Definition at line 158 of file ca_cfg_mgr.cc.
|
inline |
Sets http-host parameter.
host | Hostname or IP address where the agent's HTTP service will be available. |
Definition at line 78 of file ca_cfg_mgr.h.
|
inline |
Sets http port.
port | sets the TCP port the HTTP server will listen on |
Definition at line 93 of file ca_cfg_mgr.h.
|
inline |
Sets key-file parameter.
key | Server private key file name |
Definition at line 152 of file ca_cfg_mgr.h.
|
inline |
Sets trust-anchor parameter.
ca | Trust anchor aka Certificate Authority (can be a file name or a directory path). |
Definition at line 124 of file ca_cfg_mgr.h.
|
virtual |
Unparse a configuration object.
Returns an element which must parse into the same object, i.e.
Reimplemented from isc::process::ConfigBase.
Definition at line 181 of file ca_cfg_mgr.cc.
References isc::data::UserContext::contextToElement(), and isc::hooks::HooksConfig::toElement().