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

[libvirt] [PATCH 2/3] docs: Expose alias tag in domain RNG schema



Though <alias> is ignored when defining a domain, it can cause
failure if one validates (e.g. virt-xml-validate) the XML dumped
from a running domain. This patch expose it in domain RNG schema
for all the devices which support it.
---
 docs/schemas/domaincommon.rng |   64 +++++++++++++++++++++++++++++++++++++----
 1 files changed, 58 insertions(+), 6 deletions(-)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index b34526f..243ff93 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -734,6 +734,9 @@
         <ref name="diskIoTune"/>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </interleave>
@@ -1099,6 +1102,9 @@
         <ref name="usbmaster"/>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -1196,6 +1202,9 @@
   <define name="filesystemtgt">
     <interleave>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
       <element name="target">
@@ -1396,6 +1405,9 @@
         </element>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
       <optional>
@@ -1811,6 +1823,9 @@
         </element>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -1894,6 +1909,9 @@
         <ref name="qemucdevTgtDef"/>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </interleave>
@@ -2012,6 +2030,9 @@
         </choice>
       </attribute>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -2037,6 +2058,9 @@
         </attribute>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -2051,6 +2075,9 @@
         </choice>
       </attribute>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -2094,6 +2121,9 @@
           <ref name="virtioTarget"/>
         </choice>
         <optional>
+          <ref name="alias"/>
+        </optional>
+        <optional>
           <ref name="address"/>
         </optional>
       </interleave>
@@ -2135,6 +2165,9 @@
         </group>
       </choice>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -2162,6 +2195,9 @@
         </attribute>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -2174,6 +2210,9 @@
         </choice>
       </attribute>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -2190,6 +2229,9 @@
       </attribute>
       <ref name="qemucdevSrcDef"/>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
     </element>
@@ -2238,6 +2280,9 @@
         <ref name="deviceBoot"/>
       </optional>
       <optional>
+        <ref name="alias"/>
+      </optional>
+      <optional>
         <ref name="address"/>
       </optional>
       <optional>
@@ -2356,12 +2401,6 @@
       </attribute>
     </optional>
   </define>
-  <!--
-      Devices attached to a domain.
-      Sub-elements such as <alias> are not documented here, as they
-      can only exist when generated for a live domain and are ignored
-      when defining a domain.
-    -->
   <define name="devices">
     <element name="devices">
       <interleave>
@@ -2970,4 +3009,17 @@
       <param name="pattern">(0x)?[0-9a-fA-F]{1,16}</param>
     </data>
   </define>
+  <define name='aliasName'>
+    <data type="string">
+      <param name="pattern">[a-zA-Z0-9_-]+</param>
+    </data>
+  </define>
+  <define name='alias'>
+    <element name='alias'>
+      <attribute name='name'>
+        <ref name='aliasName'/>
+      </attribute>
+    </element>
+    <empty/>
+  </define>
 </grammar>
-- 
1.7.7.3


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