Add support for `modify` option when updating network dns host/srv/txt in net-update
Goal
The current virsh net-update command, doesn't support MODIFY operation
for sections like dns-host, dns-srv, dns-txt and other ones like
forward-interface and ip-dhcp-range.
For ip-dhcp-range, the explanation stated was that (1100f610), it
is a range, which is start to end, thus doesn't make sense to modify it.
Similarly for forward-interface, the reason stated was that (024879e5),
there is only one attribute (device), modify is not necessary.
But for dns-host, dns-srv, dns-txt sections, modify could be implemented.
the original implementations for these sections in the commit fc19a005 doesn't
mention the reason for not implementing MODIFY.
Technical details
-
For DNS-Host records each DNS
<host>element can have multiple identifiable hostnames. If one would want to modify a given host element, that would mean modify command essentially take a union, of existing hostnames and ones in the input XML. If one wants to replace the existing hostnames too, it would make more sense to delete then add. Other than that, it would be great there was a functionality to add/remove hostnames, because the proposed MODIFY is not directly changing the<host>but changing its sub-element. -
For DNS-Txt records, there is a uniquely identifiable
nameand a value associated. One would use the update command to change this value for a given name. -
For DNS-Srv records, there are 5 optional fields along with 2 mandatory ones which are used to identify the record. One would want to use MODIFY command to change/add the optional attributes for a matching record.