Commit a959b554 authored by Francis Dupont's avatar Francis Dupont
Browse files

[master] Finishing merge of trac5096 (migrate database config)

parents e6827b24 23ecfc00
......@@ -258,13 +258,48 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
case isc::dhcp::Parser4Context::OPTION_DEF:
case isc::dhcp::Parser4Context::SERVER_ID:
return isc::dhcp::Dhcp4Parser::make_TYPE(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("type", driver.loc_);
}
}
\"memfile\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
return isc::dhcp::Dhcp4Parser::make_MEMFILE(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("memfile", driver.loc_);
}
}
\"mysql\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
return isc::dhcp::Dhcp4Parser::make_MYSQL(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("mysql", driver.loc_);
}
}
\"postgresql\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
return isc::dhcp::Dhcp4Parser::make_POSTGRESQL(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("postgresql", driver.loc_);
}
}
\"cql\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DATABASE_TYPE:
return isc::dhcp::Dhcp4Parser::make_CQL(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("cql", driver.loc_);
}
}
\"user\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
......@@ -299,7 +334,6 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
case isc::dhcp::Parser4Context::SERVER_ID:
return isc::dhcp::Dhcp4Parser::make_PERSIST(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("persist", driver.loc_);
......@@ -316,6 +350,16 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"connect-timeout\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_CONNECT_TIMEOUT(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("connect-timeout", driver.loc_);
}
}
\"valid-lifetime\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
......@@ -737,51 +781,6 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"server-id\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
return isc::dhcp::Dhcp4Parser::make_SERVER_ID(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("server-id", driver.loc_);
}
}
\"identifier\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SERVER_ID:
return isc::dhcp::Dhcp4Parser::make_IDENTIFIER(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("identifier", driver.loc_);
}
}
\"htype\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SERVER_ID:
return isc::dhcp::Dhcp4Parser::make_HTYPE(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("htype", driver.loc_);
}
}
\"time\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SERVER_ID:
return isc::dhcp::Dhcp4Parser::make_TIME(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("time", driver.loc_);
}
}
\"enterprise-id\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::SERVER_ID:
return isc::dhcp::Dhcp4Parser::make_ENTERPRISE_ID(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("enterprise-id", driver.loc_);
}
}
\"expired-leases-processing\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
......
......@@ -65,12 +65,17 @@ using namespace std;
LEASE_DATABASE "lease-database"
HOSTS_DATABASE "hosts-database"
TYPE "type"
MEMFILE "memfile"
MYSQL "mysql"
POSTGRESQL "postgresql"
CQL "cql"
USER "user"
PASSWORD "password"
HOST "host"
PERSIST "persist"
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
CONNECT_TIMEOUT "connect-timeout"
VALID_LIFETIME "valid-lifetime"
RENEW_TIMER "renew-timer"
......@@ -129,12 +134,6 @@ using namespace std;
MAX_RECLAIM_TIME "max-reclaim-time"
UNWARNED_RECLAIM_CYCLES "unwarned-reclaim-cycles"
SERVER_ID "server-id"
IDENTIFIER "identifier"
HTYPE "htype"
TIME "time"
ENTERPRISE_ID "enterprise-id"
DHCP4O6_PORT "dhcp4o6-port"
CONTROL_SOCKET "control-socket"
......@@ -196,6 +195,7 @@ using namespace std;
%type <ElementPtr> value
%type <ElementPtr> socket_type
%type <ElementPtr> db_type
%type <ElementPtr> ncr_protocol_value
%type <ElementPtr> replace_client_name_value
......@@ -394,7 +394,6 @@ global_param: valid_lifetime
| option_data_list
| hooks_libraries
| expired_leases_processing
| server_id
| dhcp4o6_port
| control_socket
| dhcp_ddns
......@@ -506,7 +505,7 @@ database_map_params: database_map_param
| database_map_params COMMA database_map_param
;
database_map_param: type
database_map_param: database_type
| user
| password
| host
......@@ -514,17 +513,23 @@ database_map_param: type
| persist
| lfc_interval
| readonly
| connect_timeout
| unknown_map_entry
;
type: TYPE {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr prf(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("type", prf);
database_type: TYPE {
ctx.enter(ctx.DATABASE_TYPE);
} COLON db_type {
ctx.stack_.back()->set("type", $4);
ctx.leave();
};
db_type: MEMFILE { $$ = ElementPtr(new StringElement("memfile", ctx.loc2pos(@1))); }
| MYSQL { $$ = ElementPtr(new StringElement("mysql", ctx.loc2pos(@1))); }
| POSTGRESQL { $$ = ElementPtr(new StringElement("postgresql", ctx.loc2pos(@1))); }
| CQL { $$ = ElementPtr(new StringElement("cql", ctx.loc2pos(@1))); }
;
user: USER {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
......@@ -572,9 +577,9 @@ readonly: READONLY COLON BOOLEAN {
ctx.stack_.back()->set("readonly", n);
};
duid_id : DUID {
ElementPtr duid(new StringElement("duid", ctx.loc2pos(@1)));
ctx.stack_.back()->add(duid);
connect_timeout: CONNECT_TIMEOUT COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("connect-timeout", n);
};
host_reservation_identifiers: HOST_RESERVATION_IDENTIFIERS {
......@@ -597,6 +602,11 @@ host_reservation_identifier: duid_id
| client_id
;
duid_id : DUID {
ElementPtr duid(new StringElement("duid", ctx.loc2pos(@1)));
ctx.stack_.back()->add(duid);
};
hw_address_id : HW_ADDRESS {
ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(@1)));
ctx.stack_.back()->add(hwaddr);
......@@ -958,7 +968,13 @@ code: CODE COLON INTEGER {
option_def_code: code;
option_def_type: type;
option_def_type: TYPE {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr prf(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("type", prf);
ctx.leave();
};
option_def_record_types: RECORD_TYPES {
ctx.enter(ctx.NO_KEYWORD);
......@@ -1354,54 +1370,7 @@ client_class_test: TEST {
// --- end of client classes ---------------------------------
// --- server-id ---------------------------------------------
server_id: SERVER_ID {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->set("server-id", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER_ID);
} COLON LCURLY_BRACKET server_id_params RCURLY_BRACKET {
ctx.stack_.pop_back();
ctx.leave();
};
server_id_params: server_id_param
| server_id_params COMMA server_id_param
;
server_id_param: type
| identifier
| time
| htype
| enterprise_id
| persist
| unknown_map_entry
;
htype: HTYPE COLON INTEGER {
ElementPtr htype(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("htype", htype);
};
identifier: IDENTIFIER {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr id(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("identifier", id);
ctx.leave();
};
time: TIME COLON INTEGER {
ElementPtr time(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("time", time);
};
enterprise_id: ENTERPRISE_ID COLON INTEGER {
ElementPtr time(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("enterprise-id", time);
};
// --- end of server-id --------------------------------------
// was server-id but in is DHCPv6-only
dhcp4o6_port: DHCP4O6_PORT COLON INTEGER {
ElementPtr time(new IntElement($3, ctx.loc2pos(@3)));
......
......@@ -425,12 +425,9 @@ DhcpConfigParser* createGlobalDhcp4ConfigParser(const std::string& config_id,
} else if ((config_id.compare("next-server") == 0)) {
parser = new StringParser(config_id,
globalContext()->string_values_);
} else if (config_id.compare("lease-database") == 0) {
parser = new DbAccessParser(config_id, DbAccessParser::LEASE_DB);
} else if (config_id.compare("hosts-database") == 0) {
parser = new DbAccessParser(config_id, DbAccessParser::HOSTS_DB);
// hooks-libraries are now migrated to SimpleParser.
} else if (config_id.compare("echo-client-id") == 0) {
// hooks-libraries are now migrated to SimpleParser.
// lease-database and hosts-database have been converted to SimpleParser already.
} else if (config_id.compare("echo-client-id") == 0) {
parser = new BooleanParser(config_id, globalContext()->boolean_values_);
// dhcp-ddns has been converted to SimpleParser.
} else if (config_id.compare("match-client-id") == 0) {
......@@ -566,7 +563,6 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
// Please do not change this order!
ParserCollection independent_parsers;
ParserPtr subnet_parser;
ParserPtr leases_parser;
// Some of the parsers alter the state of the system in a way that can't
// easily be undone. (Or alter it in a way such that undoing the change has
......@@ -593,6 +589,8 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
ConfigPair config_pair;
try {
SrvConfigPtr srv_cfg = CfgMgr::instance().getStagingCfg();
// This is a way to convert ConstElementPtr to ElementPtr.
// We need a config that can be edited, because we will insert
// default values and will insert derived values as well.
......@@ -605,7 +603,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
ConstElementPtr option_defs = mutable_cfg->get("option-def");
if (option_defs) {
OptionDefListParser parser;
CfgOptionDefPtr cfg_option_def = CfgMgr::instance().getStagingCfg()->getCfgOptionDef();
CfgOptionDefPtr cfg_option_def = srv_cfg->getCfgOptionDef();
parser.parse(cfg_option_def, option_defs);
}
......@@ -618,7 +616,6 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
// boost, but would make the code less readable. We had serious issues
// with the parser code debugability, so I decided to keep it as a
// series of independent ifs.
if (config_pair.first == "option-def") {
// This is converted to SimpleParser and is handled already above.
continue;
......@@ -626,14 +623,13 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
if (config_pair.first == "option-data") {
OptionDataListParser parser(AF_INET);
CfgOptionPtr cfg_option = CfgMgr::instance().getStagingCfg()->getCfgOption();
CfgOptionPtr cfg_option = srv_cfg->getCfgOption();
parser.parse(cfg_option, config_pair.second);
continue;
}
if (config_pair.first == "control-socket") {
ControlSocketParser parser;
SrvConfigPtr srv_cfg = CfgMgr::instance().getStagingCfg();
parser.parse(*srv_cfg, config_pair.second);
continue;
}
......@@ -646,7 +642,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
if (config_pair.first == "interfaces-config") {
IfacesConfigParser parser(AF_INET);
CfgIfacePtr cfg_iface = CfgMgr::instance().getStagingCfg()->getCfgIface();
CfgIfacePtr cfg_iface = srv_cfg->getCfgIface();
parser.parse(cfg_iface, config_pair.second);
continue;
}
......@@ -671,7 +667,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
}
D2ClientConfigParser parser;
D2ClientConfigPtr cfg = parser.parse(config_pair.second);
CfgMgr::instance().getStagingCfg()->setD2ClientConfig(cfg);
srv_cfg->setD2ClientConfig(cfg);
continue;
}
......@@ -679,7 +675,22 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
ClientClassDefListParser parser;
ClientClassDictionaryPtr dictionary =
parser.parse(config_pair.second, AF_INET);
CfgMgr::instance().getStagingCfg()->setClientClassDictionary(dictionary);
srv_cfg->setClientClassDictionary(dictionary);
continue;
}
// Please move at the end when migration will be finished.
if (config_pair.first == "lease-database") {
DbAccessParser parser(DbAccessParser::LEASE_DB);
CfgDbAccessPtr cfg_db_access = srv_cfg->getCfgDbAccess();
parser.parse(cfg_db_access, config_pair.second);
continue;
}
if (config_pair.first == "host-database") {
DbAccessParser parser(DbAccessParser::HOSTS_DB);
CfgDbAccessPtr cfg_db_access = srv_cfg->getCfgDbAccess();
parser.parse(cfg_db_access, config_pair.second);
continue;
}
......@@ -689,8 +700,6 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
.arg(config_pair.first);
if (config_pair.first == "subnet4") {
subnet_parser = parser;
} else if (config_pair.first == "lease-database") {
leases_parser = parser;
} else {
// Those parsers should be started before other
// parsers so we can call build straight away.
......@@ -714,15 +723,6 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
// Setup the command channel.
configureCommandChannel();
// the leases database parser is the last to be run.
std::map<std::string, ConstElementPtr>::const_iterator leases_config =
values_map.find("lease-database");
if (leases_config != values_map.end()) {
config_pair.first = "lease-database";
leases_parser->build(leases_config->second);
leases_parser->commit();
}
} catch (const isc::Exception& ex) {
LOG_ERROR(dhcp4_logger, DHCP4_PARSER_FAIL)
.arg(config_pair.first).arg(ex.what());
......
// Generated 201701191339
// Generated 201701102039
// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
......
......@@ -133,6 +133,8 @@ Parser4Context::contextName()
return ("lease-database");
case HOSTS_DATABASE:
return ("hosts-database");
case DATABASE_TYPE:
return ("database-type");
case HOST_RESERVATION_IDENTIFIERS:
return ("host-reservation-identifiers");
case HOOKS_LIBRARIES:
......
......@@ -204,6 +204,9 @@ public:
/// Used while parsing Dhcp4/hosts-database structures.
HOSTS_DATABASE,
/// Used while parsing Dhcp4/*-database/type.
DATABASE_TYPE,
/// Used while parsing Dhcp4/host-reservation-identifiers.
HOST_RESERVATION_IDENTIFIERS,
......
// Generated 201701191339
// Generated 201701102039
// A Bison parser, made by GNU Bison 3.0.4.
// Positions for Bison parsers in C++
......
// Generated 201701191339
// Generated 201701102039
// A Bison parser, made by GNU Bison 3.0.4.
// Stack handling for Bison parsers in C++
......
......@@ -464,6 +464,42 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"memfile\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
return isc::dhcp::Dhcp6Parser::make_MEMFILE(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("memfile", driver.loc_);
}
}
\"mysql\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
return isc::dhcp::Dhcp6Parser::make_MYSQL(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("mysql", driver.loc_);
}
}
\"postgresql\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
return isc::dhcp::Dhcp6Parser::make_POSTGRESQL(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("postgresql", driver.loc_);
}
}
\"cql\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DATABASE_TYPE:
return isc::dhcp::Dhcp6Parser::make_CQL(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("cql", driver.loc_);
}
}
\"user\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
......@@ -515,6 +551,16 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"connect-timeout\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_CONNECT_TIMEOUT(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("connect-timeout", driver.loc_);
}
}
\"preferred-lifetime\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
......
......@@ -56,12 +56,17 @@ using namespace std;
LEASE_DATABASE "lease-database"
HOSTS_DATABASE "hosts-database"
TYPE "type"
MEMFILE "memfile"
MYSQL "mysql"
POSTGRESQL "postgresql"
CQL "cql"
USER "user"
PASSWORD "password"
HOST "host"
PERSIST "persist"
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
CONNECT_TIMEOUT "connect-timeout"
PREFERRED_LIFETIME "preferred-lifetime"
VALID_LIFETIME "valid-lifetime"
......@@ -197,6 +202,7 @@ using namespace std;
%token <bool> BOOLEAN "boolean"
%type <ElementPtr> value
%type <ElementPtr> db_type
%type <ElementPtr> duid_type
%type <ElementPtr> ncr_protocol_value
%type <ElementPtr> replace_client_name_value
......@@ -492,17 +498,23 @@ database_map_param: database_type
| persist
| lfc_interval
| readonly
| connect_timeout
| unknown_map_entry
;
database_type: TYPE {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr prf(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("type", prf);
ctx.enter(ctx.DATABASE_TYPE);
} COLON db_type {
ctx.stack_.back()->set("type", $4);
ctx.leave();
};
db_type: MEMFILE { $$ = ElementPtr(new StringElement("memfile", ctx.loc2pos(@1))); }
| MYSQL { $$ = ElementPtr(new StringElement("mysql", ctx.loc2pos(@1))); }
| POSTGRESQL { $$ = ElementPtr(new StringElement("postgresql", ctx.loc2pos(@1))); }
| CQL { $$ = ElementPtr(new StringElement("cql", ctx.loc2pos(@1))); }
;
user: USER {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
......@@ -550,6 +562,11 @@ readonly: READONLY COLON BOOLEAN {
ctx.stack_.back()->set("readonly", n);
};
connect_timeout: CONNECT_TIMEOUT COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("connect-timeout", n);
};
mac_sources: MAC_SOURCES {
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
ctx.stack_.back()->set("mac-sources", l);
......
......@@ -705,11 +705,8 @@ DhcpConfigParser* createGlobal6DhcpConfigParser(const std::string& config_id,
// converted to SimpleParser and are handled in configureDhcp6Server.
// interfaces-config has been converted to SimpleParser.
// version was removed - it was a leftover from bindctrl.
} else if (config_id.compare("lease-database") == 0) {
parser = new DbAccessParser(config_id, DbAccessParser::LEASE_DB);
} else if (config_id.compare("hosts-database") == 0) {
parser = new DbAccessParser(config_id, DbAccessParser::HOSTS_DB);
// hooks-libraries is now converted to SimpleParser.
// lease-database and hosts-database have been converted to SimpleParser already.
// mac-source has been converted to SimpleParser.
// dhcp-ddns has been converted to SimpleParser
} else if (config_id.compare("relay-supplied-options") == 0) {
......@@ -835,7 +832,6 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
// Please do not change this order!
ParserCollection independent_parsers;
ParserPtr subnet_parser;
ParserPtr leases_parser;
// Some of the parsers alter state of the system that can't easily
// be undone. (Or alter it in a way such that undoing the change
......@@ -862,6 +858,8 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
ConfigPair config_pair;
try {
SrvConfigPtr srv_config = CfgMgr::instance().getStagingCfg();
// This is a way to convert ConstElementPtr to ElementPtr.
// We need a config that can be edited, because we will insert
// default values and will insert derived values as well.
......@@ -877,7 +875,7 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
ConstElementPtr option_defs = mutable_cfg->get("option-def");
if (option_defs) {
OptionDefListParser parser;
CfgOptionDefPtr cfg_option_def = CfgMgr::instance().getStagingCfg()->getCfgOptionDef();
CfgOptionDefPtr cfg_option_def = srv_config->getCfgOptionDef();
parser.parse(cfg_option_def, option_defs);
}
......@@ -895,21 +893,20 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {