[PATCHv2 08/13] make the <dhcp> element optional in network.rng

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'/>
---
No changes from V1.

 docs/schemas/network.rng                   |   52 ++++++++++++++-------------
 tests/networkxml2xmlin/routed-network.xml  |    3 --
 tests/networkxml2xmlout/routed-network.xml |    3 --
 3 files changed, 27 insertions(+), 31 deletions(-)

diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng
index 1daa30e..ac13af2 100644
--- a/docs/schemas/network.rng
+++ b/docs/schemas/network.rng
@@ -95,31 +95,33 @@
                 <attribute name="root"><text/></attribute>
               </element>
             </optional>
-            <!-- Define the range(s) of IP addresses that the DHCP
-                 server should hand out -->
-            <element name="dhcp">
-              <zeroOrMore>
-                <element name="range">
-                  <attribute name="start"><ref name="ipv4-addr"/></attribute>
-                  <attribute name="end"><ref name="ipv4-addr"/></attribute>
-                </element>
-              </zeroOrMore>
-              <zeroOrMore>
-                <element name="host">
-                  <attribute name="mac"><ref name="mac-addr"/></attribute>
-                  <attribute name="name"><text/></attribute>
-                  <attribute name="ip"><text/></attribute>
-                </element>
-              </zeroOrMore>
-              <optional>
-                <element name="bootp">
-                  <attribute name="file"><text/></attribute>
-                  <optional>
-                    <attribute name="server"><text/></attribute>
-                  </optional>
-                </element>
-              </optional>
-            </element>
+            <optional>
+              <!-- Define the range(s) of IP addresses that the DHCP
+                   server should hand out -->
+              <element name="dhcp">
+                <zeroOrMore>
+                  <element name="range">
+                    <attribute name="start"><ref name="ipv4-addr"/></attribute>
+                    <attribute name="end"><ref name="ipv4-addr"/></attribute>
+                  </element>
+                </zeroOrMore>
+                <zeroOrMore>
+                  <element name="host">
+                    <attribute name="mac"><ref name="mac-addr"/></attribute>
+                    <attribute name="name"><text/></attribute>
+                    <attribute name="ip"><ref name="ipv4-addr"/></attribute>
+                  </element>
+                </zeroOrMore>
+                <optional>
+                  <element name="bootp">
+                    <attribute name="file"><text/></attribute>
+                    <optional>
+                      <attribute name="server"><text/></attribute>
+                    </optional>
+                  </element>
+                </optional>
+              </element>
+            </optional>
           </element>
         </optional>
       </interleave>
diff --git a/tests/networkxml2xmlin/routed-network.xml b/tests/networkxml2xmlin/routed-network.xml
index 824ad75..6634ee8 100644
--- a/tests/networkxml2xmlin/routed-network.xml
+++ b/tests/networkxml2xmlin/routed-network.xml
@@ -4,8 +4,5 @@
   <bridge name="virbr1" />
   <forward mode="route" dev="eth1"/>
   <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>
 </network>
diff --git a/tests/networkxml2xmlout/routed-network.xml b/tests/networkxml2xmlout/routed-network.xml
index fa36c08..8f11166 100644
--- a/tests/networkxml2xmlout/routed-network.xml
+++ b/tests/networkxml2xmlout/routed-network.xml
@@ -4,8 +4,5 @@
   <forward dev='eth1' mode='route'/>
   <bridge name='virbr1' stp='on' delay='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>
 </network>
-- 
1.7.3.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]