Kea 2.7.6
|
Provides configuration information used during a server's configuration process. More...
#include <config_ctl_info.h>
Public Member Functions | |
ConfigDbInfo () | |
Constructor. | |
bool | equals (const ConfigDbInfo &other) const |
Compares two objects for equality. | |
std::string | getAccessString () const |
Retrieves the database access string. | |
const db::DatabaseConnection::ParameterMap & | getParameters () const |
Retrieve the map of parameter values. | |
bool | getParameterValue (const std::string &name, std::string &value) const |
Fetch the value of a given parameter. | |
bool | operator!= (const ConfigDbInfo &other) const |
Compares two objects for inequality. | |
bool | operator== (const ConfigDbInfo &other) const |
Compares two objects for equality. | |
std::string | redactedAccessString () const |
Retrieves the database access string with password redacted. | |
void | setAccessString (const std::string &access_str, bool test_mode=false) |
Set the access string. | |
virtual isc::data::ElementPtr | toElement () const |
Unparse a configuration object. | |
Public Member Functions inherited from isc::data::CfgToElement | |
virtual | ~CfgToElement () |
Destructor. | |
Provides configuration information used during a server's configuration process.
Definition at line 24 of file config_ctl_info.h.
|
inline |
Constructor.
Definition at line 27 of file config_ctl_info.h.
bool isc::process::ConfigDbInfo::equals | ( | const ConfigDbInfo & | other | ) | const |
Compares two objects for equality.
other | An object to be compared with this object. |
Definition at line 26 of file config_ctl_info.cc.
Referenced by operator!=(), and operator==().
|
inline |
Retrieves the database access string.
Definition at line 45 of file config_ctl_info.h.
|
inline |
Retrieve the map of parameter values.
Definition at line 59 of file config_ctl_info.h.
bool isc::process::ConfigDbInfo::getParameterValue | ( | const std::string & | name, |
std::string & | value ) const |
Fetch the value of a given parameter.
name | name of the parameter value to fetch. | |
[out] | value | string which will contain the value of the parameter (if found). |
Definition at line 36 of file config_ctl_info.cc.
|
inline |
Compares two objects for inequality.
other | An object to be compared with this object. |
Definition at line 100 of file config_ctl_info.h.
References equals().
|
inline |
Compares two objects for equality.
other | An object to be compared with this object. |
Definition at line 91 of file config_ctl_info.h.
References equals().
|
inline |
Retrieves the database access string with password redacted.
Definition at line 52 of file config_ctl_info.h.
References isc::db::DatabaseConnection::redactedAccessString().
void isc::process::ConfigDbInfo::setAccessString | ( | const std::string & | access_str, |
bool | test_mode = false ) |
Set the access string.
Sets the db's access string to the given value and then parses it into name-value pairs and storing them internally as a DatabaseConnection::ParameterMap. It discards the existing content of the map first. It does not validate the parameter names of values, ensuring the validity of the string content is placed upon the caller.
access_str | string of name=value pairs separated by spaces. |
test_mode | flag used in unittests only to skip parsing the access string and storing the parameters. |
Definition at line 17 of file config_ctl_info.cc.
References isc::db::DatabaseConnection::parse().
Referenced by isc::process::ConfigControlInfo::addConfigDatabase().
|
virtual |
Unparse a configuration object.
Implements isc::data::CfgToElement.
Definition at line 31 of file config_ctl_info.cc.
References isc::db::DatabaseConnection::toElementDbAccessString().