[PATCH v2 02/10] docs/schemas: split storagepool.rng for scsi hostdev

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

 



The definiton of scsi adapter in storagespool.rng can be used by scsi
hostdev. Split storagepool.rng into storagepool.rng and
storagepoolcommon.rng and make domaincomman.rng include the latter one.

PortNumber is both defined in domaincomman.rng and storagespool.rng,
simplify it.

Signed-off-by: Han Cheng <hanc.fnst@xxxxxxxxxxxxxx>
---
 docs/schemas/domaincommon.rng      |    6 +-----
 docs/schemas/storagepool.rng       |   18 ++----------------
 docs/schemas/storagepoolcommon.rng |   21 +++++++++++++++++++++
 3 files changed, 24 insertions(+), 21 deletions(-)
 create mode 100644 docs/schemas/storagepoolcommon.rng

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index ccf0913..364abf1 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3,6 +3,7 @@
   <!-- domain-related definitions used in multiple grammars -->
   <include href='basictypes.rng'/>
   <include href='storageencryption.rng'/>
+  <include href='storagepoolcommon.rng'/>
   <include href='networkcommon.rng'/>
 
   <!--
@@ -3815,11 +3816,6 @@
       <param name="minInclusive">-1</param>
     </data>
   </define>
-  <define name="PortNumber">
-    <data type="short">
-      <param name="minInclusive">-1</param>
-    </data>
-  </define>
   <!-- weight currently is in range [100, 1000] -->
   <define name="weight">
     <data type="unsignedInt">
diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng
index 0cc0406..8265eff 100644
--- a/docs/schemas/storagepool.rng
+++ b/docs/schemas/storagepool.rng
@@ -3,11 +3,12 @@
 <grammar xmlns="http://relaxng.org/ns/structure/1.0";
     datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes";>
   <include href='basictypes.rng'/>
+  <include href='storagepoolcommon.rng'/>
+
   <start>
     <ref name='pool'/>
   </start>
 
-
   <define name='pool'>
     <element name='pool'>
       <choice>
@@ -274,15 +275,6 @@
     </element>
   </define>
 
-  <define name='sourceinfoadapter'>
-    <element name='adapter'>
-      <attribute name='name'>
-        <text/>
-      </attribute>
-      <empty/>
-    </element>
-  </define>
-
   <define name='sourceinfoname'>
     <element name='name'>
       <text/>
@@ -525,10 +517,4 @@
     </data>
   </define>
 
-  <define name="PortNumber">
-    <data type="short">
-      <param name="minInclusive">-1</param>
-    </data>
-  </define>
-
 </grammar>
diff --git a/docs/schemas/storagepoolcommon.rng b/docs/schemas/storagepoolcommon.rng
new file mode 100644
index 0000000..200855e
--- /dev/null
+++ b/docs/schemas/storagepoolcommon.rng
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!-- A Relax NG schema for the libvirt storage pool XML format -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0";
+    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes";>
+
+  <define name="PortNumber">
+    <data type="short">
+      <param name="minInclusive">-1</param>
+    </data>
+  </define>
+
+  <define name='sourceinfoadapter'>
+    <element name='adapter'>
+      <attribute name='name'>
+        <text/>
+      </attribute>
+      <empty/>
+    </element>
+  </define>
+
+</grammar>
-- 
1.7.1

--
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]