mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Add <lease/> option for <dhcp/> settings
If an user is trying to configure a dhcp neetwork settings, it is not
possible to change the leasetime of a range or a host entry. This is
available using dnsmasq extra options, but they are associated with
dhcp-range or dhcp-hosts fields. This patch implements a leasetime for
range and hosts tags. They can be defined under that settings:
<dhcp>
<range ...>
<lease/>
</range>
<host ...>
<lease/>
</host>
</dhcp>
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=913446
Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
5670fb5794
commit
97a0aa2467
@@ -607,4 +607,12 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="leaseUnit">
|
||||
<choice>
|
||||
<value>seconds</value>
|
||||
<value>minutes</value>
|
||||
<value>hours</value>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
</grammar>
|
||||
|
||||
@@ -371,6 +371,16 @@
|
||||
<element name="range">
|
||||
<attribute name="start"><ref name="ipAddr"/></attribute>
|
||||
<attribute name="end"><ref name="ipAddr"/></attribute>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="lease">
|
||||
<attribute name="expiry"><ref name="unsignedLong"/></attribute>
|
||||
<optional>
|
||||
<attribute name="unit"><ref name="leaseUnit"/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
@@ -388,6 +398,16 @@
|
||||
<attribute name="name"><text/></attribute>
|
||||
</choice>
|
||||
<attribute name="ip"><ref name="ipAddr"/></attribute>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="lease">
|
||||
<attribute name="expiry"><ref name="unsignedLong"/></attribute>
|
||||
<optional>
|
||||
<attribute name="unit"><ref name="leaseUnit"/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
|
||||
Reference in New Issue
Block a user