26 if (config_control->contains(
"config-databases")) {
28 auto elem = config_control->get(
"config-databases");
31 << elem->getPosition() <<
")");
34 const std::vector<data::ElementPtr>& db_list = elem->listValue();
35 for (
auto const& db : db_list) {
37 std::string access_string;
38 parser.
parse(access_string, db);
42 ctl_info->addConfigDatabase(access_string);
46 if (config_control->contains(
"config-fetch-wait-time")) {
47 auto config_fetch_wait_time =
getInteger(config_control,
48 "config-fetch-wait-time",
50 ctl_info->setConfigFetchWaitTime(
static_cast<uint16_t
>(config_fetch_wait_time));
56 }
catch (
const std::exception& ex) {
58 << config_control->getPosition() <<
")");
An exception that is thrown if an error occurs while configuring any server.
static int64_t getInteger(isc::data::ConstElementPtr scope, const std::string &name)
Returns an integer parameter from a scope.
Parse Database Parameters.
void parse(std::string &access_string, isc::data::ConstElementPtr database_config)
Parse configuration value.
Embodies configuration information used during a server's configuration process.
ConfigControlInfoPtr parse(const data::ConstElementPtr &config_control)
Parses a configuration control Element.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< ConfigControlInfo > ConfigControlInfoPtr
Defines a pointer to a ConfigControlInfo.
Defines the logger used by the top-level component of kea-lfc.