Re: virsh list

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

 



On Mon, Mar 03, 2008 at 09:44:31PM +0000, Richard W.M. Jones wrote:

> > Am I the only one who finds the default behaviour of virsh list really
> > confusing and annoying? That is, I would like --all to be the default.
> 
> Me too, but can we change it without breaking scripts or similar?

Well, you've hit upon a good question here. Is virsh interactive, or
scriptable? Within Sun we generally attempt to clearly delineate these
things, precisely for reasons like the above.

'virsh list' would have grown a '-p' option, that printed a
machine-parsable output. That way, you can change the human output as
needed (for example, you can translate 'blocked' into $LANG).

Anyway, in this case, I think fixing up virsh list would be less pain
than leaving it. Anything that's trying to parse human-readable output
needs to be written carefully. For example, I don't think you'd have the
same objection to adding a field to 'vcpuinfo', but that's just as
likely to break scripts. I'm happy to hear contradictory opinions :)

In the longer term it would be good to make sure all new commands have
the above considerations when reviewing the visible CLI. Perhaps we can
go back and add -p options to things as appropriate too.

regards
john

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]