]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemublocktest: Test backing store strings
authorPeter Krempa <pkrempa@redhat.com>
Mon, 23 Mar 2020 11:35:32 +0000 (12:35 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 24 Mar 2020 13:17:47 +0000 (14:17 +0100)
With -blockdev libvirt provides the string which is recorded  as
'backing store' property of an image to qemu. Add testing for
qemuBlockGetBackingStoreString which generates these strings as there's
logic which determines which format to use.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
34 files changed:
tests/qemublocktest.c
tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json
tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json
tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json
tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json
tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json
tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json
tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json
tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json
tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json
tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json
tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json
tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json
tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json
tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe-srconly.json
tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth-srconly.json
tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json

index 47d08333f73be4d672cae5ba02d3c0336c52c54e..709d94fd80936c9854b688fe07d687850a07bb1d 100644 (file)
@@ -184,6 +184,7 @@ struct testQemuDiskXMLToJSONImageData {
     virJSONValuePtr formatprops;
     virJSONValuePtr storageprops;
     virJSONValuePtr storagepropssrc;
+    char *backingstore;
 };
 
 
@@ -210,6 +211,7 @@ testQemuDiskXMLToPropsClear(struct testQemuDiskXMLToJSONData *data)
         virJSONValueFree(data->images[i].formatprops);
         virJSONValueFree(data->images[i].storageprops);
         virJSONValueFree(data->images[i].storagepropssrc);
+        g_free(data->images[i].backingstore);
     }
     data->nimages = 0;
     VIR_FREE(data->images);
@@ -287,6 +289,7 @@ testQemuDiskXMLToProps(const void *opaque)
     }
 
     for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
+        g_autofree char *backingstore = NULL;
 
         if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
             return -1;
@@ -298,7 +301,8 @@ testQemuDiskXMLToProps(const void *opaque)
 
         if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n, n->backingStore)) ||
             !(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, false, true, true)) ||
