mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
virsh: Add comp-methods completion to migrate command
Signed-off-by: Lin Ma <lma@suse.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f14ca48ef4
commit
a61a6978d3
@ -959,3 +959,20 @@ virshDomainCoreDumpFormatCompleter(vshControl *ctl G_GNUC_UNUSED,
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char **
|
||||||
|
virshDomainMigrateCompMethodsCompleter(vshControl *ctl,
|
||||||
|
const vshCmd *cmd,
|
||||||
|
unsigned int flags)
|
||||||
|
{
|
||||||
|
const char *methods[] = {"xbzrle", "mt", NULL};
|
||||||
|
const char *method = NULL;
|
||||||
|
|
||||||
|
virCheckFlags(0, NULL);
|
||||||
|
|
||||||
|
if (vshCommandOptStringQuiet(ctl, cmd, "comp-methods", &method) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return virshCommaStringListComplete(method, methods);
|
||||||
|
}
|
||||||
|
@ -127,3 +127,8 @@ char **
|
|||||||
virshDomainCoreDumpFormatCompleter(vshControl *ctl,
|
virshDomainCoreDumpFormatCompleter(vshControl *ctl,
|
||||||
const vshCmd *cmd,
|
const vshCmd *cmd,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
|
char **
|
||||||
|
virshDomainMigrateCompMethodsCompleter(vshControl *ctl,
|
||||||
|
const vshCmd *cmd,
|
||||||
|
unsigned int flags);
|
||||||
|
@ -10619,6 +10619,7 @@ static const vshCmdOptDef opts_migrate[] = {
|
|||||||
},
|
},
|
||||||
{.name = "comp-methods",
|
{.name = "comp-methods",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.completer = virshDomainMigrateCompMethodsCompleter,
|
||||||
.help = N_("comma separated list of compression methods to be used")
|
.help = N_("comma separated list of compression methods to be used")
|
||||||
},
|
},
|
||||||
{.name = "comp-mt-level",
|
{.name = "comp-mt-level",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user