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

[libvirt] [PATCH v2 1/7] storage: Refactor the rng schema for storage pool auth



From: Osier Yang <jyang redhat com>

The attributes/elements for auth type "chap" and "ceph" are completely
different, but the schema didn't reflect that. This patch separates each
of the definitions into groups.

Changed "chap" type "login" and "passwd" attributes to be be interleaved.

Also adjusted the documentation of types to match code. The formatdomain.html
page indicated the 'type' field could be 'ceph' or 'iscsi', when in fact it
should have been 'chap'.
---
 docs/schemas/storagepool.rng | 42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng
index 3c2158a..2595e37 100644
--- a/docs/schemas/storagepool.rng
+++ b/docs/schemas/storagepool.rng
@@ -280,28 +280,30 @@
 
   <define name='sourceinfoauth'>
     <element name='auth'>
-      <attribute name='type'>
-        <choice>
-          <value>chap</value>
-          <value>ceph</value>
-        </choice>
-      </attribute>
       <choice>
-        <attribute name='login'>
-          <text/>
-        </attribute>
-        <attribute name='username'>
-          <text/>
-        </attribute>
+        <group>
+          <attribute name='type'>
+            <value>chap</value>
+          </attribute>
+          <interleave>
+            <attribute name='login'>
+              <text/>
+            </attribute>
+            <attribute name='passwd'>
+              <text/>
+            </attribute>
+          </interleave>
+        </group>
+        <group>
+          <attribute name='type'>
+            <value>ceph</value>
+          </attribute>
+          <attribute name='username'>
+            <text/>
+          </attribute>
+          <ref name='sourceinfoauthsecret'/>
+       </group>
       </choice>
-      <optional>
-        <attribute name='passwd'>
-          <text/>
-        </attribute>
-      </optional>
-      <optional>
-        <ref name='sourceinfoauthsecret'/>
-      </optional>
     </element>
   </define>
 
-- 
1.8.1.4


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