util: storage: adapt to changes in JSON format for ssh

Since qemu 2.9 the options changed from a monolithic string into fine
grained options for the json pseudo-protocol object.
This commit is contained in:
Peter Krempa
2017-06-15 17:44:18 +02:00
parent 4fac5a1935
commit ea2c418ac3
2 changed files with 24 additions and 8 deletions

View File

@@ -1501,6 +1501,17 @@ mymain(void)
"<source protocol='ssh' name='blah'>\n"
" <host name='example.org' port='6000'/>\n"
"</source>\n");
TEST_BACKING_PARSE("json:{\"file\":{\"driver\":\"ssh\","
"\"path\":\"blah\","
"\"server\":{ \"host\":\"example.org\","
"\"port\":\"6000\""
"},"
"\"user\":\"user\""
"}"
"}",
"<source protocol='ssh' name='blah'>\n"
" <host name='example.org' port='6000'/>\n"
"</source>\n");
TEST_BACKING_PARSE("json:{\"file.driver\":\"rbd\","
"\"file.filename\":\"rbd:testshare:id=asdf:mon_host=example.com\""
"}",