[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [libvirt] [libvirt RFC PATCH 04/10] util: storage: Add
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [libvirt] [libvirt RFC PATCH 04/10] util: storage: Add support for URI based backing volumes in qemu's JSON pseudo-protocol |
Date: |
Wed, 27 Jul 2016 21:04:08 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 07/15/2016 07:46 AM, Peter Krempa wrote:
> http(s), ftp(s) and tftp use URIs for volume definitions in the JSON
> pseudo protocol so it's pretty straightforward to add support for them.
> ---
> src/util/virstoragefile.c | 34 ++++++++++++++++++++++++++++++++++
> tests/virstoragetest.c | 8 ++++++++
> 2 files changed, 42 insertions(+)
Still might be nice to include an example in the commit message, not
just the testsuite addition.
I know that qemu is hoping to move away from URI towards more structured
layouts as part of adding blockdev-add support for these drivers (back
to your observation that once qemu supports two ways, it will have to
continue to support both types of users). That means we may need more
code to parse non-URI (but better-structured) uses, but we'd still need
this uri parsing.
> +++ b/tests/virstoragetest.c
> @@ -1367,6 +1367,14 @@ mymain(void)
> TEST_BACKING_PARSE(12, "json:{\"file.driver\":\"host_cdrom\", "
> "\"file.filename\":\"/path/to/cdrom\"}",
> "<source dev='/path/to/cdrom'/>\n");
> + TEST_BACKING_PARSE(13, "json:{\"file.driver\":\"http\", "
> + "\"file.uri\":\"http://example.com/file\"}",
> + "<source protocol='http' name='file'>\n"
> + " <host name='example.com'/>\n"
> + "</source>\n");
> + TEST_BACKING_PARSE(14, "json:{\"file.driver\":\"ftp\", "
> + "\"file.uri\":\"http://example.com/file\"}",
> + NULL);
>
On the bright side, this patch made it look fairly simple, which means
we have good reuse of code.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [libvirt RFC PATCH 00/10] Add support for qemu's JSON pseudo'protocol for backing store, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 03/10] util: storage: Add support for host device backing specified via JSON, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 01/10] tests: Add testing of backing store string parser, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 04/10] util: storage: Add support for URI based backing volumes in qemu's JSON pseudo-protocol, Peter Krempa, 2016/07/15
- Re: [Qemu-block] [libvirt] [libvirt RFC PATCH 04/10] util: storage: Add support for URI based backing volumes in qemu's JSON pseudo-protocol,
Eric Blake <=
- [Qemu-block] [libvirt RFC PATCH 05/10] util: storage: Add json pseudo protocol support for gluster volumes, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 02/10] util: storage: Add parser for qemu's "json" backing pseudo-protocol, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 06/10] util: storage: Add json pseudo protocol support for iSCSI volumes, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 07/10] Add JSON backing volume parser for 'nbd' protocol, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 09/10] util: storage: Add 'ssh' network storage protocol, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 08/10] util: storage: Add JSON backing store parser for 'sheepdog' protocol, Peter Krempa, 2016/07/15
- [Qemu-block] [libvirt RFC PATCH 10/10] util: storage: Add JSON backing volume parser for 'ssh' protocol, Peter Krempa, 2016/07/15
- Re: [Qemu-block] [libvirt] [libvirt RFC PATCH 00/10] Add support for qemu's JSON pseudo'protocol for backing store, Daniel P. Berrange, 2016/07/15