volume XML?
Best Regards,
Solly Ross
P.S. we currently deal with a similar problem in OpenStack by saving the file
type to disk
the first time we use the image file. However, it would be nice if libvirt
could handle
this for us, at some point, as it seems like it would be a good thing to have
This patch introduces a custom completer for domains,
and sets it to be used for all of the "domain" arguments.
In order to facilitate this, the functions involved in
retrieve in a list of domains were moved from
virsh-domain-monitor to virsh-completer, where they
can be included by any file that
This patch introduces a way for completers to retrieve the
current vshControl object by using the vshGetCompleterCtl()
macro. When readline is enabled, the main method stores the
vshControl pointer in a variable that is file-global to virsh.c.
Then, that pointer can be retrieved by the _vshGetComp
This commit extracts the parsing logic from vshCommandParse
so that it can be used by other methods. The vshCommandParse
method is designed to parse full commands and error out on
unknown information, so it is not suitable to simply use it
for autocompletion. Instead, the logic has been extracted
mainly to allow people to test out
"smart completion")
Solly Ross (4):
Improve virsh autocompletion (extract parser)
Improve virsh autocompletion (base framework)
Improve virsh autocompletion (global ctl object)
Improve virsh autocompletion (domain completer)
po/POTFILES.in
Previously, virsh was able to complete initial command names,
as well as the names of flag options. However, this completion
was clunky for a number of reasons:
- it would provide a flag as an option for completion
even if it had already been used
- it did not support completion of positional
This patch adds a utility macro which generates completers
for enum-type string options (i.e. those options which may
be one of a static set of strings).
Instead of having to manually implement a completers for such
options, the macro may be used as such:
`VSH_STRING_COMPLETER(ctl, SomeOption, "st
This patch introduces a custom completer for domains,
and sets it to be used for all of the "domain" arguments.
In order to facilitate this, the functions involved in
retrieve in a list of domains were moved from
virsh-domain-monitor to virsh-completer, where they
can be included by any file that
Previously, virsh was able to complete initial command names,
as well as the names of flag options. However, this completion
was clunky for a number of reasons:
- it would provide a flag as an option for completion
even if it had already been used
- it did not support completion of positional
that none of the options which use the domain completer
currently have flags set to indicate whether active or inactive
domains should be completed. If this completion patch-set is
OKed, then I will go back and add these flags. Currently,
the commit is there simply to make testing out the
This patch introduces a way for completers to retrieve the
current vshControl object by using the vshGetCompleterCtl()
macro. When readline is enabled, the main method stores the
vshControl pointer in a variable that is file-global to virsh.c.
Then, that pointer can be retrieved by the _vshGetComp
are used
in the virsh code. Is there a reason why virsh does not simply use VIR_ALLOC
and friends?
Best Regards,
Solly Ross
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
12 matches
Mail list logo