-            !(storageProps = qemuBlockStorageSourceGetBackendProps(n, false, false, true))) {
+            !(storageProps = qemuBlockStorageSourceGetBackendProps(n, false, false, true)) ||
+            !(backingstore = qemuBlockGetBackingStoreString(n, true))) {
             if (!data->fail) {
                 VIR_TEST_VERBOSE("failed to generate qemu blockdev props");
                 return -1;
@@ -314,6 +318,7 @@ testQemuDiskXMLToProps(const void *opaque)
         data->images[data->nimages].formatprops = g_steal_pointer(&formatProps);
         data->images[data->nimages].storageprops = g_steal_pointer(&storageProps);
         data->images[data->nimages].storagepropssrc = g_steal_pointer(&storageSrcOnlyProps);
+        data->images[data->nimages].backingstore = g_steal_pointer(&backingstore);
 
         data->nimages++;
     }
@@ -425,10 +430,21 @@ testQemuDiskXMLToPropsValidateFileSrcOnly(const void *opaque)
     for (i = 0; i < data->nimages; i++) {
         g_autofree char *jsonstr = NULL;
 
+        virBufferAddLit(&buf, "(\n");
+        virBufferAdjustIndent(&buf, 2);
+        virBufferAddLit(&buf, "source only properties:\n");
+
         if (!(jsonstr = virJSONValueToString(data->images[i].storagepropssrc, true)))
             return -1;
 
-        virBufferAdd(&buf, jsonstr, -1);
+        virBufferAddStr(&buf, jsonstr);
+
+        virBufferAddLit(&buf, "backing store string:\n");
+        virBufferAddStr(&buf, data->images[i].backingstore);
+
+        virBufferTrim(&buf, "\n");
+        virBufferAdjustIndent(&buf, -2);
+        virBufferAddLit(&buf, "\n)\n");
     }
 
     actual = virBufferContentAndReset(&buf);
index 72f9067353095625cdbd64d3960b147cf42936fc..07f7390433d1d32953a166871e2155c005cb2da4 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "host_device",
-  "filename": "/dev/blah"
-}
+(
+  source only properties:
+  {
+    "driver": "host_device",
+    "filename": "/dev/blah"
+  }
+  backing store string:
+  /dev/blah
+)
index 72f9067353095625cdbd64d3960b147cf42936fc..07f7390433d1d32953a166871e2155c005cb2da4 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "host_device",
-  "filename": "/dev/blah"
-}
+(
+  source only properties:
+  {
+    "driver": "host_device",
+    "filename": "/dev/blah"
+  }
+  backing store string:
+  /dev/blah
+)
index 6ec4f78d7bd4a3d06c449fd2b2cf83781022f6ed..8bc58fa0330d4a97063b46cd00fdafbadeadd64b 100644 (file)
@@ -1,5 +1,10 @@
-{
-  "driver": "vvfat",
-  "dir": "/var/somefiles",
-  "floppy": false
-}
+(
+  source only properties:
+  {
+    "driver": "vvfat",
+    "dir": "/var/somefiles",
+    "floppy": false
+  }
+  backing store string:
+  /var/somefiles
+)
index 6b0388bc188f49e175c3bda330be4ce74cddf0bb..043b7964359c4b6291f52794f8b8c7e097b954ba 100644 (file)
@@ -1,5 +1,10 @@
-{
-  "driver": "vvfat",
-  "dir": "/var/somefiles",
-  "floppy": true
-}
+(
+  source only properties:
+  {
+    "driver": "vvfat",
+    "dir": "/var/somefiles",
+    "floppy": true
+  }
+  backing store string:
+  /var/somefiles
+)
index 6ec4f78d7bd4a3d06c449fd2b2cf83781022f6ed..8bc58fa0330d4a97063b46cd00fdafbadeadd64b 100644 (file)
@@ -1,5 +1,10 @@
-{
-  "driver": "vvfat",
-  "dir": "/var/somefiles",
-  "floppy": false
-}
+(
+  source only properties:
+  {
+    "driver": "vvfat",
+    "dir": "/var/somefiles",
+    "floppy": false
+  }
+  backing store string:
+  /var/somefiles
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index dbdf6e563b1806c669152d386f8cb4cf3922d0a1..35a8c3af373b788b7a774d61765b3882c62749e3 100644 (file)
@@ -1,16 +1,36 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/c"
+  }
+  backing store string:
+  /var/lib/libvirt/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index ea490b0034148041a2d5316fe066cc1ec25cdfbe..65a3773b972426aed745931756c20552ea679c6e 100644 (file)
@@ -1,24 +1,44 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
+(
+  source only properties:
+  {
+    "driver": "gluster",
+    "volume": "images",
+    "path": "c",
+    "server": [
+      {
+        "type": "inet",
+        "host": "test.org",
+        "port": "24007"
+      }
+    ]
+  }
+  backing store string:
+  gluster://test.org:24007/images/c
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/d"
+  }
+  backing store string:
+  /var/lib/libvirt/images/d
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index 316dbc9df2ee4e3f7d9f48be7ae7941b4dcec85b..29644f8c0ff60d9b12566ff544ee8a032ae0508d 100644 (file)
@@ -1,8 +1,18 @@
-{
-  "driver": "file",
-  "filename": "/var/lib/libvirt/images/a"
-}
-{
-  "driver": "file",
-  "filename": "/var/lib/libvirt/images/b"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/a"
+  }
+  backing store string:
+  /var/lib/libvirt/images/a
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/b"
+  }
+  backing store string:
+  /var/lib/libvirt/images/b
+)
index d998acc19441a688e3df3543b96f895c31bd4fb9..76916095778ffc1f22300924b83c0b2ae27b99dc 100644 (file)
@@ -1,40 +1,90 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1507297895
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1484071872
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483615252"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1483615252
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483605924"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1483605924
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483605920"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1483605920
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483546244"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1483546244
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483545901"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1483545901
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483545313"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1483545313
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483536402"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1483536402
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.qcow2"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.qcow2
+)
index e0bce3bcd220a54640e90f4de7e9802108431b87..f2fd81184b74f85534a0bb57b7245ee17c611884 100644 (file)
@@ -1,8 +1,18 @@
-{
-  "driver": "file",
-  "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
-}
-{
-  "driver": "file",
-  "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1507297895
+)
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
+  }
+  backing store string:
+  /var/lib/libvirt/images/rhel7.3.1484071872
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index 6d7088211f9d6af7fae44bef35fcbdd07988fdc0..c065e3fab04df0f9bc749b440d1bf835bb705b0c 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/luks.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/luks.img"
+  }
+  backing store string:
+  /path/luks.img
+)
index bb3e8af9eb2e53c9b3d5125028a2e438f7bad070..a2b32b09e0cd6d91d5b018010d2d80ac31e02003 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/var/lib/libvirt/images/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/var/lib/libvirt/images/i.img"
+  }
+  backing store string:
+  /var/lib/libvirt/images/i.img
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index c50fa903f5befef057a3c72cf0c1f108713948d8..58dd7e1c34dfdcc39c2852f675bfcc38676b4506 100644 (file)
@@ -1,4 +1,9 @@
-{
-  "driver": "file",
-  "filename": "/path/to/i.img"
-}
+(
+  source only properties:
+  {
+    "driver": "file",
+    "filename": "/path/to/i.img"
+  }
+  backing store string:
+  /path/to/i.img
+)
index 455f4e5140f26febe20fda9df6ddf360858416a2..606e68713ac3638f24f1d184ff084094202b423d 100644 (file)
@@ -1,8 +1,13 @@
-{
-  "driver": "nbd",
-  "server": {
-    "type": "inet",
-    "host": "host1.example.com",
-    "port": "10809"
+(
+  source only properties:
+  {
+    "driver": "nbd",
+    "server": {
+      "type": "inet",
+      "host": "host1.example.com",
+      "port": "10809"
+    }
   }
-}
+  backing store string:
+  nbd://host1.example.com:10809
+)
index 69ca9caf88f2288fdb2b69b535a3edb672c67919..2d7eeb3bcac2fa4b67369535a2e813742874092a 100644 (file)
@@ -1,22 +1,46 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "rbd",
+    "pool": "rbdpool",
+    "image": "rbdimg",
+    "server": [
+      {
+        "host": "host1.example.com",
+        "port": "0"
+      },
+      {
+        "host": "host2.example.com",
+        "port": "0"
+      }
+    ]
+  }
+  backing store string:
+  json:{
+    "driver": "rbd",
+    "pool": "rbdpool",
+    "image": "rbdimg",
+    "server": [
+      {
+        "host": "host1.example.com",
+        "port": "0"
+      },
+      {
+        "host": "host2.example.com",
+        "port": "0"
+      }
+    ]
+  }
+)
+(
+  source only properties:
+  {
+    "driver": "iscsi",
+    "portal": "example.org:3260",
+    "target": "iscsitarget",
+    "lun": 1,
+    "transport": "tcp"
+  }
+  backing store string:
+  iscsi://example.org:3260/iscsitarget/1
+)
index 6298329812de8a775b3aac4f4adae26ce6787505..5679318fbe8c984da1e77c280802f340cf87d44d 100644 (file)
@@ -1,22 +1,46 @@
-{
-  "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"
-}
+(
+  source only properties:
+  {
+    "driver": "rbd",
+    "pool": "rbdpool",
+    "image": "rbdimg",
+    "server": [
+      {
+        "host": "host1.example.com",
+        "port": "0"
+      },
+      {
+        "host": "host2.example.com",
+        "port": "0"
+      }
+    ]
+  }
+  backing store string:
+  json:{
+    "driver": "rbd",
+    "pool": "rbdpool",
+    "image": "rbdimg",
+    "server": [
+      {
+        "host": "host1.example.com",
+        "port": "0"
+      },
+      {
+        "host": "host2.example.com",
+        "port": "0"
+      }
+    ]
+  }
+)
+(
+  source only properties:
+  {
+    "driver": "iscsi",
+    "portal": "example.org:3260",
+    "target": "iqn.2016-09.com.example:iscsitarget",
+    "lun": 1,
+    "transport": "tcp"
+  }
+  backing store string:
+  iscsi://example.org:3260/iqn.2016-09.com.example%3Aiscsitarget/1
+)
index ed55c08cbfbc7f5f13caca225d8b530ae18cf8ce..970e1bb8af31c2f0eb4872f262bf267d56ff9b01 100644 (file)
@@ -1,5 +1,14 @@
-{
-  "driver": "nvme",
-  "device": "0000:01:00.0",
-  "namespace": 1
-}
+(
+  source only properties:
+  {
+    "driver": "nvme",
+    "device": "0000:01:00.0",
+    "namespace": 1
+  }
+  backing store string:
+  json:{
+    "driver": "nvme",
+    "device": "0000:01:00.0",
+    "namespace": 1
+  }
+)