mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-05 00:15:17 +00:00
[#32,!23] dhcp4 now parses "config-control" element
src/bin/dhcp4/dhcp4_lexer.ll src/bin/dhcp4/dhcp4_parser.yy Added parsing support for config-control and config-databases src/bin/dhcp4/json_config_parser.cc configureDhcp4Server() - added handler for config-control element src/bin/dhcp4/parser_context.* added CONFIG_CONTROL and CONFIG_DATABASE src/bin/dhcp4/tests/config_parser_unittest.cc TEST_F(Dhcp4ParserTest, configControlInfo) - new test
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <dhcpsrv/parsers/sanity_checks_parser.h>
|
||||
#include <dhcpsrv/host_data_source_factory.h>
|
||||
#include <dhcpsrv/timer_mgr.h>
|
||||
#include <process/config_ctl_parser.h>
|
||||
#include <hooks/hooks_parser.h>
|
||||
#include <config/command_mgr.h>
|
||||
#include <util/encode/hex.h>
|
||||
@@ -494,6 +495,13 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config_pair.first == "config-control") {
|
||||
process::ConfigControlParser parser;
|
||||
process::ConfigControlInfoPtr config_ctl_info = parser.parse(config_pair.second);
|
||||
CfgMgr::instance().getStagingCfg()->setConfigControlInfo(config_ctl_info);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Timers are not used in the global scope. Their values are derived
|
||||
// to specific subnets (see SimpleParser6::deriveParameters).
|
||||
// decline-probation-period, dhcp4o6-port, echo-client-id,
|
||||
|
Reference in New Issue
Block a user