[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument synt
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax |
Date: |
Sat, 4 Feb 2017 02:03:07 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
On 04/02/2017 01:45, Markus Armbruster wrote:
>>> -drive driver=qcow2,
>>> file.driver=gluster,
>>> .volume=testvol,
>>> .path=/path/a.qcow2,
>>> .debug=9,
>>> file.server.0.type=tcp,
>>> .host=1.2.3.4,
>>> .port=24007,
>>> file.server.1.type=unix,
>>> .socket=/var/run/glusterd.socket
>>>
>>> Mind, I'm not at all sure this is a *good* idea. I suspect it's more
>>> magic than it's worth.
>> As someone who likes dot syntax very much, I don't like it. If you
>> structure it like this, it's OK, but then you can just write the full
>> prefix (which gets the point across just as well because I can quickly
>> tell from a glance that it's the same prefix).
>>
>> OTOH, when joined into a single line it doesn't change much in terms of
>> legibility, in my opinion.
>
> Thanks!
Actually I think it does improve legibility.
It doesn't improve writability though, as anecdotally proved by Markus's
own mistake.
I am a fan of the dot syntax too. It seems to be the most incremental
solution, and it's still as expressive as JSON.
_However_ we could also extend -readconfig to support JSON, i.e. instead of
[drive "abc"]
file = "foo"
it could support
{ 'drive': { 'file: 'foo' }, 'id': 'abc' }
In other words [ would introduce key-value QemuOpts with dot syntax,
while { would introduce JSON.
Paolo
- Re: [Qemu-block] Non-flat command line option argument syntax, (continued)
- Re: [Qemu-block] Non-flat command line option argument syntax, Eric Blake, 2017/02/02
- Re: [Qemu-block] Non-flat command line option argument syntax, Eric Blake, 2017/02/02
- Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax, Dr. David Alan Gilbert, 2017/02/02
- Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax, Max Reitz, 2017/02/03
- Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax, Markus Armbruster, 2017/02/04
- Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax,
Paolo Bonzini <=
- Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax, Markus Armbruster, 2017/02/04
- Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax, Paolo Bonzini, 2017/02/04
Re: [Qemu-block] Non-flat command line option argument syntax, Daniel P. Berrange, 2017/02/03
Re: [Qemu-block] Non-flat command line option argument syntax, Peter Krempa, 2017/02/03
Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax, Richard W.M. Jones, 2017/02/03
Re: [Qemu-block] Non-flat command line option argument syntax, Max Reitz, 2017/02/03