I resubmitted this series because our team needs to hack dnsmasq
settings to change lease time. This feature would be so important to
us to avoid workarounds.
It is based on Alberto's patch from 2017. But personally I don't like
this approach.
IMHO, it would be nice to have specific attributes to configure lease time.
For example:
<range ... leasetime="10m"/>
<host ... leasetime="20m"/>
They can be different from each other.
I still think that the idea should be better developed.
I don't like that my example also (it is just an example).
That's why I submitted... To listen opinions from others.
--
Julio Cesar Faracco
Em qua., 15 de abr. de 2020 às 13:19, Julio Faracco
<jcfaracco(a)gmail.com> escreveu:
This series is based on latest series from Alberto. It includes a new
entry called <leasetime/> under <dhcp/> scope to add a default lease
time for range and host options for dnsmasq. There is no point to
configure both separately. If they are defined (range and/or host), they
should have the same lease time value.
This series includes some test cases to cover lease time XML syntax
also.
Julio Faracco (2):
conf: Add <leasetime/> option for <dhcp/> settings
tests: Add tests for <leasetime/> to cover dnsmasq settings
docs/schemas/basictypes.rng | 9 +++
docs/schemas/network.rng | 11 ++++
src/conf/network_conf.c | 62 ++++++++++++++++++-
src/conf/network_conf.h | 14 +++++
src/libvirt_private.syms | 2 +
src/network/bridge_driver.c | 37 ++++++++++-
src/util/virdnsmasq.c | 40 ++++++------
src/util/virdnsmasq.h | 1 +
.../networkxml2confdata/leasetime-hours.conf | 16 +++++
tests/networkxml2confdata/leasetime-hours.xml | 12 ++++
.../leasetime-infinite.conf | 16 +++++
.../leasetime-infinite.xml | 12 ++++
.../leasetime-minutes.conf | 16 +++++
.../networkxml2confdata/leasetime-minutes.xml | 12 ++++
.../leasetime-seconds.conf | 16 +++++
.../networkxml2confdata/leasetime-seconds.xml | 12 ++++
tests/networkxml2conftest.c | 4 ++
tests/networkxml2xmlin/leasetime-hours.xml | 12 ++++
tests/networkxml2xmlin/leasetime-infinite.xml | 12 ++++
tests/networkxml2xmlin/leasetime-minutes.xml | 12 ++++
tests/networkxml2xmlin/leasetime-seconds.xml | 12 ++++
tests/networkxml2xmlout/leasetime-hours.xml | 14 +++++
.../networkxml2xmlout/leasetime-infinite.xml | 14 +++++
tests/networkxml2xmlout/leasetime-minutes.xml | 14 +++++
tests/networkxml2xmlout/leasetime-seconds.xml | 14 +++++
tests/networkxml2xmltest.c | 4 ++
26 files changed, 376 insertions(+), 24 deletions(-)
create mode 100644 tests/networkxml2confdata/leasetime-hours.conf
create mode 100644 tests/networkxml2confdata/leasetime-hours.xml
create mode 100644 tests/networkxml2confdata/leasetime-infinite.conf
create mode 100644 tests/networkxml2confdata/leasetime-infinite.xml
create mode 100644 tests/networkxml2confdata/leasetime-minutes.conf
create mode 100644 tests/networkxml2confdata/leasetime-minutes.xml
create mode 100644 tests/networkxml2confdata/leasetime-seconds.conf
create mode 100644 tests/networkxml2confdata/leasetime-seconds.xml
create mode 100644 tests/networkxml2xmlin/leasetime-hours.xml
create mode 100644 tests/networkxml2xmlin/leasetime-infinite.xml
create mode 100644 tests/networkxml2xmlin/leasetime-minutes.xml
create mode 100644 tests/networkxml2xmlin/leasetime-seconds.xml
create mode 100644 tests/networkxml2xmlout/leasetime-hours.xml
create mode 100644 tests/networkxml2xmlout/leasetime-infinite.xml
create mode 100644 tests/networkxml2xmlout/leasetime-minutes.xml
create mode 100644 tests/networkxml2xmlout/leasetime-seconds.xml
--
2.24.1