mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virsh: snapshot: Make 'snapshotname' argument positional
The 'snapshotname' argument is optional as by default "current" snapshot is considered. Regardless of that we should treat it as positional as it's the common usage. This is now possible as we can have one optional positional argument. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
0ce337b20c
commit
29f3ac4223
@ -486,6 +486,7 @@ static const vshCmdOptDef opts_snapshot_edit[] = {
|
|||||||
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
||||||
{.name = "snapshotname",
|
{.name = "snapshotname",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.help = N_("snapshot name"),
|
.help = N_("snapshot name"),
|
||||||
.completer = virshSnapshotNameCompleter,
|
.completer = virshSnapshotNameCompleter,
|
||||||
},
|
},
|
||||||
@ -599,6 +600,7 @@ static const vshCmdOptDef opts_snapshot_current[] = {
|
|||||||
},
|
},
|
||||||
{.name = "snapshotname",
|
{.name = "snapshotname",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.help = N_("name of existing snapshot to make current"),
|
.help = N_("name of existing snapshot to make current"),
|
||||||
.completer = virshSnapshotNameCompleter,
|
.completer = virshSnapshotNameCompleter,
|
||||||
},
|
},
|
||||||
@ -798,6 +800,7 @@ static const vshCmdOptDef opts_snapshot_info[] = {
|
|||||||
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
||||||
{.name = "snapshotname",
|
{.name = "snapshotname",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.help = N_("snapshot name"),
|
.help = N_("snapshot name"),
|
||||||
.completer = virshSnapshotNameCompleter,
|
.completer = virshSnapshotNameCompleter,
|
||||||
},
|
},
|
||||||
@ -1635,6 +1638,7 @@ static const vshCmdOptDef opts_snapshot_parent[] = {
|
|||||||
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
||||||
{.name = "snapshotname",
|
{.name = "snapshotname",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.help = N_("find parent of snapshot name"),
|
.help = N_("find parent of snapshot name"),
|
||||||
.completer = virshSnapshotNameCompleter,
|
.completer = virshSnapshotNameCompleter,
|
||||||
},
|
},
|
||||||
@ -1682,6 +1686,7 @@ static const vshCmdOptDef opts_snapshot_revert[] = {
|
|||||||
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
||||||
{.name = "snapshotname",
|
{.name = "snapshotname",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.help = N_("snapshot name"),
|
.help = N_("snapshot name"),
|
||||||
.completer = virshSnapshotNameCompleter,
|
.completer = virshSnapshotNameCompleter,
|
||||||
},
|
},
|
||||||
@ -1763,6 +1768,7 @@ static const vshCmdOptDef opts_snapshot_delete[] = {
|
|||||||
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT),
|
||||||
{.name = "snapshotname",
|
{.name = "snapshotname",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.help = N_("snapshot name"),
|
.help = N_("snapshot name"),
|
||||||
.completer = virshSnapshotNameCompleter,
|
.completer = virshSnapshotNameCompleter,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user