]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemuargv2xmltest: Resurrect RBD and iSCSI auth
authorJohn Ferlan <jferlan@redhat.com>
Wed, 25 Jun 2014 16:16:56 +0000 (12:16 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 3 Jul 2014 21:39:14 +0000 (17:39 -0400)
Ressurect the disk-drive-network-iscsi-auth and disk-drive-network-rbd-auth
tests.  Make adjustments to the args and xml file to be compatible with
other changes made to the non "-auth" so that the only difference is the
authentication information.

Adjust the qemuargv2xmltest.c to filter out "<secret" and "</auth>" since
the args -> xml has no concept of usage it doesn't get printed. This results
in the </auth> being printed on the same line as "<secret" and the secret
XML is not closed - a bit of an issue, but soon to be fixed.

tests/qemuargv2xmltest.c
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.args
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth.xml

index 2cbbe3d7f5cd3bdeb79e4f8c9f20900f07bd7b04..04d5a65955927a4fdf4fc6a19b0a37a08a97c3f3 100644 (file)
@@ -26,6 +26,8 @@ static int blankProblemElements(char *data)
     if (virtTestClearLineRegex("<name>[[:alnum:]]+</name>", data) < 0 ||
         virtTestClearLineRegex("<uuid>([[:alnum:]]|-)+</uuid>", data) < 0 ||
         virtTestClearLineRegex("<memory.*>[[:digit:]]+</memory>", data) < 0 ||
+        virtTestClearLineRegex("<secret.*>", data) < 0 ||
+        virtTestClearLineRegex("</auth.*>", data) < 0 ||
         virtTestClearLineRegex("<currentMemory.*>[[:digit:]]+</currentMemory>",
                                data) < 0 ||
         virtTestClearLineRegex("<readonly/>", data) < 0 ||
@@ -226,8 +228,10 @@ mymain(void)
     DO_TEST("disk-drive-network-nbd-ipv6-export");
     DO_TEST("disk-drive-network-nbd-unix");
     DO_TEST("disk-drive-network-iscsi");
+    DO_TEST("disk-drive-network-iscsi-auth");
     DO_TEST("disk-drive-network-gluster");
     DO_TEST("disk-drive-network-rbd");
+    DO_TEST("disk-drive-network-rbd-auth");
     DO_TEST("disk-drive-network-rbd-ipv6");
     /* older format using CEPH_ARGS env var */
     DO_TEST("disk-drive-network-rbd-ceph-env");
index dd8fee4b1cc43f27c4dfa19f0cb28bed0f4255b5..4c5e1bebe63b177b07c120bc14f536c2615c7966 100644 (file)
@@ -3,5 +3,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
 -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
 -no-acpi -boot c -usb \
 -drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org\
-/iqn.1992-01.com.example,if=virtio,format=raw \
+:6000/iqn.1992-01.com.example,if=virtio,format=raw \
+-drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,if=virtio,\
+format=raw \
 -net none -serial none -parallel none
index ee87bdfbc3522d0d97d697443b1395b2a0e95b01..45df270662bf77bb00e92fe68aa23e3b38cca365 100644 (file)
         <secret type='iscsi' usage='mycluster_myname'/>
       </auth>
       <source protocol='iscsi' name='iqn.1992-01.com.example'>
-        <host name='example.org'/>
+        <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'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vdb' bus='virtio'/>
+    </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
-    <memballoon model='virtio'/>
+    <memballoon model='none'/>
   </devices>
 </domain>
index 189ce6becd0ad0a0e8d10f6fd70318f6b634598c..72923ea2117ab157e1a7aee627480f18b08d8283 100644 (file)
@@ -15,6 +15,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
       <source dev='/dev/HostVG/QEMUGuest1'/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
@@ -33,6 +34,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
-    <memballoon model='virtio'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
   </devices>
 </domain>