]> xenbits.xensource.com Git - libvirt.git/commit
conf: clear and parse functions for dns host/srv/txt records
authorLaine Stump <laine@laine.org>
Mon, 12 Nov 2012 00:00:22 +0000 (19:00 -0500)
committerLaine Stump <laine@laine.org>
Tue, 11 Dec 2012 10:49:44 +0000 (05:49 -0500)
commitab297becc150fd1b8b2f314eef855db5945cee2c
tree71e609ef95e2d56b089dd21f320b004ecc578bc8
parent8b7d1874179cbe62ed0d6111f455b06a0c335c23
conf: clear and parse functions for dns host/srv/txt records

Since there is only a single virNetworkDNSDef for any virNetworkDef,
and it's trivial to determine whether or not it contains any real
data, it's much simpler (and fits more uniformly with the parse
function calling sequence of the parsers for many other objects that
are subordinates of virNetworkDef) if virNetworkDef *contains* an
virNetworkDNSDef rather than pointing to one.

Since it is now just a part of another object rather than its own
object, it no longer makes sense to have a *Free() function, so that
is changed to a *Clear() function.

More importantly though, ParseXML and Clear functions are needed for
the individual items contained in a virNetworkDNSDef (srv, txt, and
host records), but none of them have a *Clear(), and only two of the
three had *ParseXML() functions (both of which used a non-uniform
arglist). Those problems are cleared up by this patch - it splits the
higher-level Clear function into separate functions for each of the
three, creates a parse for txt records, and cleans up the srv and host
parsers, so we now have all the utility functions necessary to
implement virNetworkDefUpdateDNS(Host|Srv|Txt).
src/conf/network_conf.c
src/conf/network_conf.h
src/network/bridge_driver.c