qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making QEMU easier for management tools and applications


From: Daniel P . Berrangé
Subject: Re: Making QEMU easier for management tools and applications
Date: Mon, 27 Jan 2020 10:18:16 +0000
User-agent: Mutt/1.12.1 (2019-06-15)

On Sat, Jan 25, 2020 at 11:18:41AM +0100, Markus Armbruster wrote:
> Kevin Wolf <address@hidden> writes:
> 
> > Am 24.01.2020 um 11:27 hat Daniel P. Berrangé geschrieben:
> >> So if we allowed YAML instead of JSON, now we get...
> >> 
> >>   $ cat qemu.yaml
> >>   ---
> >>   arguments:
> >>   - arg: object
> >>     data:
> >>       type: secret
> >>       id: libvirt-5-storage-secret0
> >>       data: 
> >> 9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1
> >>       keyid: masterKey0
> >>       iv: AAECAwQFBgcICQoLDA0ODw==
> >>       format: base64
> >>   - arg: object
> >>     data:
> >>       type: secret
> >>       id: libvirt-5-format-luks-secret0
> >>       data: 
> >> 9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1
> >>       keyid: masterKey0
> >>       iv: AAECAwQFBgcICQoLDA0ODw==
> >>       format: base64
> >>   - arg: blockdev
> >>     data:
> >>       node-name: libvirt-5-format
> >>       read-only: false
> >>       driver: qcow2
> >>       encrypt:
> >>         format: luks
> >>         key-secret: libvirt-5-format-luks-secret0
> >>       file:
> >>         driver: iscsi
> >>         portal: example.org:6000
> >>         target: iqn.1992-01.com.example:storage
> >>         lun: 1
> >>         transport: tcp
> >>         user: myname
> >>         password-secret: libvirt-5-storage-secret0
> >>         node-name: libvirt-5-storage
> >>         auto-read-only: true
> >>         discard: unmap
> >>   $ qemu-system-x86_64 -f qemu.yaml
> >> 
> >> This is finally something I'd consider to be on a par with the
> >> original QEMU syntax, before we added hierarchical data. You
> >> have the minimal possible amount of syntax here. No commas,
> >> no quotes, no curly brackets, etc.
> >
> > This seems to have the same problems as the QEMU command line (how do
> > you distinguish strings from ints, from bools, from null?).
> 
> True: YAML provides only string scalars.

Actually, YAML provides  strings, integers, booleans & nulls, the same
level of typing at JSON, but with added benefit of supporting comments
officially:

  https://rollout.io/blog/yaml-tutorial-everything-you-need-get-started/

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]