Skip to content

Commit

Permalink
Merge pull request #1766 from mcornea/libvirt_lease_option
Browse files Browse the repository at this point in the history
Allow passing custom DHCP lease time to libvirt networks
  • Loading branch information
JunqiZhang0 committed Jan 27, 2021
2 parents 6696ce3 + 3c3bd87 commit a449385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions linchpin/provision/roles/libvirt/files/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"address": { "type": "string", "required": false },
"prefix": { "type": "integer", "required": false },
"family": { "type": "string", "required": false },
"dhcp_lease_time": { "type": "integer", "required": false },
"dhcp_start": { "type": "string", "required": false, "dependencies": ["dhcp_end"] },
"dhcp_end": { "type": "string", "required": false, "dependencies": ["dhcp_start"] }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
<ip address="{{ ip['address'] }}" {% if ip['netmask'] is defined %} netmask="{{ ip['netmask'] }}" {% endif %} {% if ip['family'] is defined %}family="{{ ip['family'] }}"{% endif %} {% if ip['prefix'] is defined %}prefix="{{ ip['prefix'] }}"{% endif %}>
{% if ip['dhcp_start'] is defined %}
<dhcp>
<range start="{{ ip['dhcp_start'] }}" end="{{ ip['dhcp_end'] }}"/>
<range start="{{ ip['dhcp_start'] }}" end="{{ ip['dhcp_end'] }}">
{% if ip['dhcp_lease_time'] is defined %}
<lease expiry='{{ ip['dhcp_lease_time'] }}'/>
{% endif %}
</range>
</dhcp>
{% endif %}
</ip>
Expand Down

0 comments on commit a449385

Please sign in to comment.