]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schema: Allow iSCSI source to have interleaved children
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 8 Jan 2020 16:03:42 +0000 (17:03 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 9 Jan 2020 08:12:01 +0000 (09:12 +0100)
There is no need to require users to produce iSCSI disk source
following our ordering of children elements. In fact, we don't
even accept our own order in the schema :(.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
docs/schemas/domaincommon.rng
tests/qemuxml2argvdata/disk-network-iscsi-modern.args
tests/qemuxml2argvdata/disk-network-iscsi-modern.xml

index 9b555d6acbfba459b40f0deb31070f506f70c7ab..76d94b156f255f5a15fb3c5b71f188dbabf44e0c 100644 (file)
         <value>iscsi</value>
       </attribute>
       <attribute name="name"/>
-      <ref name="diskSourceCommon"/>
-      <ref name="diskSourceNetworkHost"/>
-      <optional>
-        <ref name="diskAuth"/>
-      </optional>
-      <optional>
-        <ref name="encryption"/>
-      </optional>
-      <optional>
-        <ref name="initiatorinfo"/>
-      </optional>
+      <interleave>
+        <ref name="diskSourceCommon"/>
+        <ref name="diskSourceNetworkHost"/>
+        <optional>
+          <ref name="diskAuth"/>
+        </optional>
+        <optional>
+          <ref name="encryption"/>
+        </optional>
+        <optional>
+          <ref name="initiatorinfo"/>
+        </optional>
+      </interleave>
     </element>
   </define>
 
index 762dc0e04addd1c9d553cc8f3d44eac248abf645..57eaeb40ee741dc0b8eb361627aae300d7d4ca0c 100644 (file)
@@ -58,4 +58,11 @@ file.target=iqn.1992-01.com.example:server,file.lun=0,file.transport=tcp,\
 file.initiator-name=iqn.1992-01.com.example:client,format=raw,if=none,\
 id=drive-scsi0-0-0-1 \
 -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=1,\
-drive=drive-scsi0-0-0-1,id=scsi0-0-0-1
+drive=drive-scsi0-0-0-1,id=scsi0-0-0-1 \
+-drive file.driver=iscsi,file.portal=example.org:3260,\
+file.target=iqn.1992-01.com.example:server,file.lun=0,file.transport=tcp,\
+file.user=myname,file.password-secret=AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A,\
+file.initiator-name=iqn.1992-01.com.example:client,format=raw,if=none,\
+id=drive-scsi0-0-0-2 \
+-device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=2,\
+drive=drive-scsi0-0-0-2,id=scsi0-0-0-2
index 759d5e217f6acec9dab6748d6a380592209399a3..07bb457bfa9b7590000c9dca2f07d53e0c53623b 100644 (file)
       </source>
       <target dev='sdb' bus='scsi'/>
     </disk>
+    <disk type='network' device='lun'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:server/0'>
+        <host name='example.org' port='3260'/>
+        <initiator>
+          <iqn name='iqn.1992-01.com.example:client'/>
+        </initiator>
+        <auth username='myname'>
+          <secret type='iscsi' usage='mycluster_myname'/>
+        </auth>
+      </source>
+      <target dev='sdc' bus='scsi'/>
+    </disk>
     <controller type='usb' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <controller type='scsi' index='0' model='virtio-scsi'/>