[PATCHv2 2/9] conf: move storage formats to common RNG file

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

 



We had incomplete RelaxNG support for storage formats listed
in virstoragefile.h: commit 027bf2e added 'vdi' but forgot
to update the <volume> and <domain> xml lists; the <volume>
list was also missing 'fat' and 'vhd'.  Maintaining two lists
is a recipe for them getting out of sync, so make the list
common so that both contexts benefit the next time we add a
format in a single location.

* docs/schemas/domaincommon.rng (storageFormat): Move...
* docs/schemas/storagecommon.rng: ...here, and add vdi.
* docs/schemas/storagevol.rng (formatfile): Use common list.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---
 docs/schemas/domaincommon.rng  | 19 +------------------
 docs/schemas/storagecommon.rng | 20 ++++++++++++++++++++
 docs/schemas/storagevol.rng    | 13 +------------
 3 files changed, 22 insertions(+), 30 deletions(-)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 7fc0cff..59f3fdd 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1500,24 +1500,7 @@
       </attribute>
     </optional>
   </define>
-  <define name='storageFormat'>
-    <choice>
-      <value>raw</value>
-      <value>dir</value>
-      <value>bochs</value>
-      <value>cloop</value>
-      <value>cow</value>
-      <value>dmg</value>
-      <value>iso</value>
-      <value>qcow</value>
-      <value>qcow2</value>
-      <value>qed</value>
-      <value>vmdk</value>
-      <value>vpc</value>
-      <value>fat</value>
-      <value>vhd</value>
-    </choice>
-  </define>
+
   <define name="driverCache">
     <attribute name="cache">
       <choice>
diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng
index 54cf6b4..37b43c6 100644
--- a/docs/schemas/storagecommon.rng
+++ b/docs/schemas/storagecommon.rng
@@ -52,4 +52,24 @@
     </element>
   </define>

+  <define name='storageFormat'>
+    <choice>
+      <value>raw</value>
+      <value>dir</value>
+      <value>bochs</value>
+      <value>cloop</value>
+      <value>cow</value>
+      <value>dmg</value>
+      <value>iso</value>
+      <value>qcow</value>
+      <value>qcow2</value>
+      <value>qed</value>
+      <value>vmdk</value>
+      <value>vpc</value>
+      <value>fat</value>
+      <value>vhd</value>
+      <value>vdi</value>
+    </choice>
+  </define>
+
 </grammar>
diff --git a/docs/schemas/storagevol.rng b/docs/schemas/storagevol.rng
index df8c1eb..3798476 100644
--- a/docs/schemas/storagevol.rng
+++ b/docs/schemas/storagevol.rng
@@ -212,18 +212,7 @@
   <define name='formatfile'>
     <choice>
       <value>unknown</value>
-      <value>raw</value>
-      <value>dir</value>
-      <value>bochs</value>
-      <value>cloop</value>
-      <value>cow</value>
-      <value>dmg</value>
-      <value>iso</value>
-      <value>qcow</value>
-      <value>qcow2</value>
-      <value>qed</value>
-      <value>vmdk</value>
-      <value>vpc</value>
+      <ref name='storageFormat'/>
     </choice>
   </define>

-- 
1.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]