]> xenbits.xensource.com Git - libvirt.git/commitdiff
schemas: finish virTristate{Bool,Switch} transition
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 8 Sep 2014 06:06:35 +0000 (08:06 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 17 Sep 2014 14:10:26 +0000 (16:10 +0200)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
docs/schemas/basictypes.rng
docs/schemas/capability.rng
docs/schemas/domaincaps.rng
docs/schemas/domaincommon.rng
docs/schemas/interface.rng
docs/schemas/network.rng
docs/schemas/nwfilter.rng
docs/schemas/secret.rng

index 75d5238f8ebaad0223405f09254bfa277d18e1bd..14245c9a6ffa3e2d5eba3706197c40a4693c2656 100644 (file)
     </attribute>
     <optional>
       <attribute name="multifunction">
-        <choice>
-          <value>on</value>
-          <value>off</value>
-        </choice>
+        <ref name="virOnOff"/>
       </attribute>
     </optional>
   </define>
     </optional>
   </define>
 
+  <define name="virYesNo">
+    <choice>
+      <value>yes</value>
+      <value>no</value>
+    </choice>
+  </define>
+
+  <define name="virOnOff">
+    <choice>
+      <value>on</value>
+      <value>off</value>
+    </choice>
+  </define>
+
 </grammar>
index f954599739681a931b62419f87c8ffb427bf2b39..5f3ec70d97c73b54c72619ab016559ed2ab4bc33 100644 (file)
 
   <define name='featuretoggle'>
     <attribute name='toggle'>
-      <choice>
-        <value>yes</value>
-        <value>no</value>
-      </choice>
+      <ref name="virYesNo"/>
     </attribute>
     <attribute name='default'>
-      <choice>
-        <value>on</value>
-        <value>off</value>
-      </choice>
+      <ref name="virOnOff"/>
     </attribute>
   </define>
 
index ad8d9664f83a79855885a4277a6ee8c54d3f93c7..f71e6e15008f29a7309323c710c97e2a756e9926 100644 (file)
 
   <define name='supported'>
     <attribute name='supported'>
-      <choice>
-        <value>yes</value>
-        <value>no</value>
-      </choice>
+      <ref name="virYesNo"/>
     </attribute>
   </define>
 
index c600f2253e96c7d10874567de6b8b2db648ea8ad..99457006267918faf63e51f221db55cb393de121 100644 (file)
           </attribute>
           <optional>
             <attribute name='relabel'>
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <interleave>
         <optional>
           <element name="bootmenu">
             <attribute name="enable">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
             <optional>
               <attribute name="timeout">
         <ref name='scaledInteger'/>
         <optional>
           <attribute name="dumpCore">
-            <choice>
-              <value>on</value>
-              <value>off</value>
-            </choice>
+            <ref name="virOnOff"/>
           </attribute>
         </optional>
       </element>
       </choice>
       <optional>
         <attribute name="present">
-          <choice>
-            <value>yes</value>
-            <value>no</value>
-          </choice>
+          <ref name="virYesNo"/>
         </attribute>
       </optional>
       <empty/>
           </attribute>
           <optional>
             <attribute name="rawio">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <optional>
       </optional>
       <optional>
         <attribute name="removable">
-          <choice>
-            <value>on</value>
-            <value>off</value>
-          </choice>
+          <ref name="virOnOff"/>
         </attribute>
       </optional>
     </element>
   </define>
   <define name="ioeventfd">
     <attribute name="ioeventfd">
-      <choice>
-        <value>on</value>
-        <value>off</value>
-      </choice>
+      <ref name="virOnOff"/>
     </attribute>
   </define>
   <define name="event_idx">
     <attribute name="event_idx">
-      <choice>
-        <value>on</value>
-        <value>off</value>
-      </choice>
+      <ref name="virOnOff"/>
     </attribute>
   </define>
   <define name="copy_on_read">
     <attribute name='copy_on_read'>
-      <choice>
-        <value>on</value>
-        <value>off</value>
-      </choice>
+      <ref name="virOnOff"/>
     </attribute>
     </define>
   <define name="discard">
           </attribute>
           <optional>
             <attribute name="managed">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <interleave>
             <element name="source">
               <optional>
                 <attribute name="missing">
-                  <choice>
-                    <value>yes</value>
-                    <value>no</value>
-                  </choice>
+                  <ref name="virYesNo"/>
                 </attribute>
               </optional>
               <choice>
           </optional>
           <optional>
             <attribute name="fullscreen">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
         </group>
               </optional>
               <optional>
                 <attribute name="autoport">
-                  <choice>
-                    <value>yes</value>
-                    <value>no</value>
-                  </choice>
+                  <ref name="virYesNo"/>
                 </attribute>
               </optional>
               <optional>
           </optional>
           <optional>
             <attribute name="autoport">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <optional>
             <optional>
               <element name="playback">
                 <attribute name="compression">
-                  <choice>
-                    <value>on</value>
-                    <value>off</value>
-                  </choice>
+                  <ref name="virOnOff"/>
                 </attribute>
                 <empty/>
               </element>
             <optional>
               <element name="clipboard">
                 <attribute name="copypaste">
-                  <choice>
-                    <value>yes</value>
-                    <value>no</value>
-                  </choice>
+                  <ref name="virYesNo"/>
                 </attribute>
                 <empty/>
               </element>
             <optional>
               <element name="filetransfer">
                 <attribute name="enable">
-                  <choice>
-                    <value>yes</value>
-                    <value>no</value>
-                  </choice>
+                  <ref name="virYesNo"/>
                 </attribute>
                 <empty/>
               </element>
           </optional>
           <optional>
             <attribute name="autoport">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <optional>
             <attribute name="replaceUser">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <optional>
             <attribute name="multiUser">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <optional>
           </optional>
           <optional>
             <attribute name="fullscreen">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
         </group>
           </optional>
           <optional>
             <attribute name="primary">
-              <choice>
-                <value>yes</value>
-                <value>no</value>
-              </choice>
+              <ref name="virYesNo"/>
             </attribute>
           </optional>
           <optional>
             <element name="acceleration">
               <optional>
                 <attribute name="accel3d">
-                  <choice>
-                    <value>yes</value>
-                    <value>no</value>
-                  </choice>
+                  <ref name="virYesNo"/>
                 </attribute>
               </optional>
               <optional>
                 <attribute name="accel2d">
-                  <choice>
-                    <value>yes</value>
-                    <value>no</value>
-                  </choice>
+                  <ref name="virYesNo"/>
                 </attribute>
               </optional>
             </element>
   <define name="suspendChoices">
     <optional>
       <attribute name="enabled">
-        <choice>
-          <value>yes</value>
-          <value>no</value>
-        </choice>
+        <ref name="virYesNo"/>
       </attribute>
     </optional>
   </define>
   <define name="usbdevfilter">
     <element name="usbdev">
       <attribute name="allow">
-        <choice>
-          <value>yes</value>
-          <value>no</value>
-        </choice>
+        <ref name="virYesNo"/>
       </attribute>
       <optional>
         <attribute name="class">
     </optional>
     <optional>
       <attribute name="managed">
-        <choice>
-          <value>yes</value>
-          <value>no</value>
-        </choice>
+        <ref name="virYesNo"/>
       </attribute>
     </optional>
     <choice>
             <element name="apic">
               <optional>
                 <attribute name="eoi">
-                  <choice>
-                    <value>on</value>
-                    <value>off</value>
-                  </choice>
+                  <ref name="virOnOff"/>
                 </attribute>
               </optional>
             </element>
     <element name="bios">
       <optional>
         <attribute name="useserial">
-          <choice>
-            <value>yes</value>
-            <value>no</value>
-          </choice>
+          <ref name="virYesNo"/>
         </attribute>
       </optional>
       <optional>
     <element name="rom">
       <optional>
         <attribute name="bar">
-          <choice>
-            <value>on</value>
-            <value>off</value>
-          </choice>
+          <ref name="virOnOff"/>
         </attribute>
       </optional>
       <optional>
 
   <define name="featurestate">
     <attribute name="state">
-      <choice>
-        <value>on</value>
-        <value>off</value>
-      </choice>
+      <ref name="virOnOff"/>
     </attribute>
   </define>
 
index 0f577d6266b699ccb824ff0805abe9137cc9f0c2..d78f877b3c503ab2464a7596afe1856be6a98e00 100644 (file)
         <element name="bridge">
           <optional>
             <attribute name="stp">
-              <ref name="on-or-off"/>
+              <ref name="virOnOff"/>
             </attribute>
           </optional>
           <!-- Bridge forward delay (see 'brctl setfd') -->
     <element name="dhcp">
       <optional>
         <attribute name="peerdns">
-          <ref name="yes-or-no"/>
+          <ref name="virYesNo"/>
         </attribute>
       </optional>
     </element>
        instead of destination and nexthop instead of gateway.
   -->
 
-  <!-- Auxiliary definitions -->
-  <define name="on-or-off">
-    <choice>
-      <value>on</value>
-      <value>off</value>
-    </choice>
-  </define>
-
-  <define name="yes-or-no">
-    <choice>
-      <value>yes</value>
-      <value>no</value>
-    </choice>
-  </define>
-
   <!-- Type library -->
 
   <define name="timeval">
index ab4181490a6803c703b998af2063c7063578cf92..dc732b42db5325a3b6b092c10be0fff1a0ec49a5 100644 (file)
            with no gateways addresses specified -->
       <optional>
         <attribute name="ipv6">
-         <choice>
-          <value>yes</value>
-          <value>no</value>
-          </choice>
-         </attribute>
-       </optional>
+          <ref name="virYesNo"/>
+        </attribute>
+      </optional>
       <interleave>
 
         <!-- The name of the network, used to refer to it through the API
 
             <optional>
               <attribute name="stp">
-                <choice>
-                  <value>on</value>
-                  <value>off</value>
-                </choice>
+                <ref name="virOnOff"/>
               </attribute>
             </optional>
 
 
             <optional>
               <attribute name="managed">
-                <choice>
-                  <value>yes</value>
-                  <value>no</value>
-                </choice>
+                <ref name="virYesNo"/>
               </attribute>
             </optional>
             <interleave>
             </attribute>
             <optional>
               <attribute name="default">
-                <choice>
-                  <value>yes</value>
-                  <value>no</value>
-                </choice>
+                <ref name="virYesNo"/>
               </attribute>
             </optional>
             <interleave>
           <element name="dns">
             <optional>
               <attribute name="forwardPlainNames">
-                <choice>
-                  <value>yes</value>
-                  <value>no</value>
-                </choice>
+                <ref name="virYesNo"/>
               </attribute>
             </optional>
             <interleave>
index f1aa699c7e9f81fb6b155bd8c7418bc63b83de0b..2b54fd54a09613e99b909b15df409c0dcb094da9 100644 (file)
     <interleave>
       <optional>
          <attribute name="match">
-           <choice>
-             <value>yes</value>
-             <value>no</value>
-           </choice>
+           <ref name="virYesNo"/>
          </attribute>
       </optional>
     </interleave>
index d7b8f83fdc333e78957f0f9531699be8541f03cc..e21e7003253d8ab75ef40720039384fd32bf1fcd 100644 (file)
     <element name='secret'>
       <optional>
         <attribute name='ephemeral'>
-          <choice>
-            <value>yes</value>
-            <value>no</value>
-          </choice>
+          <ref name="virYesNo"/>
         </attribute>
       </optional>
       <optional>
         <attribute name='private'>
-          <choice>
-            <value>yes</value>
-            <value>no</value>
-          </choice>
+          <ref name="virYesNo"/>
         </attribute>
       </optional>
       <interleave>