Daniel P. Berrange wrote:
As we did with virsh attach-disk/attach-interface, vs attach-device I think it would be helpful to provide a 'virsh vol-create' variant which took a handful of explicit args as an alternative to the XML, eg virsh pool-create --type fs xenimages /var/lib/xen/images
Yes, vital really, and even better if it's a libvirt call.
NB, <format> is actually optional - it defaults to raw. Permissions should be optional, but currently aren't. Allocation is optional too, without it, you will get a sparse file.
I didn't really understand the semantics of <allocation>. It should be <sparse/> AFAICS. This underlines actually why XML is so much more slippery than real typing.
<pool type="xxx"> <name>xenimages</name> <!-- target should make sense for the xxx driver, eg. path for fs, LUN name for iSCSI, etc. There is no need for the dir=... attribute --> <target>/var/lib/xen/images</target> <!-- permissions should default to sensible values --> </pool>Yep, I intended permissions to be optional. Not all pools have a target, some only have a source. Basically name,and either target or source is the minimal set. Everything else should be optional.
But to avoid lots of switch/case in the caller we should also avoid using an attribute name (<target> vs <target dir=...>).
Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
-- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list