On Tue, Dec 29, 2015 at 02:24:39PM +1100, Trent W. Buck wrote:
On 27/12/2015 6:57 PM, Andrew McGlashan wrote:
virsh is very simple, no XML editing required.
Without using "virsh edit" or "virsh dumpxml", how do you do things
I would also argue that virsh's CLI isn't that simple, either. Given
that there are 223 commands across 12 groups, each with their own set of
arguments and options. Often with an inconsistent interfaces, e.g.
+ list, <command>-list, <command>list, <command> --list
+ which take individual --options to filter results (rather than one
--filter option, or not at all, and just pipe to a filter command)
+ Separate commands for essentially the same function, could be
condensed into one command with options; e.g. define, create,
+ vol-* commands take either a <vol> or <pool> argument, many commands
to display vol attributes, rather than one command with options, or
+ blkdeviotune vs blkiotune vs block* commands
+ Some commands take XML file as an argument, but others to print the
+ Probably some more I've forgotten, or haven't noticed.
Although the following would be more verbose, it would go a long way
towards consistency, using a "command verb object options" pattern;
$ virsh create [domain|volume|etc] --name <name> <options>
$ virsh create domain --file <xml-file>
$ virsh info domain <domain> --dumpxml <xml-file>
$ virsh create snapshot <domain>
$ virsh clone volume <volume> [options]
$ virsh list network --filter active [options]
$ virsh edit [domain|network|pool|etc]
Just a thought... any one else think that'd be a good idea?