提交 008abeee 编写于 作者: L Laine Stump

make the <dhcp> element optional in network.rng

In practice this has always been optional, but the RNG has shown it as
mandatory, and since all the examples for make check had it, it was
never noticed. One of the existing test cases has been changed to
check for this.

I also noticed that the dhcp/host/ip was still defined as <text/>,
but should really be <ref name='ipv4-addr'/>
上级 20718b8b
...@@ -95,31 +95,33 @@ ...@@ -95,31 +95,33 @@
<attribute name="root"><text/></attribute> <attribute name="root"><text/></attribute>
</element> </element>
</optional> </optional>
<!-- Define the range(s) of IP addresses that the DHCP <optional>
server should hand out --> <!-- Define the range(s) of IP addresses that the DHCP
<element name="dhcp"> server should hand out -->
<zeroOrMore> <element name="dhcp">
<element name="range"> <zeroOrMore>
<attribute name="start"><ref name="ipv4-addr"/></attribute> <element name="range">
<attribute name="end"><ref name="ipv4-addr"/></attribute> <attribute name="start"><ref name="ipv4-addr"/></attribute>
</element> <attribute name="end"><ref name="ipv4-addr"/></attribute>
</zeroOrMore> </element>
<zeroOrMore> </zeroOrMore>
<element name="host"> <zeroOrMore>
<attribute name="mac"><ref name="mac-addr"/></attribute> <element name="host">
<attribute name="name"><text/></attribute> <attribute name="mac"><ref name="mac-addr"/></attribute>
<attribute name="ip"><text/></attribute> <attribute name="name"><text/></attribute>
</element> <attribute name="ip"><ref name="ipv4-addr"/></attribute>
</zeroOrMore> </element>
<optional> </zeroOrMore>
<element name="bootp"> <optional>
<attribute name="file"><text/></attribute> <element name="bootp">
<optional> <attribute name="file"><text/></attribute>
<attribute name="server"><text/></attribute> <optional>
</optional> <attribute name="server"><text/></attribute>
</element> </optional>
</optional> </element>
</element> </optional>
</element>
</optional>
</element> </element>
</optional> </optional>
</interleave> </interleave>
......
...@@ -4,8 +4,5 @@ ...@@ -4,8 +4,5 @@
<bridge name="virbr1" /> <bridge name="virbr1" />
<forward mode="route" dev="eth1"/> <forward mode="route" dev="eth1"/>
<ip address="192.168.122.1" netmask="255.255.255.0"> <ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254" />
</dhcp>
</ip> </ip>
</network> </network>
...@@ -4,8 +4,5 @@ ...@@ -4,8 +4,5 @@
<forward dev='eth1' mode='route'/> <forward dev='eth1' mode='route'/>
<bridge name='virbr1' stp='on' delay='0' /> <bridge name='virbr1' stp='on' delay='0' />
<ip address='192.168.122.1' netmask='255.255.255.0'> <ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254' />
</dhcp>
</ip> </ip>
</network> </network>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册