virsh: Make '(snapshot|checkpoint)-create' 'xmlfile' argument positional

The argument is optional thus couldn't be marked as positional until now,
despite being parsed positionally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2024-03-14 17:25:02 +01:00
parent 29f3ac4223
commit 3bbc97620a
2 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,7 @@ static const vshCmdOptDef opts_checkpoint_create[] = {
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE),
{.name = "xmlfile",
.type = VSH_OT_STRING,
.positional = true,
.completer = virshCompletePathLocalExisting,
.help = N_("domain checkpoint XML")
},

View File

@ -109,6 +109,7 @@ static const vshCmdOptDef opts_snapshot_create[] = {
VIRSH_COMMON_OPT_DOMAIN_FULL(0),
{.name = "xmlfile",
.type = VSH_OT_STRING,
.positional = true,
.completer = virshCompletePathLocalExisting,
.help = N_("domain snapshot XML")
},