|
|
fbe740 |
From eae7db4b5daa44a6bf83e2d57601d108d3b93beb Mon Sep 17 00:00:00 2001
|
|
|
fbe740 |
Message-Id: <eae7db4b5daa44a6bf83e2d57601d108d3b93beb@dist-git>
|
|
|
fbe740 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
fbe740 |
Date: Mon, 30 Mar 2020 17:21:39 +0200
|
|
|
fbe740 |
Subject: [PATCH] qemuxml2xmltest: Wire up 'disk-network-http' case
|
|
|
fbe740 |
MIME-Version: 1.0
|
|
|
fbe740 |
Content-Type: text/plain; charset=UTF-8
|
|
|
fbe740 |
Content-Transfer-Encoding: 8bit
|
|
|
fbe740 |
|
|
|
fbe740 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
fbe740 |
(cherry picked from commit c34ec56abad4b2286ef82a0a3ab9deb4d807a9bf)
|
|
|
fbe740 |
|
|
|
fbe740 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804750
|
|
|
fbe740 |
|
|
|
fbe740 |
Conflicts: The XML output file differs in the <cpu> element as changes
|
|
|
fbe740 |
in default cpu handling were not backported.
|
|
|
fbe740 |
Message-Id: <dd5d567d2c6f0a0e50f9184360265fc0aff78296.1585581552.git.pkrempa@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
fbe740 |
---
|
|
|
fbe740 |
.../disk-network-http.x86_64-latest.xml | 68 +++++++++++++++++++
|
|
|
fbe740 |
tests/qemuxml2xmltest.c | 2 +
|
|
|
fbe740 |
2 files changed, 70 insertions(+)
|
|
|
fbe740 |
create mode 100644 tests/qemuxml2xmloutdata/disk-network-http.x86_64-latest.xml
|
|
|
fbe740 |
|
|
|
fbe740 |
diff --git a/tests/qemuxml2xmloutdata/disk-network-http.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-network-http.x86_64-latest.xml
|
|
|
fbe740 |
new file mode 100644
|
|
|
fbe740 |
index 0000000000..238a5fef58
|
|
|
fbe740 |
--- /dev/null
|
|
|
fbe740 |
+++ b/tests/qemuxml2xmloutdata/disk-network-http.x86_64-latest.xml
|
|
|
fbe740 |
@@ -0,0 +1,68 @@
|
|
|
fbe740 |
+<domain type='kvm'>
|
|
|
fbe740 |
+ <name>QEMUGuest1</name>
|
|
|
fbe740 |
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
|
|
fbe740 |
+ <memory unit='KiB'>219136</memory>
|
|
|
fbe740 |
+ <currentMemory unit='KiB'>219136</currentMemory>
|
|
|
fbe740 |
+ <vcpu placement='static'>1</vcpu>
|
|
|
fbe740 |
+ <os>
|
|
|
fbe740 |
+ <type arch='x86_64' machine='pc'>hvm</type>
|
|
|
fbe740 |
+ <boot dev='hd'/>
|
|
|
fbe740 |
+ </os>
|
|
|
fbe740 |
+ <clock offset='utc'/>
|
|
|
fbe740 |
+ <on_poweroff>destroy</on_poweroff>
|
|
|
fbe740 |
+ <on_reboot>restart</on_reboot>
|
|
|
fbe740 |
+ <on_crash>destroy</on_crash>
|
|
|
fbe740 |
+ <devices>
|
|
|
fbe740 |
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
|
|
|
fbe740 |
+ <disk type='network' device='disk'>
|
|
|
fbe740 |
+ <driver name='qemu' type='raw'/>
|
|
|
fbe740 |
+ <source protocol='http' name='test.img'>
|
|
|
fbe740 |
+ <host name='example.org' port='80'/>
|
|
|
fbe740 |
+ <timeout seconds='1234'/>
|
|
|
fbe740 |
+ </source>
|
|
|
fbe740 |
+ <target dev='vda' bus='virtio'/>
|
|
|
fbe740 |
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
|
|
fbe740 |
+ </disk>
|
|
|
fbe740 |
+ <disk type='network' device='disk'>
|
|
|
fbe740 |
+ <driver name='qemu' type='raw'/>
|
|
|
fbe740 |
+ <source protocol='https' name='test2.img'>
|
|
|
fbe740 |
+ <host name='example.org' port='443'/>
|
|
|
fbe740 |
+ <readahead size='1024'/>
|
|
|
fbe740 |
+ </source>
|
|
|
fbe740 |
+ <target dev='vdb' bus='virtio'/>
|
|
|
fbe740 |
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
|
|
fbe740 |
+ </disk>
|
|
|
fbe740 |
+ <disk type='network' device='disk'>
|
|
|
fbe740 |
+ <driver name='qemu' type='raw'/>
|
|
|
fbe740 |
+ <source protocol='http' name='test3.img'>
|
|
|
fbe740 |
+ <host name='example.org' port='1234'/>
|
|
|
fbe740 |
+ <cookies>
|
|
|
fbe740 |
+ <cookie name='test'>testcookievalue</cookie>
|
|
|
fbe740 |
+ <cookie name='test2'>blurb</cookie>
|
|
|
fbe740 |
+ </cookies>
|
|
|
fbe740 |
+ </source>
|
|
|
fbe740 |
+ <target dev='vdc' bus='virtio'/>
|
|
|
fbe740 |
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
|
|
fbe740 |
+ </disk>
|
|
|
fbe740 |
+ <disk type='network' device='disk'>
|
|
|
fbe740 |
+ <driver name='qemu' type='raw'/>
|
|
|
fbe740 |
+ <source protocol='https' name='test4.img'>
|
|
|
fbe740 |
+ <host name='example.org' port='1234'/>
|
|
|
fbe740 |
+ <ssl verify='no'/>
|
|
|
fbe740 |
+ <cookies>
|
|
|
fbe740 |
+ <cookie name='test'>testcookievalue</cookie>
|
|
|
fbe740 |
+ <cookie name='test2'>blurb</cookie>
|
|
|
fbe740 |
+ </cookies>
|
|
|
fbe740 |
+ </source>
|
|
|
fbe740 |
+ <target dev='vdd' bus='virtio'/>
|
|
|
fbe740 |
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
|
|
fbe740 |
+ </disk>
|
|
|
fbe740 |
+ <controller type='usb' index='0' model='piix3-uhci'>
|
|
|
fbe740 |
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
|
|
fbe740 |
+ </controller>
|
|
|
fbe740 |
+ <controller type='pci' index='0' model='pci-root'/>
|
|
|
fbe740 |
+ <input type='mouse' bus='ps2'/>
|
|
|
fbe740 |
+ <input type='keyboard' bus='ps2'/>
|
|
|
fbe740 |
+ <memballoon model='none'/>
|
|
|
fbe740 |
+ </devices>
|
|
|
fbe740 |
+</domain>
|
|
|
fbe740 |
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
|
|
|
fbe740 |
index f77f59fa3c..15110dd104 100644
|
|
|
fbe740 |
--- a/tests/qemuxml2xmltest.c
|
|
|
fbe740 |
+++ b/tests/qemuxml2xmltest.c
|
|
|
fbe740 |
@@ -1089,6 +1089,8 @@ mymain(void)
|
|
|
fbe740 |
DO_TEST("disk-backing-chains-index", NONE);
|
|
|
fbe740 |
DO_TEST("disk-backing-chains-noindex", NONE);
|
|
|
fbe740 |
|
|
|
fbe740 |
+ DO_TEST_CAPS_LATEST("disk-network-http");
|
|
|
fbe740 |
+
|
|
|
fbe740 |
DO_TEST("chardev-label",
|
|
|
fbe740 |
QEMU_CAPS_DEVICE_VIRTIO_RNG);
|
|
|
fbe740 |
|
|
|
fbe740 |
--
|
|
|
fbe740 |
2.26.0
|
|
|
fbe740 |
|