]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: allow "modify" option for DNS hostname
authorAdam Julis <ajulis@redhat.com>
Tue, 9 Jul 2024 15:23:02 +0000 (17:23 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 10 Jul 2024 08:28:51 +0000 (10:28 +0200)
commit09a5d8165cdf77643fbbb239aadcb11d2ca90595
treea50f6e1e9f090b047260249d09f8b5f0d8518645
parent619a9158622b005caaf7a16690fa8203d5054701
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>
src/conf/network_conf.c
tests/networkxml2xmlupdatein/dns-host-modify-not-existing.xml [new file with mode: 0644]
tests/networkxml2xmlupdatein/dns-host-modify.xml [new file with mode: 0644]
tests/networkxml2xmlupdateout/nat-network-dns-hosts-modified.xml [new file with mode: 0644]
tests/networkxml2xmlupdatetest.c