JSON pseudo protocol for qemu allows to explicitly specify devices.
Add convertor to the internal type.
static const struct virStorageSourceJSONDriverParser jsonParsers[] = {
{"file", virStorageSourceParseBackingJSONPath, VIR_STORAGE_TYPE_FILE},
+ {"host_device", virStorageSourceParseBackingJSONPath, VIR_STORAGE_TYPE_BLOCK},
+ {"host_cdrom", virStorageSourceParseBackingJSONPath, VIR_STORAGE_TYPE_BLOCK},
};
"}"
"}",
"<source file='/path/to/file'/>\n");
+ TEST_BACKING_PARSE("json:{\"file.driver\":\"host_device\", "
+ "\"file.filename\":\"/path/to/dev\"}",
+ "<source dev='/path/to/dev'/>\n");
+ TEST_BACKING_PARSE("json:{\"file.driver\":\"host_cdrom\", "
+ "\"file.filename\":\"/path/to/cdrom\"}",
+ "<source dev='/path/to/cdrom'/>\n");
cleanup:
/* Final cleanup */