]> xenbits.xensource.com Git - libvirt.git/commitdiff
make the <dhcp> element optional in network.rng
authorLaine Stump <laine@laine.org>
Thu, 16 Dec 2010 17:36:19 +0000 (12:36 -0500)
committerLaine Stump <laine@laine.org>
Thu, 23 Dec 2010 20:53:44 +0000 (15:53 -0500)
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'/>

docs/schemas/network.rng
tests/networkxml2xmlin/routed-network.xml
tests/networkxml2xmlout/routed-network.xml

index 1daa30e7190adc2fdf157e686cf6edbe44929f32..ac13af20d2b404794437ac21ea2c1450baf777cb 100644 (file)
                 <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>
index 824ad75ed5aad464c2c74c9ec56ade02758a8baf..6634ee87e22093d71e66f62513f8c1619d9858f9 100644 (file)
@@ -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>
index fa36c0800769de8d7a95505ce3a17575ee20e01e..8f11166b941d00fb2db7aa2dd7a6b3efb8b25b8d 100644 (file)
@@ -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>