2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 14:35:29 +00:00

[#1418] Checkpoint: updated library, a syntax regen is required

This commit is contained in:
Francis Dupont
2020-09-25 16:48:15 +02:00
parent 4028938d44
commit 2505d5e3fd
20 changed files with 421 additions and 22 deletions

View File

@@ -180,6 +180,23 @@ BaseNetworkParser::parseTeePercents(const ConstElementPtr& network_data,
network->setT1Percent(t1_percent);
}
void
BaseNetworkParser::parseCacheParams(const ConstElementPtr& network_data,
NetworkPtr& network) {
if (network_data->contains("cache-threshold")) {
double cache_threshold = getDouble(network_data, "cache-threshold");
if ((cache_threshold <= 0.0) || (cache_threshold >= 1.0)) {
isc_throw(DhcpConfigError, "cache-threshold: " << cache_threshold
<< " is invalid, it must be greater than 0.0 and less than 1.0");
}
network->setCacheThreshold(cache_threshold);
}
if (network_data->contains("cache-max")) {
network->setCacheMax(getInteger(network_data, "cache-max"));
}
}
void
BaseNetworkParser::parseHostReservationMode(const data::ConstElementPtr& network_data,
NetworkPtr& network) {