]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Fix syntax in iSCSI auth/secret tests
authorJohn Ferlan <jferlan@redhat.com>
Sat, 16 Apr 2016 12:11:00 +0000 (08:11 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 18 Apr 2016 16:31:50 +0000 (12:31 -0400)
While working on the tests for the secret initialization vector, I found
that the existing iSCSI tests were lacking in how they defined the IQN.
Many had IQN's of just 'iqn.1992-01.com.example' for one disk while using
'iqn.1992-01.com.example/1' for the second disk (same for hostdevs - guess
how they were copied/generated).

Typically (and documented this way), IQN's would include be of the form
'iqn.1992-01.com.example:storage/1' indicating an IQN using "storage" for
naming authority specific string and "/1" for the iSCSI LUN.

So modify the input XML's to use the more proper format - this of course
has a ripple effect on the output XML and the args.

Also note that the "%3A" is generated by the virURIFormat/xmlSaveUri
to represent the colon.

Signed-off-by: John Ferlan <jferlan@redhat.com>
tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args
tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-iscsi-auth.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-lsi-iscsi-auth.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-virtio-iscsi-auth.xml

index 5bebcaedbd8cbd80b54411f19e01c5dc44f2b0e4..44c95066b09f22b9e016035fe94cb81cad32dc3f 100644 (file)
@@ -17,9 +17,9 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
-6000/iqn.1992-01.com.example,format=raw,if=virtio \
--drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,format=raw,\
-if=virtio \
+6000/iqn.1992-01.com.example%3Astorage/1,format=raw,if=virtio \
+-drive file=iscsi://example.org:6000/iqn.1992-01.com.example%3Astorage/2,\
+format=raw,if=virtio \
 -net none \
 -serial none \
 -parallel none
index 35b3abc5073448f51eca3afd779da26cb75ec07f..b5f948b8885b6ad13146127b2496195550fba518 100644 (file)
       <auth username='myname'>
         <secret type='iscsi' usage='qemuargv2xml_usage'/>
       </auth>
-      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'>
         <host name='example.org' port='6000'/>
       </source>
       <target dev='vda' bus='virtio'/>
     </disk>
     <disk type='network' device='disk'>
       <driver name='qemu' type='raw'/>
-      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'>
         <host name='example.org' port='6000'/>
       </source>
       <target dev='vdb' bus='virtio'/>
index 735a0aec5e2957c38bccd6031c983eb9ddc4f298..66e2497fff438946a4726f9b50110d74911ab971 100644 (file)
@@ -18,10 +18,12 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
-6000/iqn.1992-01.com.example,format=raw,if=none,id=drive-virtio-disk0 \
+6000/iqn.1992-01.com.example%3Astorage/1,format=raw,if=none,\
+id=drive-virtio-disk0 \
 -device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\
 id=virtio-disk0 \
--drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,format=raw,\
-if=none,id=drive-virtio-disk1 \
+-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
+6000/iqn.1992-01.com.example%3Astorage/2,format=raw,if=none,\
+id=drive-virtio-disk1 \
 -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,\
 id=virtio-disk1
index 5ac4abfdb26f3bd0e112a22ef4a27a3c98d7ff59..1f80d3bfcbfd65ef3910c8b1ee38b756caedb1fd 100644 (file)
       <auth username='myname'>
         <secret type='iscsi' usage='mycluster_myname'/>
       </auth>
-      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'>
         <host name='example.org' port='6000'/>
       </source>
       <target dev='vda' bus='virtio'/>
     </disk>
     <disk type='network' device='disk'>
       <driver name='qemu' type='raw'/>
-      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+      <auth username='myname'>
+        <secret type='iscsi' usage='mycluster_myname'/>
+      </auth>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'>
         <host name='example.org' port='6000'/>
       </source>
       <target dev='vdb' bus='virtio'/>
index 2bd98e558a86a97af1ead9fcf99ddd64cd72ad3e..ff6655fe5af2735f5ae5a8d57aa2cdd9e74a3198 100644 (file)
@@ -21,9 +21,9 @@ QEMU_AUDIO_DRV=none \
 -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
-3260/iqn.1992-01.com.example,if=none,format=raw,id=drive-hostdev0 \
+3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev0 \
 -device scsi-generic,bus=scsi0.0,scsi-id=4,drive=drive-hostdev0,id=hostdev0 \
 -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
-3260/iqn.1992-01.com.example/1,if=none,format=raw,id=drive-hostdev1 \
+3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev1 \
 -device scsi-generic,bus=scsi0.0,scsi-id=5,drive=drive-hostdev1,id=hostdev1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
index ed2bf257455dd7ee73d39eb80619864606f7ec6a..f988165a6247b046ad04f4c3f5d9b5165fb8bcbe 100644 (file)
@@ -26,7 +26,7 @@
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>
@@ -35,7 +35,7 @@
       <address type='drive' controller='0' bus='0' target='0' unit='4'/>
     </hostdev>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>
index 624be9457e159903bab83464c97306accfc6ed16..42113c8b16d3f515fc3e23d8f85ef055a5bf1476 100644 (file)
@@ -21,11 +21,11 @@ QEMU_AUDIO_DRV=none \
 -drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
-3260/iqn.1992-01.com.example,if=none,format=raw,id=drive-hostdev0 \
+3260/iqn.1992-01.com.example%3Astorage/1,if=none,format=raw,id=drive-hostdev0 \
 -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=4,drive=drive-hostdev0,\
 id=hostdev0 \
 -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
-3260/iqn.1992-01.com.example/1,if=none,format=raw,id=drive-hostdev1 \
+3260/iqn.1992-01.com.example%3Astorage/2,if=none,format=raw,id=drive-hostdev1 \
 -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=2,lun=5,drive=drive-hostdev1,\
 id=hostdev1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
index 33577abd5f2c9aa391c8a56f818104d1b66b7823..b70b84eb4fc910ea341c583b77806642a8073bb4 100644 (file)
@@ -26,7 +26,7 @@
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>
@@ -35,7 +35,7 @@
       <address type='drive' controller='0' bus='0' target='2' unit='4'/>
     </hostdev>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>
index 4f0e87fb0caf56208dd0ba9419f848fa09f4f36c..fc8aba11cb62a82abec6a478793f22d3b73ef3a5 100644 (file)
@@ -19,7 +19,7 @@
       <auth username='myname'>
         <secret type='iscsi' usage='mycluster_myname'/>
       </auth>
-      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'>
         <host name='example.org' port='6000'/>
       </source>
       <target dev='vda' bus='virtio'/>
     </disk>
     <disk type='network' device='disk'>
       <driver name='qemu' type='raw'/>
-      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+      <auth username='myname'>
+        <secret type='iscsi' usage='mycluster_myname'/>
+      </auth>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'>
         <host name='example.org' port='6000'/>
       </source>
       <target dev='vdb' bus='virtio'/>
index 5ed40958e1d6635bef90ed9b007c300268f4cbbf..1db5ed9cb67e4afa72fd005439cd95af2a4c3a84 100644 (file)
@@ -32,7 +32,7 @@
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>
@@ -41,7 +41,7 @@
       <address type='drive' controller='0' bus='0' target='0' unit='4'/>
     </hostdev>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>
index a5d3b8e418ac5d7a7cd8bd15e8eea1dc8880449d..64c149fe6f77810e8144131c2c8bcc81415abdac 100644 (file)
@@ -32,7 +32,7 @@
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/1'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>
@@ -41,7 +41,7 @@
       <address type='drive' controller='0' bus='0' target='2' unit='4'/>
     </hostdev>
     <hostdev mode='subsystem' type='scsi' managed='yes'>
-      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+      <source protocol='iscsi' name='iqn.1992-01.com.example:storage/2'>
         <host name='example.org' port='3260'/>
         <auth username='myname'>
           <secret type='iscsi' usage='mycluster_myname'/>