]> xenbits.xensource.com Git - libvirt.git/commitdiff
schema: Fix interface link state schema
authorPeter Krempa <pkrempa@redhat.com>
Mon, 2 Mar 2015 16:21:23 +0000 (17:21 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 3 Mar 2015 08:43:13 +0000 (09:43 +0100)
In commit edd1295e1da6bfe8e4e257e5fbfad71ac0bf7c87 I've introduced an
XML element that allows to configure state of the network interface
link. Somehow the RNG schema hunk ended up in a weird place in the
network schema definition. Move it to the right place and add a test
case.

Note that the link state is set up via the monitor at VM startup so I
originally didn't think of adding a test case.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1173468

docs/schemas/domaincommon.rng
docs/schemas/network.rng
tests/qemuxml2argvdata/qemuxml2argv-interface-driver.xml

index 4e4fe9fc8e28ec0c91429f45eba0746111ecd7ff..6c45b1c92b06ac754809f6086b4578c17afcf18e 100644 (file)
         - the name of the script used to set up the binding
         - the target device used
         - boot order
+        - link state
     -->
   <define name="interface-options">
     <interleave>
+      <optional>
+        <element name="link">
+          <attribute name="state">
+            <choice>
+              <value>up</value>
+              <value>down</value>
+            </choice>
+          </attribute>
+          <empty/>
+        </element>
+      </optional>
       <optional>
         <element name="target">
           <attribute name="dev">
index 56b6086d8ffd250e1a96ce4b3a8fbc9aa6433d80..4edb6eb31ad04b865716157a1845cd97656241bb 100644 (file)
         <optional>
          <ref name="vlan"/>
         </optional>
-        <optional>
-          <element name="link">
-            <attribute name="state">
-              <choice>
-                <value>up</value>
-                <value>down</value>
-              </choice>
-            </attribute>
-            <empty/>
-          </element>
-        </optional>
 
         <!-- <ip> element -->
         <zeroOrMore>
index ec5ab6106793e2e20cfe6af6ec724a524276adfa..d907b9b45ab9b76971e910d589c81b91a27bef2d 100644 (file)
@@ -39,6 +39,7 @@
       <mac address='52:54:00:e5:48:58'/>
       <model type='virtio'/>
       <driver ioeventfd='on' event_idx='on' queues='5'/>
+      <link state='up'/>
     </interface>
     <serial type='pty'>
       <target port='0'/>