diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 6f7d131a82..471aa1fcc4 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2684,9 +2684,9 @@ virStorageSourceParseBackingJSONUri(virStorageSourcePtr src, { const char *uri; - if (!(uri = virJSONValueObjectGetString(json, "uri"))) { + if (!(uri = virJSONValueObjectGetString(json, "url"))) { virReportError(VIR_ERR_INVALID_ARG, "%s", - _("missing URI in JSON backing volume definition")); + _("missing 'url' in JSON backing volume definition")); return -1; } diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 3b19f59fa5..b3d59adc3f 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1377,19 +1377,19 @@ mymain(void) "\"file.filename\":\"/path/to/cdrom\"}", "\n"); TEST_BACKING_PARSE("json:{\"file.driver\":\"http\", " - "\"file.uri\":\"http://example.com/file\"}", + "\"file.url\":\"http://example.com/file\"}", "\n" " \n" "\n"); TEST_BACKING_PARSE("json:{\"file\":{ \"driver\":\"http\"," - "\"uri\":\"http://example.com/file\"" + "\"url\":\"http://example.com/file\"" "}" "}", "\n" " \n" "\n"); TEST_BACKING_PARSE("json:{\"file.driver\":\"ftp\", " - "\"file.uri\":\"http://example.com/file\"}", + "\"file.url\":\"http://example.com/file\"}", NULL); TEST_BACKING_PARSE("json:{\"file.driver\":\"gluster\", " "\"file.filename\":\"gluster://example.com/vol/file\"}",