]> xenbits.xensource.com Git - libvirt.git/commitdiff
rng: Drop useless <choice/>
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 7 Sep 2017 09:58:26 +0000 (11:58 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 12 Sep 2017 11:41:15 +0000 (13:41 +0200)
If we have <choice/> with just one value to chose from, it's no
choice.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
docs/schemas/domaincommon.rng
docs/schemas/nodedev.rng
docs/schemas/storagecommon.rng

index 06c5a91b3d3afda03b9f69cf8ef9fe08235eb651..a8e32014b5acba77b9a058edfd7a44b004048902 100644 (file)
     <element name="source">
       <interleave>
         <attribute name="protocol">
-          <choice>
-            <value>rbd</value>
-          </choice>
+          <value>rbd</value>
         </attribute>
         <optional>
           <attribute name="name"/>
   <define name="diskSourceNetworkProtocolNBD">
     <element name="source">
       <attribute name="protocol">
-        <choice>
-          <value>nbd</value>
-        </choice>
+        <value>nbd</value>
       </attribute>
       <optional>
         <attribute name="name"/>
   <define name="diskSourceNetworkProtocolGluster">
     <element name="source">
       <attribute name="protocol">
-        <choice>
-          <value>gluster</value>
-        </choice>
+        <value>gluster</value>
       </attribute>
       <attribute name="name"/>
       <oneOrMore>
           <interleave>
               <element name="source">
                 <attribute name="type">
-                  <choice>
-                    <value>unix</value>
-                  </choice>
+                  <value>unix</value>
                 </attribute>
                 <attribute name="path">
                   <ref name="absFilePath"/>
         </group>
         <group>
           <attribute name="type">
-            <choice>
-              <value>udp</value>
-            </choice>
+            <value>udp</value>
           </attribute>
           <interleave>
             <element name="source">
           </optional>
           <optional>
             <attribute name="connected">
-              <choice>
-                <value>keep</value>
-              </choice>
+              <value>keep</value>
             </attribute>
           </optional>
           <ref name="listenElements"/>
           </optional>
           <empty/>
         </group>
-        <choice>
-          <ref name="qemucdev"/>
-        </choice>
+        <ref name="qemucdev"/>
       </choice>
     </element>
   </define>
           <ref name="address"/>
         </optional>
         <zeroOrMore>
-          <choice>
-            <ref name="codec"/>
-          </choice>
+          <ref name="codec"/>
         </zeroOrMore>
       </interleave>
     </element>
     <element name="tpm">
       <optional>
         <attribute name="model">
-          <choice>
-            <value>tpm-tis</value>
-          </choice>
+          <value>tpm-tis</value>
         </attribute>
       </optional>
       <ref name="tpm-backend"/>
   <define name="hub">
     <element name="hub">
       <attribute name="type">
-        <choice>
-          <value>usb</value>
-        </choice>
+        <value>usb</value>
       </attribute>
       <optional>
         <ref name="alias"/>
   <define name="redirdev">
     <element name="redirdev">
       <attribute name="bus">
-        <choice>
-          <value>usb</value>
-        </choice>
+        <value>usb</value>
       </attribute>
       <attribute name="type">
         <ref name="qemucdevSrcTypeChoice"/>
         <group>  <!-- scsi_host adapter -->
           <optional>
             <attribute name="protocol">
-              <choice>
-                <value>adapter</value>   <!-- scsi_host, default, optional -->
-              </choice>
+              <value>adapter</value>   <!-- scsi_host, default, optional -->
             </attribute>
           </optional>
           <interleave>
         </group>
         <group>  <!-- iscsi adapter -->
           <attribute name="protocol">
-            <choice>
-              <value>iscsi</value>     <!-- iscsi, required -->
-            </choice>
+            <value>iscsi</value>     <!-- iscsi, required -->
           </attribute>
           <attribute name="name">
             <text/>
       <choice>
         <group>
           <attribute name="protocol">
-            <choice>
-              <value>vhost</value>     <!-- vhost, required -->
-            </choice>
+            <value>vhost</value>     <!-- vhost, required -->
           </attribute>
           <attribute name="wwpn">
             <data type="string">
       <value>mdev</value>
     </attribute>
     <attribute name="model">
-      <choice>
-        <value>vfio-pci</value>
-      </choice>
+      <value>vfio-pci</value>
     </attribute>
     <element name="source">
       <ref name="mdevaddress"/>
       <zeroOrMore>
         <element name="table">
           <attribute name="type">
-            <choice>
-              <value>slic</value>
-            </choice>
+            <value>slic</value>
           </attribute>
           <ref name="absFilePath"/>
         </element>
   <define name="rng">
     <element name="rng">
       <attribute name="model">
-        <choice>
-          <value>virtio</value>
-        </choice>
+        <value>virtio</value>
       </attribute>
       <interleave>
         <ref name="rng-backend"/>
           </optional>
           <optional>
             <attribute name='job'>
-              <choice>
-                <value>copy</value>
-              </choice>
+              <value>copy</value>
             </attribute>
           </optional>
           <optional>
index 5bcf3178778144a7de410dd82995cd40684ab32b..2704eeb256dc87bb8240c0eeef07879c080995e5 100644 (file)
               <element name='name'><text/></element>
             </optional>
             <element name='deviceAPI'>
-              <choice>
-                <value>vfio-pci</value>
-              </choice>
+              <value>vfio-pci</value>
             </element>
             <element name='availableInstances'>
               <ref name='unsignedInt'/>
index 316fbaee3b863123099e0e8843a44251aeeb994b..717f3c603ae1b70768221c0e2a510c7133a1345c 100644 (file)
@@ -34,9 +34,7 @@
   <define name='secret'>
     <element name='secret'>
       <attribute name='type'>
-        <choice>
-          <value>passphrase</value>
-        </choice>
+        <value>passphrase</value>
       </attribute>
       <choice>
         <attribute name='uuid'>