ASSERT_NO_THROW(json = parseJSON(config));
ConstElementPtr status;
- // Patch the re-detect flag
- patchIfacesReDetect(json);
+ // Disable the re-detect flag
+ disableIfacesReDetect(json);
// Configure the server and make sure the config is accepted
EXPECT_NO_THROW(status = configureDhcp4Server(srv, json));
/// @brief Patch the server config to add interface-config/re-detect=false
/// @param json the server config
inline void
-patchIfacesReDetect(isc::data::ConstElementPtr json) {
+disableIfacesReDetect(isc::data::ConstElementPtr json) {
isc::data::ConstElementPtr ifaces_cfg = json->get("interfaces-config");
if (ifaces_cfg) {
isc::data::ElementPtr mutable_cfg =
isc::dhcp::Parser4Context ctx;
isc::data::ElementPtr json;
json = ctx.parseString(in, isc::dhcp::Parser4Context::SUBPARSER_DHCP4);
- patchIfacesReDetect(json);
+ disableIfacesReDetect(json);
return (json);
}
catch (const std::exception& ex) {
ASSERT_NO_THROW(json = parseJSON(config));
ConstElementPtr status;
- // Patch the re-detect flag
- patchIfacesReDetect(json);
+ // Disable the re-detect flag
+ disableIfacesReDetect(json);
// Configure the server and make sure the config is accepted
EXPECT_NO_THROW(status = configureDhcp6Server(srv, json));
/// @brief Patch the server config to add interface-config/re-detect=false
/// @param json the server config
inline void
-patchIfacesReDetect(isc::data::ConstElementPtr json) {
+disableIfacesReDetect(isc::data::ConstElementPtr json) {
isc::data::ConstElementPtr ifaces_cfg = json->get("interfaces-config");
if (ifaces_cfg) {
isc::data::ElementPtr mutable_cfg =
isc::dhcp::Parser6Context ctx;
isc::data::ElementPtr json;
json = ctx.parseString(in, isc::dhcp::Parser6Context::SUBPARSER_DHCP6);
- patchIfacesReDetect(json);
+ disableIfacesReDetect(json);
return (json);
}
catch (const std::exception& ex) {