]> xenbits.xensource.com Git - libvirt.git/commitdiff
doc/schema: Support iqn for storage pools
authorPhilipp Hahn <hahn@univention.de>
Wed, 20 Mar 2013 10:45:29 +0000 (11:45 +0100)
committerOsier Yang <jyang@redhat.com>
Wed, 20 Mar 2013 13:47:26 +0000 (21:47 +0800)
iSCSI qualified names (iqn) from RFC3721 may contain colons (':'), which
neither matches the absFilePath nor genericName:

 $ virsh pool-dumpxml myiscsipool
 <pool type='iscsi'>
 ...
   <source>
 ...
     <device path='iqn.2003-01.org.linux-iscsi.phahn-sid93.x8664:sn.8a3daa0d4efd'/>
   </source>
 ...
 </pool>

Add IscsiQualifiedName type and allow its use in sourceiscsi.

Signed-off-by: Philipp Hahn <hahn@univention.de>
docs/schemas/storagepool.rng

index 2b1f08dd5e503fca415e88133c2fdac80b32acee..0cc0406f51f6c61ae05154ca7d198e11fe68f490 100644 (file)
         <choice>
           <ref name='absFilePath'/>
           <ref name='genericName'/>
+          <ref name='IscsiQualifiedName'/>
         </choice>
       </attribute>
       <choice>
       <optional>
         <ref name='sourceinfovendor'/>
       </optional>
-
     </element>
   </define>
 
     </element>
   </define>
 
+  <define name='IscsiQualifiedName'>
+    <data type='string'>
+      <param name="pattern">iqn\.[0-9]{4}-(0[1-9]|1[0-2])\.[a-zA-Z0-9\.\-]+(:.+)?</param>
+    </data>
+  </define>
+
   <define name="PortNumber">
     <data type="short">
       <param name="minInclusive">-1</param>