virsh: Provide local path completer for vol-download --file

The vol-download command takes mandatory --file argument which
points to a local (possibly non-existent) path. If the file
exists then it's overwritten. Set the argument's completer so
that self-test doesn't report it as missing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2021-09-17 09:58:54 +02:00
parent 8eefc7afc8
commit 520e858a8d

View File

@ -779,11 +779,7 @@ static const vshCmdInfo info_vol_download[] = {
static const vshCmdOptDef opts_vol_download[] = {
VIRSH_COMMON_OPT_VOL_FULL,
{.name = "file",
.type = VSH_OT_DATA,
.flags = VSH_OFLAG_REQ,
.help = N_("file")
},
VIRSH_COMMON_OPT_FILE(N_("file")),
VIRSH_COMMON_OPT_POOL_OPTIONAL,
{.name = "offset",
.type = VSH_OT_INT,