Paolo Bonzini <pbonz...@redhat.com> writes: > 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.
Noted. > _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. Yes, we should support config files in JSON syntax. Not sure mixing INI and JSON syntax in the same file is a good idea, though.