2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 22:45:18 +00:00

[5533a] Addressed comments

This commit is contained in:
Francis Dupont
2018-03-08 02:49:19 +01:00
parent 019d977bea
commit f7ee3792cd
26 changed files with 343 additions and 237 deletions

View File

@@ -13,6 +13,7 @@
#include <dhcpsrv/cfg_option.h>
#include <dhcpsrv/cfgmgr.h>
#include <dhcp4/json_config_parser.h>
#include <dhcpsrv/db_type.h>
#include <dhcpsrv/parsers/client_class_def_parser.h>
#include <dhcpsrv/parsers/dbaccess_parser.h>
#include <dhcpsrv/parsers/dhcp_parsers.h>
@@ -412,14 +413,14 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set,
// Please move at the end when migration will be finished.
if (config_pair.first == "lease-database") {
DbAccessParser parser(CfgDbAccess::LEASE_DB);
DbAccessParser parser(DBType::LEASE_DB);
CfgDbAccessPtr cfg_db_access = srv_cfg->getCfgDbAccess();
parser.parse(cfg_db_access, config_pair.second);
continue;
}
if (config_pair.first == "hosts-database") {
DbAccessParser parser(CfgDbAccess::HOSTS_DB);
DbAccessParser parser(DBType::HOSTS_DB);
CfgDbAccessPtr cfg_db_access = srv_cfg->getCfgDbAccess();
parser.parse(cfg_db_access, config_pair.second);
continue;
@@ -427,9 +428,10 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set,
if (config_pair.first == "hosts-databases") {
CfgDbAccessPtr cfg_db_access = srv_cfg->getCfgDbAccess();
for (size_t i = 0; i < config_pair.second->size(); ++i) {
DbAccessParser parser(CfgDbAccess::HOSTS_DB + i);
parser.parse(cfg_db_access, config_pair.second->get(i));
DbAccessParser parser(DBType::HOSTS_DB);
auto list = config_pair.second->listValue();
for (auto it : list) {
parser.parse(cfg_db_access, it);
}
continue;
}