tests: qemublock: Add testing of pure disk source specification JSON generator

Add testing of the host specification part so that we can be sure that
no image/host specific data will be present.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2019-07-18 17:59:34 +02:00
parent 423b4f6625
commit 13f59e6f40
33 changed files with 495 additions and 1 deletions
@@ -0,0 +1,4 @@
{
"driver": "host_device",
"filename": "/dev/blah"
}
@@ -0,0 +1,4 @@
{
"driver": "host_device",
"filename": "/dev/blah"
}
@@ -0,0 +1,5 @@
{
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": false
}
@@ -0,0 +1,5 @@
{
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": true
}
@@ -0,0 +1,5 @@
{
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": false
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,16 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/c"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,24 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
]
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,8 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b"
}
@@ -0,0 +1,40 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483615252"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483605924"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483605920"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483546244"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483545901"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483545313"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483536402"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.qcow2"
}
@@ -0,0 +1,8 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/luks.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/var/lib/libvirt/images/i.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,4 @@
{
"driver": "file",
"filename": "/path/to/i.img"
}
@@ -0,0 +1,8 @@
{
"driver": "nbd",
"server": {
"type": "inet",
"host": "host1.example.com",
"port": "10809"
}
}
@@ -0,0 +1,22 @@
{
"driver": "rbd",
"pool": "rbdpool",
"image": "rbdimg",
"server": [
{
"host": "host1.example.com",
"port": "0"
},
{
"host": "host2.example.com",
"port": "0"
}
]
}
{
"driver": "iscsi",
"portal": "example.org:3260",
"target": "iscsitarget",
"lun": 1,
"transport": "tcp"
}
@@ -0,0 +1,22 @@
{
"driver": "rbd",
"pool": "rbdpool",
"image": "rbdimg",
"server": [
{
"host": "host1.example.com",
"port": "0"
},
{
"host": "host2.example.com",
"port": "0"
}
]
}
{
"driver": "iscsi",
"portal": "example.org:3260",
"target": "iqn.2016-09.com.example:iscsitarget",
"lun": 1,
"transport": "tcp"
}