virsh: Provide completers for options taking comma separated list of disk targets

'--storage' of the 'undefine' command and '--migrate-disks' of the
'migrate' command take a list of disk targets as an argument.

We can simply combine 'virshDomainDiskTargetCompleter' with
'virshCommaStringListComplete' to provide the completions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa
2021-09-16 15:11:03 +02:00
parent 80f70c74a7
commit 119b139c76
3 changed files with 48 additions and 0 deletions

View File

@@ -166,3 +166,13 @@ char **
virshDomainStorageFileFormatCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainMigrateDisksCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int completeflags);
char **
virshDomainUndefineStorageDisksCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int completeflags);