Network: Add support for DNS hosts definition to the network XML

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@redhat.com>
Signed-off-by: Laine Stump <laine@laine.org>
This commit is contained in:
Michal Novotny
2011-06-24 12:04:40 +02:00
committed by Laine Stump
parent 91b7924eee
commit 9d4e2845d4
11 changed files with 184 additions and 9 deletions

View File

@@ -184,6 +184,14 @@
or commas. value is a single string that can contain multiple values
separated by commas. <span class="since">Since 0.9.3</span>
</dd>
<dt><code>host</code></dt>
<dd>The <code>host</code> element within <code>dns</code> 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 that IP address are identified in the <code>hostname</code>
sub-elements of the <code>host</code> element.
<span class="since">Since 0.9.3</span>
</dd>
</dl>
</dd>
<dt><code>dhcp</code></dt>

View File

@@ -97,6 +97,14 @@
<attribute name="value"><text/></attribute>
</element>
</zeroOrMore>
<zeroOrMore>
<element name="host">
<attribute name="ip"><ref name="ipv4-addr"/></attribute>
<oneOrMore>
<element name="hostname"><text/></element>
</oneOrMore>
</element>
</zeroOrMore>
</element>
</optional>