mirror of https://gitee.com/openkylin/libvirt.git
util: storage: Properly set protocol type when parsing gluster json string
Commit 2ed772cd
forgot to set proper protocol. This was also present in
the test data.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372251
This commit is contained in:
parent
56f09042ef
commit
b7a650c97c
|
@ -2786,6 +2786,9 @@ virStorageSourceParseBackingJSONGluster(virStorageSourcePtr src,
|
|||
return -1;
|
||||
}
|
||||
|
||||
src->type = VIR_STORAGE_TYPE_NETWORK;
|
||||
src->protocol = VIR_STORAGE_NET_PROTOCOL_GLUSTER;
|
||||
|
||||
if (VIR_STRDUP(src->volume, volume) < 0 ||
|
||||
virAsprintf(&src->path, "/%s", path) < 0)
|
||||
return -1;
|
||||
|
|
|
@ -1412,7 +1412,7 @@ mymain(void)
|
|||
"]"
|
||||
"}"
|
||||
"}",
|
||||
"<source protocol='none' name='testvol/img.qcow2'>\n"
|
||||
"<source protocol='gluster' name='testvol/img.qcow2'>\n"
|
||||
" <host name='example.com' port='1234'/>\n"
|
||||
" <host transport='unix' socket='/path/socket'/>\n"
|
||||
" <host name='example.com'/>\n"
|
||||
|
@ -1432,7 +1432,7 @@ mymain(void)
|
|||
"}"
|
||||
"]"
|
||||
"}",
|
||||
"<source protocol='none' name='testvol/img.qcow2'>\n"
|
||||
"<source protocol='gluster' name='testvol/img.qcow2'>\n"
|
||||
" <host name='example.com' port='1234'/>\n"
|
||||
" <host transport='unix' socket='/path/socket'/>\n"
|
||||
" <host name='example.com'/>\n"
|
||||
|
|
Loading…
Reference in New Issue