mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: virstoragefile: Add 'json:' pseudo-protocol parser for 'nfs' protocol
Enable parsing of backing store strings containing the native 'nfs' protocol specification. Signed-off-by: Ryan Gahagan <rgahagan@cs.utexas.edu> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
committed by
Peter Krempa
parent
c7570bbef8
commit
0f1f3f1228
@@ -1624,6 +1624,19 @@ mymain(void)
|
||||
"<source protocol='vxhs' name='c6718f6b-0401-441d-a8c3-1f0064d75ee0'>\n"
|
||||
" <host name='example.com' port='9999'/>\n"
|
||||
"</source>\n");
|
||||
TEST_BACKING_PARSE("json:{\"file\":{\"driver\":\"nfs\","
|
||||
"\"user\":2,"
|
||||
"\"group\":9,"
|
||||
"\"path\":\"/foo/bar/baz\","
|
||||
"\"server\": { \"host\":\"example.com\","
|
||||
"\"type\":\"inet\""
|
||||
"}"
|
||||
"}"
|
||||
"}",
|
||||
"<source protocol='nfs' name='/foo/bar/baz'>\n"
|
||||
" <host name='example.com'/>\n"
|
||||
" <identity user='+2' group='+9'/>\n"
|
||||
"</source>\n");
|
||||
TEST_BACKING_PARSE_FULL("json:{ \"driver\": \"raw\","
|
||||
"\"offset\": 10752,"
|
||||
"\"size\": 4063232,"
|
||||
|
||||
Reference in New Issue
Block a user