We will need to handle storage files using JSON format soon.
Signed-off-by: Andrea Bolognani <[email protected]>
---
src/conf/storage_source_conf.c | 2 +-
src/conf/storage_source_conf.h | 1 +
src/qemu/qemu_block.c | 2 ++
tests/storagepoolcapsschemadata/poolcaps-fs.xml | 5 +++++
tests/storagepoolcapsschemadata/poolcaps-full.xml | 5 +++++
.../out/qcow2-qcow2_qcow2-qcow2_qcow2-auto | 2 +-
.../virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto | 2 +-
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw | 2 +-
tests/virstoragetestdata/out/qcow2-symlinks | 2 +-
.../out/qcow2datafile-qcow2_qcow2-datafile | 2 +-
10 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/conf/storage_source_conf.c b/src/conf/storage_source_conf.c
index 087de1eaf2..e62707ba9b 100644
--- a/src/conf/storage_source_conf.c
+++ b/src/conf/storage_source_conf.c
@@ -57,7 +57,7 @@ VIR_ENUM_IMPL(virStorageFileFormat,
"none",
"raw", "dir", "bochs",
"cloop", "dmg", "iso",
- "vpc", "vdi",
+ "vpc", "vdi", "json",
/* Not direct file formats, but used for various drivers */
"fat", "vhd", "ploop",
/* Formats with backing file below here */
diff --git a/src/conf/storage_source_conf.h b/src/conf/storage_source_conf.h
index fc868b31af..0682da27f0 100644
--- a/src/conf/storage_source_conf.h
+++ b/src/conf/storage_source_conf.h
@@ -63,6 +63,7 @@ typedef enum {
VIR_STORAGE_FILE_ISO,
VIR_STORAGE_FILE_VPC,
VIR_STORAGE_FILE_VDI,
+ VIR_STORAGE_FILE_JSON,
/* Not direct file formats, but used for various drivers */
VIR_STORAGE_FILE_FAT,
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index a7062d3e96..66384a8159 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1322,6 +1322,7 @@
qemuBlockStorageSourceGetBlockdevFormatProps(virStorageSource *src)
case VIR_STORAGE_FILE_COW:
case VIR_STORAGE_FILE_ISO:
case VIR_STORAGE_FILE_DIR:
+ case VIR_STORAGE_FILE_JSON:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("mishandled storage format '%1$s'"),
virStorageFileFormatTypeToString(src->format));
@@ -2317,6 +2318,7 @@
qemuBlockStorageSourceCreateGetFormatProps(virStorageSource *src,
case VIR_STORAGE_FILE_COW:
case VIR_STORAGE_FILE_ISO:
case VIR_STORAGE_FILE_DIR:
+ case VIR_STORAGE_FILE_JSON:
return 0;
case VIR_STORAGE_FILE_AUTO_SAFE:
diff --git a/tests/storagepoolcapsschemadata/poolcaps-fs.xml
b/tests/storagepoolcapsschemadata/poolcaps-fs.xml
index eee75af746..1f59d33aef 100644
--- a/tests/storagepoolcapsschemadata/poolcaps-fs.xml
+++ b/tests/storagepoolcapsschemadata/poolcaps-fs.xml
@@ -12,6 +12,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -55,6 +56,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -88,6 +90,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -167,6 +170,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -193,6 +197,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
diff --git a/tests/storagepoolcapsschemadata/poolcaps-full.xml
b/tests/storagepoolcapsschemadata/poolcaps-full.xml
index 805950a937..a4f532cbb8 100644
--- a/tests/storagepoolcapsschemadata/poolcaps-full.xml
+++ b/tests/storagepoolcapsschemadata/poolcaps-full.xml
@@ -12,6 +12,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -55,6 +56,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -88,6 +90,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -167,6 +170,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
@@ -193,6 +197,7 @@
<value>iso</value>
<value>vpc</value>
<value>vdi</value>
+ <value>json</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
index 79943f432e..c9db352af8 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
@@ -1,6 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2_qcow2-auto.qcow2
-backingStoreRawFormat: qcow2(14)
+backingStoreRawFormat: qcow2(15)
dataFileRaw: <null>
capacity: 1024
encryption: 0
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
index 02e2c5a966..713df6086d 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
@@ -1,6 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2
backingStoreRaw: qcow2_raw-auto.qcow2
-backingStoreRawFormat: qcow2(14)
+backingStoreRawFormat: qcow2(15)
dataFileRaw: <null>
capacity: 1024
encryption: 0
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
index 843a013ef5..fb741133df 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
@@ -1,6 +1,6 @@
path:ABS_BUILDDIR/virstoragedata/wrap
backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
-backingStoreRawFormat: qcow2(14)
+backingStoreRawFormat: qcow2(15)
dataFileRaw: <null>
capacity: 1024
encryption: 0
diff --git a/tests/virstoragetestdata/out/qcow2-symlinks
b/tests/virstoragetestdata/out/qcow2-symlinks
index c74cf6be53..8cc5d43e8f 100644
--- a/tests/virstoragetestdata/out/qcow2-symlinks
+++ b/tests/virstoragetestdata/out/qcow2-symlinks
@@ -1,6 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/sub/link2
backingStoreRaw: ../sub/link1
-backingStoreRawFormat: qcow2(14)
+backingStoreRawFormat: qcow2(15)
dataFileRaw: <null>
capacity: 1024
encryption: 0
diff --git a/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
b/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
index a200ba98fa..51dacec39c 100644
--- a/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
+++ b/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
@@ -1,6 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2datafile-datafile.qcow2
backingStoreRaw: datafile.qcow2
-backingStoreRawFormat: qcow2(14)
+backingStoreRawFormat: qcow2(15)
dataFileRaw: raw
capacity: 1024
encryption: 0
--
2.52.0