mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
423b4f6625
commit
13f59e6f40
|
@ -115,6 +115,9 @@ struct testQemuDiskXMLToJSONData {
|
||||||
virJSONValuePtr *props;
|
virJSONValuePtr *props;
|
||||||
size_t nprops;
|
size_t nprops;
|
||||||
|
|
||||||
|
virJSONValuePtr *propssrc;
|
||||||
|
size_t npropssrc;
|
||||||
|
|
||||||
virQEMUCapsPtr qemuCaps;
|
virQEMUCapsPtr qemuCaps;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -127,8 +130,13 @@ testQemuDiskXMLToPropsClear(struct testQemuDiskXMLToJSONData *data)
|
||||||
for (i = 0; i < data->nprops; i++)
|
for (i = 0; i < data->nprops; i++)
|
||||||
virJSONValueFree(data->props[i]);
|
virJSONValueFree(data->props[i]);
|
||||||
|
|
||||||
|
for (i = 0; i < data->npropssrc; i++)
|
||||||
|
virJSONValueFree(data->propssrc[i]);
|
||||||
|
|
||||||
data->nprops = 0;
|
data->nprops = 0;
|
||||||
VIR_FREE(data->props);
|
VIR_FREE(data->props);
|
||||||
|
data->npropssrc = 0;
|
||||||
|
VIR_FREE(data->propssrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -180,6 +188,7 @@ testQemuDiskXMLToProps(const void *opaque)
|
||||||
virStorageSourcePtr n;
|
virStorageSourcePtr n;
|
||||||
virJSONValuePtr formatProps = NULL;
|
virJSONValuePtr formatProps = NULL;
|
||||||
virJSONValuePtr storageProps = NULL;
|
virJSONValuePtr storageProps = NULL;
|
||||||
|
VIR_AUTOPTR(virJSONValue) storageSrcOnlyProps = NULL;
|
||||||
char *xmlpath = NULL;
|
char *xmlpath = NULL;
|
||||||
char *xmlstr = NULL;
|
char *xmlstr = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
@ -213,6 +222,7 @@ testQemuDiskXMLToProps(const void *opaque)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n)) ||
|
if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n)) ||
|
||||||
|
!(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, false, true)) ||
|
||||||
!(storageProps = qemuBlockStorageSourceGetBackendProps(n, false, false))) {
|
!(storageProps = qemuBlockStorageSourceGetBackendProps(n, false, false))) {
|
||||||
if (!data->fail) {
|
if (!data->fail) {
|
||||||
VIR_TEST_VERBOSE("failed to generate qemu blockdev props\n");
|
VIR_TEST_VERBOSE("failed to generate qemu blockdev props\n");
|
||||||
|
@ -224,7 +234,8 @@ testQemuDiskXMLToProps(const void *opaque)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_APPEND_ELEMENT(data->props, data->nprops, formatProps) < 0 ||
|
if (VIR_APPEND_ELEMENT(data->props, data->nprops, formatProps) < 0 ||
|
||||||
VIR_APPEND_ELEMENT(data->props, data->nprops, storageProps) < 0)
|
VIR_APPEND_ELEMENT(data->props, data->nprops, storageProps) < 0 ||
|
||||||
|
VIR_APPEND_ELEMENT(data->propssrc, data->npropssrc, storageSrcOnlyProps) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,6 +279,23 @@ testQemuDiskXMLToPropsValidateSchema(const void *opaque)
|
||||||
|
|
||||||
virBufferFreeAndReset(&debug);
|
virBufferFreeAndReset(&debug);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < data->npropssrc; i++) {
|
||||||
|
if (testQEMUSchemaValidate(data->propssrc[i], data->schemaroot,
|
||||||
|
data->schema, &debug) < 0) {
|
||||||
|
debugmsg = virBufferContentAndReset(&debug);
|
||||||
|
propsstr = virJSONValueToString(data->propssrc[i], true);
|
||||||
|
VIR_TEST_VERBOSE("json does not conform to QAPI schema");
|
||||||
|
VIR_TEST_DEBUG("json:\n%s\ndoes not match schema. Debug output:\n %s",
|
||||||
|
propsstr, NULLSTR(debugmsg));
|
||||||
|
VIR_FREE(debugmsg);
|
||||||
|
VIR_FREE(propsstr);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
virBufferFreeAndReset(&debug);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,6 +341,40 @@ testQemuDiskXMLToPropsValidateFile(const void *opaque)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
testQemuDiskXMLToPropsValidateFileSrcOnly(const void *opaque)
|
||||||
|
{
|
||||||
|
struct testQemuDiskXMLToJSONData *data = (void *) opaque;
|
||||||
|
VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||||
|
VIR_AUTOFREE(char *) jsonpath = NULL;
|
||||||
|
VIR_AUTOFREE(char *) actual = NULL;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
if (data->fail)
|
||||||
|
return EXIT_AM_SKIP;
|
||||||
|
|
||||||
|
if (virAsprintf(&jsonpath, "%s%s-srconly.json",
|
||||||
|
testQemuDiskXMLToJSONPath, data->name) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
for (i = 0; i < data->npropssrc; i++) {
|
||||||
|
VIR_AUTOFREE(char *) jsonstr = NULL;
|
||||||
|
|
||||||
|
if (!(jsonstr = virJSONValueToString(data->propssrc[i], true)))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
virBufferAdd(&buf, jsonstr, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (virBufferCheckError(&buf) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
actual = virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
|
return virTestCompareToFile(actual, jsonpath);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mymain(void)
|
mymain(void)
|
||||||
{
|
{
|
||||||
|
@ -411,6 +473,8 @@ mymain(void)
|
||||||
diskxmljsondata.name = nme; \
|
diskxmljsondata.name = nme; \
|
||||||
diskxmljsondata.props = NULL; \
|
diskxmljsondata.props = NULL; \
|
||||||
diskxmljsondata.nprops = 0; \
|
diskxmljsondata.nprops = 0; \
|
||||||
|
diskxmljsondata.propssrc = NULL; \
|
||||||
|
diskxmljsondata.npropssrc = 0; \
|
||||||
diskxmljsondata.fail = fl; \
|
diskxmljsondata.fail = fl; \
|
||||||
if (virTestRun("disk xml to props " nme, testQemuDiskXMLToProps, \
|
if (virTestRun("disk xml to props " nme, testQemuDiskXMLToProps, \
|
||||||
&diskxmljsondata) < 0) \
|
&diskxmljsondata) < 0) \
|
||||||
|
@ -421,6 +485,9 @@ mymain(void)
|
||||||
if (virTestRun("disk xml to props validate file " nme, \
|
if (virTestRun("disk xml to props validate file " nme, \
|
||||||
testQemuDiskXMLToPropsValidateFile, &diskxmljsondata) < 0) \
|
testQemuDiskXMLToPropsValidateFile, &diskxmljsondata) < 0) \
|
||||||
ret = -1; \
|
ret = -1; \
|
||||||
|
if (virTestRun("disk xml to props source only validate file " nme, \
|
||||||
|
testQemuDiskXMLToPropsValidateFileSrcOnly, &diskxmljsondata) < 0) \
|
||||||
|
ret = -1; \
|
||||||
testQemuDiskXMLToPropsClear(&diskxmljsondata); \
|
testQemuDiskXMLToPropsClear(&diskxmljsondata); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
}
|
Loading…
Reference in New Issue