On 06/24/2011 06:04 AM, Michal Novotny wrote:
This commit introduces names definition for the DNS hosts file using the following syntax: <dns> <host ip="192.168.1.1"> <name>alias1</name> <name>alias2</name> </host> </dns> Some of the improvements and fixes were done by Laine Stump so I'm putting him into the SOB clause again ;-) Signed-off-by: Michal Novotny<minovotn@xxxxxxxxxx> Signed-off-by: Laine Stump<lstump@xxxxxxxxxx> --- docs/formatnetwork.html.in | 9 +-- docs/schemas/network.rng | 8 ++ src/conf/network_conf.c | 94 ++++++++++++++++++++ src/conf/network_conf.h | 10 ++ src/network/bridge_driver.c | 28 ++++-- .../networkxml2argvdata/nat-network-dns-hosts.argv | 1 + .../networkxml2argvdata/nat-network-dns-hosts.xml | 14 +++ tests/networkxml2argvtest.c | 1 + tests/networkxml2xmlin/nat-network-dns-hosts.xml | 14 +++ tests/networkxml2xmlout/nat-network-dns-hosts.xml | 14 +++ tests/networkxml2xmltest.c | 1 + 11 files changed, 177 insertions(+), 17 deletions(-) create mode 100644 tests/networkxml2argvdata/nat-network-dns-hosts.argv create mode 100644 tests/networkxml2argvdata/nat-network-dns-hosts.xml create mode 100644 tests/networkxml2xmlin/nat-network-dns-hosts.xml create mode 100644 tests/networkxml2xmlout/nat-network-dns-hosts.xml diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index a036545..f17cc63 100644 --- a/docs/formatnetwork.html.in +++ b/docs/formatnetwork.html.in @@ -224,15 +224,8 @@ to the DNS service. The IP address is identified by the<code>ip</code> attribute and the names for the IP addresses are identified in the<code>hostname</code> subelements of the<code>host</code> element. -<span class="since">Since 0.9.1</span> +<span class="since">Since 0.9.3</span> </dd> -<dt><code>host</code></dt> -<dd>The<code>host</code> element is the definition of DNS hosts to be passed - to the DNS service. The IP address is identified by the<code>ip</code> attribute - and the names for the IP addresses are identified in the<code>hostname</code> - subelements of the<code>host</code> element. -<span class="since">Since 0.9.1</span> -</dd> </dl>
Somehow you had added this text in twice in Patch 4/5, then removed one copy here. I removed it entirely from 4/5, and added it in once here (inside the indented section I added for <txt>).
+ def->hosts[def->nhosts].names[def->hosts[def->nhosts].nnames] = strdup((char *)cur->children->content);
As DV pointed out, we should make this a bit less knowledgeable of the internals of the libxml data structures. But that can be done later in a cleanup patch.
ACK (with the change to documentation) and pushed. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list