]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: create common storage RNG grammar file
authorEric Blake <eblake@redhat.com>
Sat, 12 Apr 2014 01:33:45 +0000 (19:33 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 14 Apr 2014 13:07:01 +0000 (07:07 -0600)
Having two tiny files with a couple definitions didn't make
as much sense as one common file, especially since I plan to
add more definitions and use it in more places.

* docs/schemas/storageencryption.rng: Merge this...
* docs/schemas/storagefilefeatures.rng: ...and this, into...
* docs/schemas/storagecommon.rng: ...this new file.
* docs/schemas/Makefile.am (schema_DATA): Reflect renames.
* docs/schemas/storagevol.rng: Likewise.
* docs/schemas/domaincommon.rng: Likewise.
* libvirt.spec.in: Likewise.
* mingw-libvirt.spec.in: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
docs/schemas/Makefile.am
docs/schemas/domaincommon.rng
docs/schemas/storagecommon.rng [new file with mode: 0644]
docs/schemas/storageencryption.rng [deleted file]
docs/schemas/storagefilefeatures.rng [deleted file]
docs/schemas/storagevol.rng
libvirt.spec.in
mingw-libvirt.spec.in

index 47d1941a51c0f51a4a863f751ed8cf9d19752aa5..d71c327f05e9cd2d25cd1457e0c9e58cbf8cd1f4 100644 (file)
@@ -1,4 +1,4 @@
-## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
+## Copyright (C) 2005-2011, 2013-2014 Red Hat, Inc.
 ##
 ## This library is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU Lesser General Public
@@ -27,8 +27,7 @@ schema_DATA = \
        nodedev.rng \
        nwfilter.rng \
        secret.rng \
-       storageencryption.rng \
-       storagefilefeatures.rng \
+       storagecommon.rng \
        storagepool.rng \
        storagevol.rng
 
index bcd814273ce977142cb30b7ed1e811dec26a7cc8..8c1724a3d0ef69b6e6f5c2d3067138207ec3df48 100644 (file)
@@ -2,7 +2,7 @@
 <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
   <!-- domain-related definitions used in multiple grammars -->
   <include href='basictypes.rng'/>
-  <include href='storageencryption.rng'/>
+  <include href='storagecommon.rng'/>
   <include href='networkcommon.rng'/>
 
   <!--
diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng
new file mode 100644 (file)
index 0000000..54cf6b4
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!-- A Relax NG schema for common libvirt XML storage elements -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+  <!-- This schema is not designed for standalone use; another file
+       must include both this file and basictypes.rng -->
+
+  <define name='encryption'>
+    <element name='encryption'>
+      <attribute name='format'>
+        <choice>
+          <value>default</value>
+          <value>qcow</value>
+        </choice>
+      </attribute>
+      <zeroOrMore>
+        <ref name='secret'/>
+      </zeroOrMore>
+    </element>
+  </define>
+
+  <define name='secret'>
+    <element name='secret'>
+      <attribute name='type'>
+        <choice>
+          <value>passphrase</value>
+        </choice>
+      </attribute>
+      <attribute name='uuid'>
+        <ref name="UUID"/>
+      </attribute>
+    </element>
+  </define>
+
+  <define name='compat'>
+    <element name='compat'>
+      <data type='string'>
+        <param name='pattern'>[0-9]+\.[0-9]+</param>
+      </data>
+    </element>
+  </define>
+  <define name='fileFormatFeatures'>
+    <element name='features'>
+      <interleave>
+        <optional>
+          <element name='lazy_refcounts'>
+            <empty/>
+          </element>
+        </optional>
+      </interleave>
+    </element>
+  </define>
+
+</grammar>
diff --git a/docs/schemas/storageencryption.rng b/docs/schemas/storageencryption.rng
deleted file mode 100644 (file)
index fa9a8d5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0"?>
-<!-- A Relax NG schema for the libvirt volume encryption XML format -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
-    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
-  <define name='encryption'>
-    <element name='encryption'>
-      <attribute name='format'>
-        <choice>
-          <value>default</value>
-          <value>qcow</value>
-        </choice>
-      </attribute>
-      <zeroOrMore>
-        <ref name='secret'/>
-      </zeroOrMore>
-    </element>
-  </define>
-
-  <define name='secret'>
-    <element name='secret'>
-      <attribute name='type'>
-        <choice>
-          <value>passphrase</value>
-        </choice>
-      </attribute>
-      <attribute name='uuid'>
-          <ref name="UUID"/>
-      </attribute>
-    </element>
-  </define>
-
-</grammar>
diff --git a/docs/schemas/storagefilefeatures.rng b/docs/schemas/storagefilefeatures.rng
deleted file mode 100644 (file)
index 424b4e2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!-- A Relax NG schema for the libvirt volume features XML format -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
-    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
-  <define name='compat'>
-    <element name='compat'>
-      <data type='string'>
-        <param name='pattern'>[0-9]+\.[0-9]+</param>
-      </data>
-    </element>
-  </define>
-  <define name='fileFormatFeatures'>
-    <element name='features'>
-      <interleave>
-        <optional>
-          <element name='lazy_refcounts'>
-            <empty/>
-          </element>
-        </optional>
-      </interleave>
-    </element>
-  </define>
-</grammar>
index 8f07d8f9d6f1fe8a9ae1b7ba06125685dbef24a1..df8c1eb7a53f9eea3033270d8b81909c2d2d6610 100644 (file)
@@ -7,8 +7,7 @@
     <ref name='vol'/>
   </start>
 
-  <include href='storageencryption.rng'/>
-  <include href='storagefilefeatures.rng'/>
+  <include href='storagecommon.rng'/>
 
 
   <define name='vol'>
index 4e70a41486eb69dddfd11e4e7b1ef15d69b2ec7a..520561da6705960d08fd80b2448e84d68ea31ef6 100644 (file)
@@ -2171,8 +2171,7 @@ exit 0
 %{_datadir}/libvirt/schemas/nodedev.rng
 %{_datadir}/libvirt/schemas/nwfilter.rng
 %{_datadir}/libvirt/schemas/secret.rng
-%{_datadir}/libvirt/schemas/storageencryption.rng
-%{_datadir}/libvirt/schemas/storagefilefeatures.rng
+%{_datadir}/libvirt/schemas/storagecommon.rng
 %{_datadir}/libvirt/schemas/storagepool.rng
 %{_datadir}/libvirt/schemas/storagevol.rng
 
index 1734a48d8a89de8756d80249b28c99f1b865fa2c..1b505e6e89ee592f5ae9291ee1b4e512ebc64fe8 100644 (file)
@@ -211,8 +211,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
 %{mingw32_datadir}/libvirt/schemas/nodedev.rng
 %{mingw32_datadir}/libvirt/schemas/nwfilter.rng
 %{mingw32_datadir}/libvirt/schemas/secret.rng
-%{mingw32_datadir}/libvirt/schemas/storageencryption.rng
-%{mingw32_datadir}/libvirt/schemas/storagefilefeatures.rng
+%{mingw32_datadir}/libvirt/schemas/storagecommon.rng
 %{mingw32_datadir}/libvirt/schemas/storagepool.rng
 %{mingw32_datadir}/libvirt/schemas/storagevol.rng
 %dir %{mingw32_datadir}/libvirt/api/
@@ -272,8 +271,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
 %{mingw64_datadir}/libvirt/schemas/nodedev.rng
 %{mingw64_datadir}/libvirt/schemas/nwfilter.rng
 %{mingw64_datadir}/libvirt/schemas/secret.rng
-%{mingw64_datadir}/libvirt/schemas/storageencryption.rng
-%{mingw64_datadir}/libvirt/schemas/storagefilefeatures.rng
+%{mingw64_datadir}/libvirt/schemas/storagecommon.rng
 %{mingw64_datadir}/libvirt/schemas/storagepool.rng
 %{mingw64_datadir}/libvirt/schemas/storagevol.rng
 %dir %{mingw64_datadir}/libvirt/api/