2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 00:15:17 +00:00

[5378] kea-dhcp4/6 now keep track of their configured global params

src/bin/dhcp4/json_config_parser.cc
    configureDhcp4Server() - added extract of configured globals

src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
    Updated extracted and unparsed configs.

src/bin/dhcp6/json_config_parser.cc
    configureDhcp6Server() - added extract of configured globals

src/lib/dhcpsrv/srv_config.h
src/lib/dhcpsrv/srv_config.cc
    Added storage and maintence of configured globals
    SrvConfig::toElement() - added configured globals to result

src/lib/dhcpsrv/tests/srv_config_unittest.cc
    TEST_F(SrvConfigTest, configuredGlobals) - new test
This commit is contained in:
Thomas Markwalder
2018-06-07 15:07:06 -04:00
parent df869a7902
commit ef1c0b746b
7 changed files with 561 additions and 106 deletions

View File

@@ -316,6 +316,9 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
SrvConfigPtr srv_cfg = CfgMgr::instance().getStagingCfg();
// Preserve all scalar global parameters
srv_cfg->extractConfiguredGlobals(config_set);
// 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.