[Kea-users] timers defined on gloval scope are not exported with the get-config command
tomasz at isc.org
Wed Oct 4 15:23:19 UTC 2017
W dniu 04.10.2017 o 17:05, itay cohen pisze:
> the global timers would be returned as you defined them <-- that would
> be grate.
> the subnets that had those global timers applied, would return their
> values as well. Would that be ok? <-- maybe add an indication to know
> that is from global and not local This would be difficult to do. When we parse the original configuration
and the timer values are calculated, we don't retain the information
where they came from. To store that additional value would be a
significant effort and would complicate the code a lot, so am afraid
we're not going to do it, because the benefit is far too small for the
required amount of work here.
If you want to go into more details, we have a code that once the JSON
structures are loaded, we go through them and fill in the blanks. We
first start with default values. For example, if a user didn't specify a
value for valid-lifetime, we fill it with the default. Next, we go
through the structures and derive or inherit values that are not
explicitly set. At that stage, every subnet has all timers and other
parameters defined and it is ready to be applied.
This approach simplifies the actual parser significantly, because it
doesn't have to deal with the optional parameters. Almost everything is
always specified. This makes the code much simpler, easier to maintain
and extend. The price for this approach is that we lose the information
where exactly the value came from.
Hope that explanation is ok for you.
More information about the Kea-users