libvirt/tests/networkxml2xmlupdateout/nat-network-dns-hosts-modified.xml
Adam Julis 09a5d8165c network: allow "modify" option for DNS hostname
The "modify" command allows you to replace an existing record
(its hostname, sub-elements). IP address acts as the primary key.
If it is not found, the attempt ends with an error message. If
the XML contains a duplicate address, it will select the last
one.

Tests in networkxml2xmlupdatetest.c contain replacements of an
existing DNS-Host record and failure due to non-existing record.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/639
Signed-off-by: Adam Julis <ajulis@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-07-10 10:28:51 +02:00

29 lines
776 B
XML

<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
<forward dev='eth0' mode='nat'>
<interface dev='eth0'/>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<dns forwardPlainNames='no'>
<host ip='192.168.122.122'>
<hostname>pudding</hostname>
</host>
<host ip='192.168.122.1'>
<hostname>host</hostname>
<hostname>gateway</hostname>
</host>
<host ip='192.168.122.2'>
<hostname>Another</hostname>
<hostname>decent</hostname>
<hostname>names</hostname>
</host>
<host ip='fd8f:1391:3a82:150::c0a8:9603'>
<hostname>shared</hostname>
<hostname>names</hostname>
</host>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>