mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
vsh: Refactor store of command help and description
Store the pointers to 'help' and 'description' information in the struct directly rather than in a key-value list. The generic approach never got any extra use. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7df38644bc
commit
465091d2b8
@ -24,15 +24,10 @@
|
||||
/*
|
||||
* "backup-begin" command
|
||||
*/
|
||||
static const vshCmdInfo info_backup_begin[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Start a disk backup of a live domain")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Use XML to start a full or incremental disk backup of a live "
|
||||
"domain, optionally creating a checkpoint")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_backup_begin = {
|
||||
.help = N_("Start a disk backup of a live domain"),
|
||||
.desc = N_("Use XML to start a full or incremental disk backup of a live "
|
||||
"domain, optionally creating a checkpoint"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_backup_begin[] = {
|
||||
@ -103,14 +98,9 @@ cmdBackupBegin(vshControl *ctl,
|
||||
/*
|
||||
* "backup-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_backup_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Dump XML for an ongoing domain block backup job")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Backup Dump XML")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_backup_dumpxml = {
|
||||
.help = N_("Dump XML for an ongoing domain block backup job"),
|
||||
.desc = N_("Backup Dump XML"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_backup_dumpxml[] = {
|
||||
@ -154,13 +144,13 @@ const vshCmdDef backupCmds[] = {
|
||||
{.name = "backup-begin",
|
||||
.handler = cmdBackupBegin,
|
||||
.opts = opts_backup_begin,
|
||||
.info = info_backup_begin,
|
||||
.info = &info_backup_begin,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "backup-dumpxml",
|
||||
.handler = cmdBackupDumpXML,
|
||||
.opts = opts_backup_dumpxml,
|
||||
.info = info_backup_dumpxml,
|
||||
.info = &info_backup_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -71,15 +71,10 @@ virshCheckpointCreate(vshControl *ctl,
|
||||
/*
|
||||
* "checkpoint-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_checkpoint_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Create a checkpoint from XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a checkpoint from XML for use in "
|
||||
"future incremental backups")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_create = {
|
||||
.help = N_("Create a checkpoint from XML"),
|
||||
.desc = N_("Create a checkpoint from XML for use in "
|
||||
"future incremental backups"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_create[] = {
|
||||
@ -183,15 +178,10 @@ virshParseCheckpointDiskspec(vshControl *ctl,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const vshCmdInfo info_checkpoint_create_as[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Create a checkpoint from a set of args")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a checkpoint from arguments for use in "
|
||||
"future incremental backups")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_create_as = {
|
||||
.help = N_("Create a checkpoint from a set of args"),
|
||||
.desc = N_("Create a checkpoint from arguments for use in "
|
||||
"future incremental backups"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_create_as[] = {
|
||||
@ -309,14 +299,9 @@ virshLookupCheckpoint(vshControl *ctl,
|
||||
/*
|
||||
* "checkpoint-edit" command
|
||||
*/
|
||||
static const vshCmdInfo info_checkpoint_edit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("edit XML for a checkpoint")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Edit the domain checkpoint XML for a named checkpoint")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_edit = {
|
||||
.help = N_("edit XML for a checkpoint"),
|
||||
.desc = N_("Edit the domain checkpoint XML for a named checkpoint"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_edit[] = {
|
||||
@ -425,14 +410,9 @@ virshGetCheckpointParent(vshControl *ctl,
|
||||
/*
|
||||
* "checkpoint-info" command
|
||||
*/
|
||||
static const vshCmdInfo info_checkpoint_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("checkpoint information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about a checkpoint.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_info = {
|
||||
.help = N_("checkpoint information"),
|
||||
.desc = N_("Returns basic information about a checkpoint."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_info[] = {
|
||||
@ -623,14 +603,9 @@ virshCheckpointListLookup(int id,
|
||||
/*
|
||||
* "checkpoint-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_checkpoint_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("List checkpoints for a domain")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Checkpoint List")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_list = {
|
||||
.help = N_("List checkpoints for a domain"),
|
||||
.desc = N_("Checkpoint List"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_list[] = {
|
||||
@ -825,14 +800,9 @@ cmdCheckpointList(vshControl *ctl,
|
||||
/*
|
||||
* "checkpoint-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_checkpoint_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Dump XML for a domain checkpoint")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Checkpoint Dump XML")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_dumpxml = {
|
||||
.help = N_("Dump XML for a domain checkpoint"),
|
||||
.desc = N_("Checkpoint Dump XML"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_dumpxml[] = {
|
||||
@ -906,14 +876,9 @@ cmdCheckpointDumpXML(vshControl *ctl,
|
||||
/*
|
||||
* "checkpoint-parent" command
|
||||
*/
|
||||
static const vshCmdInfo info_checkpoint_parent[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Get the name of the parent of a checkpoint")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Extract the checkpoint's parent, if any")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_parent = {
|
||||
.help = N_("Get the name of the parent of a checkpoint"),
|
||||
.desc = N_("Extract the checkpoint's parent, if any"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_parent[] = {
|
||||
@ -959,14 +924,9 @@ cmdCheckpointParent(vshControl *ctl,
|
||||
/*
|
||||
* "checkpoint-delete" command
|
||||
*/
|
||||
static const vshCmdInfo info_checkpoint_delete[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Delete a domain checkpoint")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Checkpoint Delete")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_checkpoint_delete = {
|
||||
.help = N_("Delete a domain checkpoint"),
|
||||
.desc = N_("Checkpoint Delete"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_checkpoint_delete[] = {
|
||||
@ -1034,49 +994,49 @@ const vshCmdDef checkpointCmds[] = {
|
||||
{.name = "checkpoint-create",
|
||||
.handler = cmdCheckpointCreate,
|
||||
.opts = opts_checkpoint_create,
|
||||
.info = info_checkpoint_create,
|
||||
.info = &info_checkpoint_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "checkpoint-create-as",
|
||||
.handler = cmdCheckpointCreateAs,
|
||||
.opts = opts_checkpoint_create_as,
|
||||
.info = info_checkpoint_create_as,
|
||||
.info = &info_checkpoint_create_as,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "checkpoint-delete",
|
||||
.handler = cmdCheckpointDelete,
|
||||
.opts = opts_checkpoint_delete,
|
||||
.info = info_checkpoint_delete,
|
||||
.info = &info_checkpoint_delete,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "checkpoint-dumpxml",
|
||||
.handler = cmdCheckpointDumpXML,
|
||||
.opts = opts_checkpoint_dumpxml,
|
||||
.info = info_checkpoint_dumpxml,
|
||||
.info = &info_checkpoint_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "checkpoint-edit",
|
||||
.handler = cmdCheckpointEdit,
|
||||
.opts = opts_checkpoint_edit,
|
||||
.info = info_checkpoint_edit,
|
||||
.info = &info_checkpoint_edit,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "checkpoint-info",
|
||||
.handler = cmdCheckpointInfo,
|
||||
.opts = opts_checkpoint_info,
|
||||
.info = info_checkpoint_info,
|
||||
.info = &info_checkpoint_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "checkpoint-list",
|
||||
.handler = cmdCheckpointList,
|
||||
.opts = opts_checkpoint_list,
|
||||
.info = info_checkpoint_list,
|
||||
.info = &info_checkpoint_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "checkpoint-parent",
|
||||
.handler = cmdCheckpointParent,
|
||||
.opts = opts_checkpoint_parent,
|
||||
.info = info_checkpoint_parent,
|
||||
.info = &info_checkpoint_parent,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -859,14 +859,9 @@ virshDomainEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static const vshCmdInfo info_event[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Domain Events")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("List event types, or wait for domain events to occur")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_event = {
|
||||
.help = N_("Domain Events"),
|
||||
.desc = N_("List event types, or wait for domain events to occur"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_event[] = {
|
||||
@ -1017,7 +1012,7 @@ const vshCmdDef domEventCmds[] = {
|
||||
{.name = "event",
|
||||
.handler = cmdEvent,
|
||||
.opts = opts_event,
|
||||
.info = info_event,
|
||||
.info = &info_event,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -268,14 +268,9 @@ virshDomainStateReasonToString(int state, int reason)
|
||||
/*
|
||||
* "dommemstat" command
|
||||
*/
|
||||
static const vshCmdInfo info_dommemstat[] = {
|
||||
{.name = "help",
|
||||
.data = N_("get memory statistics for a domain")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get memory statistics for a running domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_dommemstat = {
|
||||
.help = N_("get memory statistics for a domain"),
|
||||
.desc = N_("Get memory statistics for a running domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_dommemstat[] = {
|
||||
@ -381,14 +376,9 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domblkinfo" command
|
||||
*/
|
||||
static const vshCmdInfo info_domblkinfo[] = {
|
||||
{.name = "help",
|
||||
.data = N_("domain block device size information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get block device size info for a domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domblkinfo = {
|
||||
.help = N_("domain block device size information"),
|
||||
.desc = N_("Get block device size info for a domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domblkinfo[] = {
|
||||
@ -545,14 +535,9 @@ cmdDomblkinfo(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domblklist" command
|
||||
*/
|
||||
static const vshCmdInfo info_domblklist[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list all domain blocks")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get the summary of block devices for a domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domblklist = {
|
||||
.help = N_("list all domain blocks"),
|
||||
.desc = N_("Get the summary of block devices for a domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domblklist[] = {
|
||||
@ -666,10 +651,9 @@ cmdDomblklist(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domiflist" command
|
||||
*/
|
||||
static const vshCmdInfo info_domiflist[] = {
|
||||
{"help", N_("list all domain virtual interfaces")},
|
||||
{"desc", N_("Get the summary of virtual interfaces for a domain.")},
|
||||
{NULL, NULL}
|
||||
static const vshCmdInfo info_domiflist = {
|
||||
.help = N_("list all domain virtual interfaces"),
|
||||
.desc = N_("Get the summary of virtual interfaces for a domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domiflist[] = {
|
||||
@ -745,14 +729,9 @@ cmdDomiflist(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domif-getlink" command
|
||||
*/
|
||||
static const vshCmdInfo info_domif_getlink[] = {
|
||||
{.name = "help",
|
||||
.data = N_("get link state of a virtual interface")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get link state of a domain's virtual interface.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domif_getlink = {
|
||||
.help = N_("get link state of a virtual interface"),
|
||||
.desc = N_("Get link state of a domain's virtual interface."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domif_getlink[] = {
|
||||
@ -832,14 +811,9 @@ cmdDomIfGetLink(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domcontrol" command
|
||||
*/
|
||||
static const vshCmdInfo info_domcontrol[] = {
|
||||
{.name = "help",
|
||||
.data = N_("domain control interface state")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns state of a control interface to the domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domcontrol = {
|
||||
.help = N_("domain control interface state"),
|
||||
.desc = N_("Returns state of a control interface to the domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domcontrol[] = {
|
||||
@ -879,15 +853,10 @@ cmdDomControl(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domblkstat" command
|
||||
*/
|
||||
static const vshCmdInfo info_domblkstat[] = {
|
||||
{.name = "help",
|
||||
.data = N_("get device block stats for a domain")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get device block stats for a running domain. See man page or "
|
||||
"use --human for explanation of fields")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domblkstat = {
|
||||
.help = N_("get device block stats for a domain"),
|
||||
.desc = N_("Get device block stats for a running domain. See man page or "
|
||||
"use --human for explanation of fields"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domblkstat[] = {
|
||||
@ -1060,14 +1029,9 @@ cmdDomblkstat(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domifstat" command
|
||||
*/
|
||||
static const vshCmdInfo info_domifstat[] = {
|
||||
{.name = "help",
|
||||
.data = N_("get network interface stats for a domain")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get network interface stats for a running domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domifstat = {
|
||||
.help = N_("get network interface stats for a domain"),
|
||||
.desc = N_("Get network interface stats for a running domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domifstat[] = {
|
||||
@ -1129,14 +1093,9 @@ cmdDomIfstat(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domblkerror" command
|
||||
*/
|
||||
static const vshCmdInfo info_domblkerror[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Show errors on block devices")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Show block device errors")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domblkerror = {
|
||||
.help = N_("Show errors on block devices"),
|
||||
.desc = N_("Show block device errors"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domblkerror[] = {
|
||||
@ -1190,14 +1149,9 @@ cmdDomBlkError(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "dominfo" command
|
||||
*/
|
||||
static const vshCmdInfo info_dominfo[] = {
|
||||
{.name = "help",
|
||||
.data = N_("domain information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about the domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_dominfo = {
|
||||
.help = N_("domain information"),
|
||||
.desc = N_("Returns basic information about the domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_dominfo[] = {
|
||||
@ -1328,14 +1282,9 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domstate" command
|
||||
*/
|
||||
static const vshCmdInfo info_domstate[] = {
|
||||
{.name = "help",
|
||||
.data = N_("domain state")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns state about a domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domstate = {
|
||||
.help = N_("domain state"),
|
||||
.desc = N_("Returns state about a domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domstate[] = {
|
||||
@ -1375,14 +1324,9 @@ cmdDomstate(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domtime" command
|
||||
*/
|
||||
static const vshCmdInfo info_domtime[] = {
|
||||
{.name = "help",
|
||||
.data = N_("domain time")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Gets or sets the domain's system time")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domtime = {
|
||||
.help = N_("domain time"),
|
||||
.desc = N_("Gets or sets the domain's system time"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domtime[] = {
|
||||
@ -1471,14 +1415,9 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "list" command
|
||||
*/
|
||||
static const vshCmdInfo info_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list domains")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of domains.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_list = {
|
||||
.help = N_("list domains"),
|
||||
.desc = N_("Returns list of domains."),
|
||||
};
|
||||
|
||||
/* compare domains, pack NULLed ones at the end */
|
||||
@ -2011,14 +1950,9 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domstats" command
|
||||
*/
|
||||
static const vshCmdInfo info_domstats[] = {
|
||||
{.name = "help",
|
||||
.data = N_("get statistics about one or multiple domains")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Gets statistics about one or more (or all) domains")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domstats = {
|
||||
.help = N_("get statistics about one or multiple domains"),
|
||||
.desc = N_("Gets statistics about one or more (or all) domains"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domstats[] = {
|
||||
@ -2269,10 +2203,9 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
/* "domifaddr" command
|
||||
*/
|
||||
static const vshCmdInfo info_domifaddr[] = {
|
||||
{"help", N_("Get network interfaces' addresses for a running domain")},
|
||||
{"desc", N_("Get network interfaces' addresses for a running domain")},
|
||||
{NULL, NULL}
|
||||
static const vshCmdInfo info_domifaddr = {
|
||||
.help = N_("Get network interfaces' addresses for a running domain"),
|
||||
.desc = N_("Get network interfaces' addresses for a running domain"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domifaddr[] = {
|
||||
@ -2401,91 +2334,91 @@ const vshCmdDef domMonitoringCmds[] = {
|
||||
{.name = "domblkerror",
|
||||
.handler = cmdDomBlkError,
|
||||
.opts = opts_domblkerror,
|
||||
.info = info_domblkerror,
|
||||
.info = &info_domblkerror,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domblkinfo",
|
||||
.handler = cmdDomblkinfo,
|
||||
.opts = opts_domblkinfo,
|
||||
.info = info_domblkinfo,
|
||||
.info = &info_domblkinfo,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domblklist",
|
||||
.handler = cmdDomblklist,
|
||||
.opts = opts_domblklist,
|
||||
.info = info_domblklist,
|
||||
.info = &info_domblklist,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domblkstat",
|
||||
.handler = cmdDomblkstat,
|
||||
.opts = opts_domblkstat,
|
||||
.info = info_domblkstat,
|
||||
.info = &info_domblkstat,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domcontrol",
|
||||
.handler = cmdDomControl,
|
||||
.opts = opts_domcontrol,
|
||||
.info = info_domcontrol,
|
||||
.info = &info_domcontrol,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domif-getlink",
|
||||
.handler = cmdDomIfGetLink,
|
||||
.opts = opts_domif_getlink,
|
||||
.info = info_domif_getlink,
|
||||
.info = &info_domif_getlink,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domifaddr",
|
||||
.handler = cmdDomIfAddr,
|
||||
.opts = opts_domifaddr,
|
||||
.info = info_domifaddr,
|
||||
.info = &info_domifaddr,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domiflist",
|
||||
.handler = cmdDomiflist,
|
||||
.opts = opts_domiflist,
|
||||
.info = info_domiflist,
|
||||
.info = &info_domiflist,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domifstat",
|
||||
.handler = cmdDomIfstat,
|
||||
.opts = opts_domifstat,
|
||||
.info = info_domifstat,
|
||||
.info = &info_domifstat,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "dominfo",
|
||||
.handler = cmdDominfo,
|
||||
.opts = opts_dominfo,
|
||||
.info = info_dominfo,
|
||||
.info = &info_dominfo,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "dommemstat",
|
||||
.handler = cmdDomMemStat,
|
||||
.opts = opts_dommemstat,
|
||||
.info = info_dommemstat,
|
||||
.info = &info_dommemstat,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domstate",
|
||||
.handler = cmdDomstate,
|
||||
.opts = opts_domstate,
|
||||
.info = info_domstate,
|
||||
.info = &info_domstate,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domstats",
|
||||
.handler = cmdDomstats,
|
||||
.opts = opts_domstats,
|
||||
.info = info_domstats,
|
||||
.info = &info_domstats,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domtime",
|
||||
.handler = cmdDomTime,
|
||||
.opts = opts_domtime,
|
||||
.info = info_domtime,
|
||||
.info = &info_domtime,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "list",
|
||||
.handler = cmdList,
|
||||
.opts = opts_list,
|
||||
.info = info_list,
|
||||
.info = &info_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
1477
tools/virsh-domain.c
1477
tools/virsh-domain.c
File diff suppressed because it is too large
Load Diff
@ -37,14 +37,9 @@
|
||||
/*
|
||||
* "capabilities" command
|
||||
*/
|
||||
static const vshCmdInfo info_capabilities[] = {
|
||||
{.name = "help",
|
||||
.data = N_("capabilities")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns capabilities of hypervisor/driver.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_capabilities = {
|
||||
.help = N_("capabilities"),
|
||||
.desc = N_("Returns capabilities of hypervisor/driver."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_capabilities[] = {
|
||||
@ -83,14 +78,9 @@ cmdCapabilities(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "domcapabilities" command
|
||||
*/
|
||||
static const vshCmdInfo info_domcapabilities[] = {
|
||||
{.name = "help",
|
||||
.data = N_("domain capabilities")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns capabilities of emulator with respect to host and libvirt.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_domcapabilities = {
|
||||
.help = N_("domain capabilities"),
|
||||
.desc = N_("Returns capabilities of emulator with respect to host and libvirt."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_domcapabilities[] = {
|
||||
@ -158,14 +148,9 @@ cmdDomCapabilities(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "freecell" command
|
||||
*/
|
||||
static const vshCmdInfo info_freecell[] = {
|
||||
{.name = "help",
|
||||
.data = N_("NUMA free memory")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("display available free memory for the NUMA cell.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_freecell = {
|
||||
.help = N_("NUMA free memory"),
|
||||
.desc = N_("display available free memory for the NUMA cell."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_freecell[] = {
|
||||
@ -271,14 +256,9 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "freepages" command
|
||||
*/
|
||||
static const vshCmdInfo info_freepages[] = {
|
||||
{.name = "help",
|
||||
.data = N_("NUMA free pages")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("display available free pages for the NUMA cell.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_freepages = {
|
||||
.help = N_("NUMA free pages"),
|
||||
.desc = N_("display available free pages for the NUMA cell."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_freepages[] = {
|
||||
@ -481,14 +461,9 @@ cmdFreepages(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "allocpages" command
|
||||
*/
|
||||
static const vshCmdInfo info_allocpages[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Manipulate pages pool size")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Allocate or free some pages in the pool for NUMA cell.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_allocpages = {
|
||||
.help = N_("Manipulate pages pool size"),
|
||||
.desc = N_("Allocate or free some pages in the pool for NUMA cell."),
|
||||
};
|
||||
static const vshCmdOptDef opts_allocpages[] = {
|
||||
{.name = "pagesize",
|
||||
@ -597,14 +572,9 @@ cmdAllocpages(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "maxvcpus" command
|
||||
*/
|
||||
static const vshCmdInfo info_maxvcpus[] = {
|
||||
{.name = "help",
|
||||
.data = N_("connection vcpu maximum")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Show maximum number of virtual CPUs for guests on this connection.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_maxvcpus = {
|
||||
.help = N_("connection vcpu maximum"),
|
||||
.desc = N_("Show maximum number of virtual CPUs for guests on this connection."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_maxvcpus[] = {
|
||||
@ -650,14 +620,9 @@ cmdMaxvcpus(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodeinfo" command
|
||||
*/
|
||||
static const vshCmdInfo info_nodeinfo[] = {
|
||||
{.name = "help",
|
||||
.data = N_("node information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about the node.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nodeinfo = {
|
||||
.help = N_("node information"),
|
||||
.desc = N_("Returns basic information about the node."),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -686,15 +651,10 @@ cmdNodeinfo(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "nodecpumap" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_cpumap[] = {
|
||||
{.name = "help",
|
||||
.data = N_("node cpu map")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Displays the node's total number of CPUs, the number of"
|
||||
" online CPUs and the list of online CPUs.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_cpumap = {
|
||||
.help = N_("node cpu map"),
|
||||
.desc = N_("Displays the node's total number of CPUs, the number of"
|
||||
" online CPUs and the list of online CPUs."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_cpumap[] = {
|
||||
@ -742,14 +702,9 @@ cmdNodeCpuMap(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "nodecpustats" command
|
||||
*/
|
||||
static const vshCmdInfo info_nodecpustats[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Prints cpu stats of the node.")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns cpu stats of the node, in nanoseconds.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nodecpustats = {
|
||||
.help = N_("Prints cpu stats of the node."),
|
||||
.desc = N_("Returns cpu stats of the node, in nanoseconds."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_cpustats[] = {
|
||||
@ -885,14 +840,9 @@ cmdNodeCpuStats(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodememstats" command
|
||||
*/
|
||||
static const vshCmdInfo info_nodememstats[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Prints memory stats of the node.")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns memory stats of the node, in kilobytes.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nodememstats = {
|
||||
.help = N_("Prints memory stats of the node."),
|
||||
.desc = N_("Returns memory stats of the node, in kilobytes."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_memstats[] = {
|
||||
@ -943,14 +893,9 @@ cmdNodeMemStats(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodesevinfo" command
|
||||
*/
|
||||
static const vshCmdInfo info_nodesevinfo[] = {
|
||||
{.name = "help",
|
||||
.data = N_("node SEV information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic SEV information about the node.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nodesevinfo = {
|
||||
.help = N_("node SEV information"),
|
||||
.desc = N_("Returns basic SEV information about the node."),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -989,15 +934,10 @@ VIR_ENUM_IMPL(virshNodeSuspendTarget,
|
||||
"disk",
|
||||
"hybrid");
|
||||
|
||||
static const vshCmdInfo info_nodesuspend[] = {
|
||||
{.name = "help",
|
||||
.data = N_("suspend the host node for a given time duration")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Suspend the host node for a given time duration "
|
||||
"and attempt to resume thereafter.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nodesuspend = {
|
||||
.help = N_("suspend the host node for a given time duration"),
|
||||
.desc = N_("Suspend the host node for a given time duration "
|
||||
"and attempt to resume thereafter."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_suspend[] = {
|
||||
@ -1050,14 +990,9 @@ cmdNodeSuspend(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "sysinfo" command
|
||||
*/
|
||||
static const vshCmdInfo info_sysinfo[] = {
|
||||
{.name = "help",
|
||||
.data = N_("print the hypervisor sysinfo")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("output an XML string for the hypervisor sysinfo, if available")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_sysinfo = {
|
||||
.help = N_("print the hypervisor sysinfo"),
|
||||
.desc = N_("output an XML string for the hypervisor sysinfo, if available"),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -1080,14 +1015,9 @@ cmdSysinfo(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "hostname" command
|
||||
*/
|
||||
static const vshCmdInfo info_hostname[] = {
|
||||
{.name = "help",
|
||||
.data = N_("print the hypervisor hostname")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_hostname = {
|
||||
.help = N_("print the hypervisor hostname"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -1110,14 +1040,9 @@ cmdHostname(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "uri" command
|
||||
*/
|
||||
static const vshCmdInfo info_uri[] = {
|
||||
{.name = "help",
|
||||
.data = N_("print the hypervisor canonical URI")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_uri = {
|
||||
.help = N_("print the hypervisor canonical URI"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -1218,14 +1143,9 @@ vshExtractCPUDefXMLs(vshControl *ctl,
|
||||
/*
|
||||
* "cpu-compare" command
|
||||
*/
|
||||
static const vshCmdInfo info_cpu_compare[] = {
|
||||
{.name = "help",
|
||||
.data = N_("compare host CPU with a CPU described by an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("compare CPU with host CPU")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_cpu_compare = {
|
||||
.help = N_("compare host CPU with a CPU described by an XML file"),
|
||||
.desc = N_("compare CPU with host CPU"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_cpu_compare[] = {
|
||||
@ -1293,14 +1213,9 @@ cmdCPUCompare(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "cpu-baseline" command
|
||||
*/
|
||||
static const vshCmdInfo info_cpu_baseline[] = {
|
||||
{.name = "help",
|
||||
.data = N_("compute baseline CPU")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Compute baseline CPU for a set of given CPUs.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_cpu_baseline = {
|
||||
.help = N_("compute baseline CPU"),
|
||||
.desc = N_("Compute baseline CPU for a set of given CPUs."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_cpu_baseline[] = {
|
||||
@ -1347,14 +1262,9 @@ cmdCPUBaseline(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "cpu-models" command
|
||||
*/
|
||||
static const vshCmdInfo info_cpu_models[] = {
|
||||
{.name = "help",
|
||||
.data = N_("CPU models")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get the CPU models for an arch.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_cpu_models = {
|
||||
.help = N_("CPU models"),
|
||||
.desc = N_("Get the CPU models for an arch."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_cpu_models[] = {
|
||||
@ -1401,14 +1311,9 @@ cmdCPUModelNames(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "version" command
|
||||
*/
|
||||
static const vshCmdInfo info_version[] = {
|
||||
{.name = "help",
|
||||
.data = N_("show version")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Display the system version information.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_version = {
|
||||
.help = N_("show version"),
|
||||
.desc = N_("Display the system version information."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_version[] = {
|
||||
@ -1503,10 +1408,9 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
return true;
|
||||
}
|
||||
|
||||
static const vshCmdInfo info_node_memory_tune[] = {
|
||||
{"help", N_("Get or set node memory parameters")},
|
||||
{"desc", N_("Get or set node memory parameters")},
|
||||
{NULL, NULL}
|
||||
static const vshCmdInfo info_node_memory_tune = {
|
||||
.help = N_("Get or set node memory parameters"),
|
||||
.desc = N_("Get or set node memory parameters"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_memory_tune[] = {
|
||||
@ -1617,14 +1521,9 @@ cmdNodeMemoryTune(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "hypervisor-cpu-compare" command
|
||||
*/
|
||||
static const vshCmdInfo info_hypervisor_cpu_compare[] = {
|
||||
{.name = "help",
|
||||
.data = N_("compare a CPU with the CPU created by a hypervisor on the host")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("compare CPU with hypervisor CPU")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_hypervisor_cpu_compare = {
|
||||
.help = N_("compare a CPU with the CPU created by a hypervisor on the host"),
|
||||
.desc = N_("compare CPU with hypervisor CPU"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_hypervisor_cpu_compare[] = {
|
||||
@ -1724,15 +1623,10 @@ cmdHypervisorCPUCompare(vshControl *ctl,
|
||||
/*
|
||||
* "hypervisor-cpu-baseline" command
|
||||
*/
|
||||
static const vshCmdInfo info_hypervisor_cpu_baseline[] = {
|
||||
{.name = "help",
|
||||
.data = N_("compute baseline CPU usable by a specific hypervisor")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Compute baseline CPU for a set of given CPUs. The result "
|
||||
"will be tailored to the specified hypervisor.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_hypervisor_cpu_baseline = {
|
||||
.help = N_("compute baseline CPU usable by a specific hypervisor"),
|
||||
.desc = N_("Compute baseline CPU for a set of given CPUs. The result "
|
||||
"will be tailored to the specified hypervisor."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_hypervisor_cpu_baseline[] = {
|
||||
@ -1831,133 +1725,133 @@ const vshCmdDef hostAndHypervisorCmds[] = {
|
||||
{.name = "allocpages",
|
||||
.handler = cmdAllocpages,
|
||||
.opts = opts_allocpages,
|
||||
.info = info_allocpages,
|
||||
.info = &info_allocpages,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "capabilities",
|
||||
.handler = cmdCapabilities,
|
||||
.opts = opts_capabilities,
|
||||
.info = info_capabilities,
|
||||
.info = &info_capabilities,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "cpu-baseline",
|
||||
.handler = cmdCPUBaseline,
|
||||
.opts = opts_cpu_baseline,
|
||||
.info = info_cpu_baseline,
|
||||
.info = &info_cpu_baseline,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "cpu-compare",
|
||||
.handler = cmdCPUCompare,
|
||||
.opts = opts_cpu_compare,
|
||||
.info = info_cpu_compare,
|
||||
.info = &info_cpu_compare,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "cpu-models",
|
||||
.handler = cmdCPUModelNames,
|
||||
.opts = opts_cpu_models,
|
||||
.info = info_cpu_models,
|
||||
.info = &info_cpu_models,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "domcapabilities",
|
||||
.handler = cmdDomCapabilities,
|
||||
.opts = opts_domcapabilities,
|
||||
.info = info_domcapabilities,
|
||||
.info = &info_domcapabilities,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "freecell",
|
||||
.handler = cmdFreecell,
|
||||
.opts = opts_freecell,
|
||||
.info = info_freecell,
|
||||
.info = &info_freecell,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "freepages",
|
||||
.handler = cmdFreepages,
|
||||
.opts = opts_freepages,
|
||||
.info = info_freepages,
|
||||
.info = &info_freepages,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "hostname",
|
||||
.handler = cmdHostname,
|
||||
.opts = NULL,
|
||||
.info = info_hostname,
|
||||
.info = &info_hostname,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "hypervisor-cpu-baseline",
|
||||
.handler = cmdHypervisorCPUBaseline,
|
||||
.opts = opts_hypervisor_cpu_baseline,
|
||||
.info = info_hypervisor_cpu_baseline,
|
||||
.info = &info_hypervisor_cpu_baseline,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "hypervisor-cpu-compare",
|
||||
.handler = cmdHypervisorCPUCompare,
|
||||
.opts = opts_hypervisor_cpu_compare,
|
||||
.info = info_hypervisor_cpu_compare,
|
||||
.info = &info_hypervisor_cpu_compare,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "maxvcpus",
|
||||
.handler = cmdMaxvcpus,
|
||||
.opts = opts_maxvcpus,
|
||||
.info = info_maxvcpus,
|
||||
.info = &info_maxvcpus,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "node-memory-tune",
|
||||
.handler = cmdNodeMemoryTune,
|
||||
.opts = opts_node_memory_tune,
|
||||
.info = info_node_memory_tune,
|
||||
.info = &info_node_memory_tune,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodecpumap",
|
||||
.handler = cmdNodeCpuMap,
|
||||
.opts = opts_node_cpumap,
|
||||
.info = info_node_cpumap,
|
||||
.info = &info_node_cpumap,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodecpustats",
|
||||
.handler = cmdNodeCpuStats,
|
||||
.opts = opts_node_cpustats,
|
||||
.info = info_nodecpustats,
|
||||
.info = &info_nodecpustats,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodeinfo",
|
||||
.handler = cmdNodeinfo,
|
||||
.opts = NULL,
|
||||
.info = info_nodeinfo,
|
||||
.info = &info_nodeinfo,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodememstats",
|
||||
.handler = cmdNodeMemStats,
|
||||
.opts = opts_node_memstats,
|
||||
.info = info_nodememstats,
|
||||
.info = &info_nodememstats,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodesevinfo",
|
||||
.handler = cmdNodeSEVInfo,
|
||||
.opts = NULL,
|
||||
.info = info_nodesevinfo,
|
||||
.info = &info_nodesevinfo,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodesuspend",
|
||||
.handler = cmdNodeSuspend,
|
||||
.opts = opts_node_suspend,
|
||||
.info = info_nodesuspend,
|
||||
.info = &info_nodesuspend,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "sysinfo",
|
||||
.handler = cmdSysinfo,
|
||||
.opts = NULL,
|
||||
.info = info_sysinfo,
|
||||
.info = &info_sysinfo,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "uri",
|
||||
.handler = cmdURI,
|
||||
.opts = NULL,
|
||||
.info = info_uri,
|
||||
.info = &info_uri,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "version",
|
||||
.handler = cmdVersion,
|
||||
.opts = opts_version,
|
||||
.info = info_version,
|
||||
.info = &info_version,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -91,14 +91,9 @@ virshCommandOptInterfaceBy(vshControl *ctl, const vshCmd *cmd,
|
||||
/*
|
||||
* "iface-edit" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_edit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("edit XML configuration for a physical host interface")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Edit the XML configuration for a physical host interface.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_edit = {
|
||||
.help = N_("edit XML configuration for a physical host interface"),
|
||||
.desc = N_("Edit the XML configuration for a physical host interface."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_edit[] = {
|
||||
@ -314,14 +309,9 @@ virshInterfaceListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "iface-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list physical host interfaces")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of physical host interfaces.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_list = {
|
||||
.help = N_("list physical host interfaces"),
|
||||
.desc = N_("Returns list of physical host interfaces."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_list[] = {
|
||||
@ -385,14 +375,9 @@ cmdInterfaceList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "iface-name" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_name[] = {
|
||||
{.name = "help",
|
||||
.data = N_("convert an interface MAC address to interface name")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_name = {
|
||||
.help = N_("convert an interface MAC address to interface name"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_name[] = {
|
||||
@ -421,14 +406,9 @@ cmdInterfaceName(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-mac" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_mac[] = {
|
||||
{.name = "help",
|
||||
.data = N_("convert an interface name to interface MAC address")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_mac = {
|
||||
.help = N_("convert an interface name to interface MAC address"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_mac[] = {
|
||||
@ -457,14 +437,9 @@ cmdInterfaceMAC(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("interface information in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the physical host interface information as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_dumpxml = {
|
||||
.help = N_("interface information in XML"),
|
||||
.desc = N_("Output the physical host interface information as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_dumpxml[] = {
|
||||
@ -514,15 +489,10 @@ cmdInterfaceDumpXML(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-define" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_define[] = {
|
||||
{.name = "help",
|
||||
.data = N_("define an inactive persistent physical host interface or "
|
||||
"modify an existing persistent one from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Define or modify a persistent physical host interface.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_define = {
|
||||
.help = N_("define an inactive persistent physical host interface or "
|
||||
"modify an existing persistent one from an XML file"),
|
||||
.desc = N_("Define or modify a persistent physical host interface."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_define[] = {
|
||||
@ -565,14 +535,9 @@ cmdInterfaceDefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-undefine" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_undefine[] = {
|
||||
{.name = "help",
|
||||
.data = N_("undefine a physical host interface (remove it from configuration)")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("undefine an interface.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_undefine = {
|
||||
.help = N_("undefine a physical host interface (remove it from configuration)"),
|
||||
.desc = N_("undefine an interface."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_undefine[] = {
|
||||
@ -601,14 +566,9 @@ cmdInterfaceUndefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-start" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_start[] = {
|
||||
{.name = "help",
|
||||
.data = N_("start a physical host interface (enable it / \"if-up\")")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("start a physical host interface.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_start = {
|
||||
.help = N_("start a physical host interface (enable it / \"if-up\")"),
|
||||
.desc = N_("start a physical host interface."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_start[] = {
|
||||
@ -637,14 +597,9 @@ cmdInterfaceStart(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-destroy" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_destroy[] = {
|
||||
{.name = "help",
|
||||
.data = N_("destroy a physical host interface (disable it / \"if-down\")")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("forcefully stop a physical host interface.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_destroy = {
|
||||
.help = N_("destroy a physical host interface (disable it / \"if-down\")"),
|
||||
.desc = N_("forcefully stop a physical host interface."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_destroy[] = {
|
||||
@ -673,16 +628,11 @@ cmdInterfaceDestroy(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-begin" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_begin[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a snapshot of current interfaces settings, "
|
||||
static const vshCmdInfo info_interface_begin = {
|
||||
.help = N_("create a snapshot of current interfaces settings, "
|
||||
"which can be later committed (iface-commit) or "
|
||||
"restored (iface-rollback)")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a restore point for interfaces settings")
|
||||
},
|
||||
{.name = NULL}
|
||||
"restored (iface-rollback)"),
|
||||
.desc = N_("Create a restore point for interfaces settings"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_begin[] = {
|
||||
@ -706,14 +656,9 @@ cmdInterfaceBegin(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "iface-commit" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_commit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("commit changes made since iface-begin and free restore point")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("commit changes and free restore point")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_commit = {
|
||||
.help = N_("commit changes made since iface-begin and free restore point"),
|
||||
.desc = N_("commit changes and free restore point"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_commit[] = {
|
||||
@ -737,14 +682,9 @@ cmdInterfaceCommit(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "iface-rollback" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_rollback[] = {
|
||||
{.name = "help",
|
||||
.data = N_("rollback to previous saved configuration created via iface-begin")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("rollback to previous restore point")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_rollback = {
|
||||
.help = N_("rollback to previous saved configuration created via iface-begin"),
|
||||
.desc = N_("rollback to previous restore point"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_rollback[] = {
|
||||
@ -768,14 +708,9 @@ cmdInterfaceRollback(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "iface-bridge" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_bridge[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a bridge device and attach an existing network device to it")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("bridge an existing network device")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_bridge = {
|
||||
.help = N_("create a bridge device and attach an existing network device to it"),
|
||||
.desc = N_("bridge an existing network device"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_bridge[] = {
|
||||
@ -1000,14 +935,9 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "iface-unbridge" command
|
||||
*/
|
||||
static const vshCmdInfo info_interface_unbridge[] = {
|
||||
{.name = "help",
|
||||
.data = N_("undefine a bridge device after detaching its device(s)")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("unbridge a network device")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_interface_unbridge = {
|
||||
.help = N_("undefine a bridge device after detaching its device(s)"),
|
||||
.desc = N_("unbridge a network device"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_interface_unbridge[] = {
|
||||
@ -1196,85 +1126,85 @@ const vshCmdDef ifaceCmds[] = {
|
||||
{.name = "iface-begin",
|
||||
.handler = cmdInterfaceBegin,
|
||||
.opts = opts_interface_begin,
|
||||
.info = info_interface_begin,
|
||||
.info = &info_interface_begin,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-bridge",
|
||||
.handler = cmdInterfaceBridge,
|
||||
.opts = opts_interface_bridge,
|
||||
.info = info_interface_bridge,
|
||||
.info = &info_interface_bridge,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-commit",
|
||||
.handler = cmdInterfaceCommit,
|
||||
.opts = opts_interface_commit,
|
||||
.info = info_interface_commit,
|
||||
.info = &info_interface_commit,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-define",
|
||||
.handler = cmdInterfaceDefine,
|
||||
.opts = opts_interface_define,
|
||||
.info = info_interface_define,
|
||||
.info = &info_interface_define,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-destroy",
|
||||
.handler = cmdInterfaceDestroy,
|
||||
.opts = opts_interface_destroy,
|
||||
.info = info_interface_destroy,
|
||||
.info = &info_interface_destroy,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-dumpxml",
|
||||
.handler = cmdInterfaceDumpXML,
|
||||
.opts = opts_interface_dumpxml,
|
||||
.info = info_interface_dumpxml,
|
||||
.info = &info_interface_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-edit",
|
||||
.handler = cmdInterfaceEdit,
|
||||
.opts = opts_interface_edit,
|
||||
.info = info_interface_edit,
|
||||
.info = &info_interface_edit,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-list",
|
||||
.handler = cmdInterfaceList,
|
||||
.opts = opts_interface_list,
|
||||
.info = info_interface_list,
|
||||
.info = &info_interface_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-mac",
|
||||
.handler = cmdInterfaceMAC,
|
||||
.opts = opts_interface_mac,
|
||||
.info = info_interface_mac,
|
||||
.info = &info_interface_mac,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-name",
|
||||
.handler = cmdInterfaceName,
|
||||
.opts = opts_interface_name,
|
||||
.info = info_interface_name,
|
||||
.info = &info_interface_name,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-rollback",
|
||||
.handler = cmdInterfaceRollback,
|
||||
.opts = opts_interface_rollback,
|
||||
.info = info_interface_rollback,
|
||||
.info = &info_interface_rollback,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-start",
|
||||
.handler = cmdInterfaceStart,
|
||||
.opts = opts_interface_start,
|
||||
.info = info_interface_start,
|
||||
.info = &info_interface_start,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-unbridge",
|
||||
.handler = cmdInterfaceUnbridge,
|
||||
.opts = opts_interface_unbridge,
|
||||
.info = info_interface_unbridge,
|
||||
.info = &info_interface_unbridge,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "iface-undefine",
|
||||
.handler = cmdInterfaceUndefine,
|
||||
.opts = opts_interface_undefine,
|
||||
.info = info_interface_undefine,
|
||||
.info = &info_interface_undefine,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -134,14 +134,9 @@ virshCommandOptNetworkPort(vshControl *ctl, const vshCmd *cmd,
|
||||
/*
|
||||
* "net-autostart" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_autostart[] = {
|
||||
{.name = "help",
|
||||
.data = N_("autostart a network")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Configure a network to be automatically started at boot.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_autostart = {
|
||||
.help = N_("autostart a network"),
|
||||
.desc = N_("Configure a network to be automatically started at boot."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_autostart[] = {
|
||||
@ -184,14 +179,9 @@ cmdNetworkAutostart(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a network from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_create = {
|
||||
.help = N_("create a network from an XML file"),
|
||||
.desc = N_("Create a network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_create[] = {
|
||||
@ -239,15 +229,10 @@ cmdNetworkCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-define" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_define[] = {
|
||||
{.name = "help",
|
||||
.data = N_("define an inactive persistent virtual network or modify "
|
||||
"an existing persistent one from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Define or modify a persistent virtual network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_define = {
|
||||
.help = N_("define an inactive persistent virtual network or modify "
|
||||
"an existing persistent one from an XML file"),
|
||||
.desc = N_("Define or modify a persistent virtual network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_define[] = {
|
||||
@ -295,14 +280,9 @@ cmdNetworkDefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-destroy" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_destroy[] = {
|
||||
{.name = "help",
|
||||
.data = N_("destroy (stop) a network")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Forcefully stop a given network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_destroy = {
|
||||
.help = N_("destroy (stop) a network"),
|
||||
.desc = N_("Forcefully stop a given network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_destroy[] = {
|
||||
@ -333,14 +313,9 @@ cmdNetworkDestroy(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-desc" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_desc[] = {
|
||||
{.name = "help",
|
||||
.data = N_("show or set network's description or title")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Allows setting or modifying the description or title of a network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_desc = {
|
||||
.help = N_("show or set network's description or title"),
|
||||
.desc = N_("Allows setting or modifying the description or title of a network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_desc[] = {
|
||||
@ -518,14 +493,9 @@ cmdNetworkDesc(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-metadata" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_metadata[] = {
|
||||
{.name = "help",
|
||||
.data = N_("show or set network's custom XML metadata")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Shows or modifies the XML metadata of a network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_metadata = {
|
||||
.help = N_("show or set network's custom XML metadata"),
|
||||
.desc = N_("Shows or modifies the XML metadata of a network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_metadata[] = {
|
||||
@ -661,14 +631,9 @@ cmdNetworkMetadata(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("network information in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the network information as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_dumpxml = {
|
||||
.help = N_("network information in XML"),
|
||||
.desc = N_("Output the network information as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_dumpxml[] = {
|
||||
@ -717,14 +682,9 @@ cmdNetworkDumpXML(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-info" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("network information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about the network")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_info = {
|
||||
.help = N_("network information"),
|
||||
.desc = N_("Returns basic information about the network"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_info[] = {
|
||||
@ -992,14 +952,9 @@ virshNetworkListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "net-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list networks")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of networks.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_list = {
|
||||
.help = N_("list networks"),
|
||||
.desc = N_("Returns list of networks."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_list[] = {
|
||||
@ -1164,14 +1119,9 @@ cmdNetworkList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "net-name" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_name[] = {
|
||||
{.name = "help",
|
||||
.data = N_("convert a network UUID to network name")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_name = {
|
||||
.help = N_("convert a network UUID to network name"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_name[] = {
|
||||
@ -1200,14 +1150,9 @@ cmdNetworkName(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-start" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_start[] = {
|
||||
{.name = "help",
|
||||
.data = N_("start a (previously defined) inactive network")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Start a network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_start = {
|
||||
.help = N_("start a (previously defined) inactive network"),
|
||||
.desc = N_("Start a network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_start[] = {
|
||||
@ -1237,14 +1182,9 @@ cmdNetworkStart(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-undefine" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_undefine[] = {
|
||||
{.name = "help",
|
||||
.data = N_("undefine a persistent network")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Undefine the configuration for a persistent network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_undefine = {
|
||||
.help = N_("undefine a persistent network"),
|
||||
.desc = N_("Undefine the configuration for a persistent network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_undefine[] = {
|
||||
@ -1275,14 +1215,9 @@ cmdNetworkUndefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-update" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_update[] = {
|
||||
{.name = "help",
|
||||
.data = N_("update parts of an existing network's configuration")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_update = {
|
||||
.help = N_("update parts of an existing network's configuration"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_update[] = {
|
||||
@ -1435,14 +1370,9 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-uuid" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_uuid[] = {
|
||||
{.name = "help",
|
||||
.data = N_("convert a network name to network UUID")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_uuid = {
|
||||
.help = N_("convert a network name to network UUID"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_uuid[] = {
|
||||
@ -1471,14 +1401,9 @@ cmdNetworkUuid(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-edit" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_edit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("edit XML configuration for a network")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Edit the XML configuration for a network.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_edit = {
|
||||
.help = N_("edit XML configuration for a network"),
|
||||
.desc = N_("Edit the XML configuration for a network."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_edit[] = {
|
||||
@ -1649,14 +1574,9 @@ virshNetworkEventCallback virshNetworkEventCallbacks[] = {
|
||||
};
|
||||
G_STATIC_ASSERT(VIR_NETWORK_EVENT_ID_LAST == G_N_ELEMENTS(virshNetworkEventCallbacks));
|
||||
|
||||
static const vshCmdInfo info_network_event[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Network Events")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("List event types, or wait for network events to occur")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_event = {
|
||||
.help = N_("Network Events"),
|
||||
.desc = N_("List event types, or wait for network events to occur"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_event[] = {
|
||||
@ -1764,14 +1684,9 @@ cmdNetworkEvent(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-dhcp-leases" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_dhcp_leases[] = {
|
||||
{.name = "help",
|
||||
.data = N_("print lease info for a given network")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Print lease info for a given network")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_dhcp_leases = {
|
||||
.help = N_("print lease info for a given network"),
|
||||
.desc = N_("Print lease info for a given network"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_dhcp_leases[] = {
|
||||
@ -1879,14 +1794,9 @@ cmdNetworkDHCPLeases(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-port-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_port_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a network port from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a network port.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_port_create = {
|
||||
.help = N_("create a network port from an XML file"),
|
||||
.desc = N_("Create a network port."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_port_create[] = {
|
||||
@ -1946,14 +1856,9 @@ cmdNetworkPortCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-port-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_port_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("network port information in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the network port information as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_port_dumpxml = {
|
||||
.help = N_("network port information in XML"),
|
||||
.desc = N_("Output the network port information as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_port_dumpxml[] = {
|
||||
@ -2007,14 +1912,9 @@ cmdNetworkPortDumpXML(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "net-port-delete" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_port_delete[] = {
|
||||
{.name = "help",
|
||||
.data = N_("delete the specified network port")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Delete the specified network port.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_port_delete = {
|
||||
.help = N_("delete the specified network port"),
|
||||
.desc = N_("Delete the specified network port."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_port_delete[] = {
|
||||
@ -2137,14 +2037,9 @@ virshNetworkPortListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "net-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_network_port_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list network ports")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of network ports.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_network_port_list = {
|
||||
.help = N_("list network ports"),
|
||||
.desc = N_("Returns list of network ports."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_port_list[] = {
|
||||
@ -2219,127 +2114,127 @@ const vshCmdDef networkCmds[] = {
|
||||
{.name = "net-autostart",
|
||||
.handler = cmdNetworkAutostart,
|
||||
.opts = opts_network_autostart,
|
||||
.info = info_network_autostart,
|
||||
.info = &info_network_autostart,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-create",
|
||||
.handler = cmdNetworkCreate,
|
||||
.opts = opts_network_create,
|
||||
.info = info_network_create,
|
||||
.info = &info_network_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-define",
|
||||
.handler = cmdNetworkDefine,
|
||||
.opts = opts_network_define,
|
||||
.info = info_network_define,
|
||||
.info = &info_network_define,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-desc",
|
||||
.handler = cmdNetworkDesc,
|
||||
.opts = opts_network_desc,
|
||||
.info = info_network_desc,
|
||||
.info = &info_network_desc,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-destroy",
|
||||
.handler = cmdNetworkDestroy,
|
||||
.opts = opts_network_destroy,
|
||||
.info = info_network_destroy,
|
||||
.info = &info_network_destroy,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-dhcp-leases",
|
||||
.handler = cmdNetworkDHCPLeases,
|
||||
.opts = opts_network_dhcp_leases,
|
||||
.info = info_network_dhcp_leases,
|
||||
.info = &info_network_dhcp_leases,
|
||||
.flags = 0,
|
||||
},
|
||||
{.name = "net-dumpxml",
|
||||
.handler = cmdNetworkDumpXML,
|
||||
.opts = opts_network_dumpxml,
|
||||
.info = info_network_dumpxml,
|
||||
.info = &info_network_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-edit",
|
||||
.handler = cmdNetworkEdit,
|
||||
.opts = opts_network_edit,
|
||||
.info = info_network_edit,
|
||||
.info = &info_network_edit,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-event",
|
||||
.handler = cmdNetworkEvent,
|
||||
.opts = opts_network_event,
|
||||
.info = info_network_event,
|
||||
.info = &info_network_event,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-info",
|
||||
.handler = cmdNetworkInfo,
|
||||
.opts = opts_network_info,
|
||||
.info = info_network_info,
|
||||
.info = &info_network_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-list",
|
||||
.handler = cmdNetworkList,
|
||||
.opts = opts_network_list,
|
||||
.info = info_network_list,
|
||||
.info = &info_network_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-metadata",
|
||||
.handler = cmdNetworkMetadata,
|
||||
.opts = opts_network_metadata,
|
||||
.info = info_network_metadata,
|
||||
.info = &info_network_metadata,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-name",
|
||||
.handler = cmdNetworkName,
|
||||
.opts = opts_network_name,
|
||||
.info = info_network_name,
|
||||
.info = &info_network_name,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-start",
|
||||
.handler = cmdNetworkStart,
|
||||
.opts = opts_network_start,
|
||||
.info = info_network_start,
|
||||
.info = &info_network_start,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-undefine",
|
||||
.handler = cmdNetworkUndefine,
|
||||
.opts = opts_network_undefine,
|
||||
.info = info_network_undefine,
|
||||
.info = &info_network_undefine,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-update",
|
||||
.handler = cmdNetworkUpdate,
|
||||
.opts = opts_network_update,
|
||||
.info = info_network_update,
|
||||
.info = &info_network_update,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-uuid",
|
||||
.handler = cmdNetworkUuid,
|
||||
.opts = opts_network_uuid,
|
||||
.info = info_network_uuid,
|
||||
.info = &info_network_uuid,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-port-list",
|
||||
.handler = cmdNetworkPortList,
|
||||
.opts = opts_network_port_list,
|
||||
.info = info_network_port_list,
|
||||
.info = &info_network_port_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-port-create",
|
||||
.handler = cmdNetworkPortCreate,
|
||||
.opts = opts_network_port_create,
|
||||
.info = info_network_port_create,
|
||||
.info = &info_network_port_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-port-dumpxml",
|
||||
.handler = cmdNetworkPortDumpXML,
|
||||
.opts = opts_network_port_dumpxml,
|
||||
.info = info_network_port_dumpxml,
|
||||
.info = &info_network_port_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "net-port-delete",
|
||||
.handler = cmdNetworkPortDelete,
|
||||
.opts = opts_network_port_delete,
|
||||
.info = info_network_port_delete,
|
||||
.info = &info_network_port_delete,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -34,17 +34,12 @@
|
||||
/*
|
||||
* "nodedev-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a device defined "
|
||||
"by an XML file on the node")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a device on the node. Note that this "
|
||||
static const vshCmdInfo info_node_device_create = {
|
||||
.help = N_("create a device defined "
|
||||
"by an XML file on the node"),
|
||||
.desc = N_("Create a device on the node. Note that this "
|
||||
"command creates devices on the physical host "
|
||||
"that can then be assigned to a virtual machine.")
|
||||
},
|
||||
{.name = NULL}
|
||||
"that can then be assigned to a virtual machine."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_create[] = {
|
||||
@ -89,15 +84,10 @@ cmdNodeDeviceCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-destroy" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_destroy[] = {
|
||||
{.name = "help",
|
||||
.data = N_("destroy (stop) a device on the node")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Destroy a device on the node. Note that this "
|
||||
"command destroys devices on the physical host")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_destroy = {
|
||||
.help = N_("destroy (stop) a device on the node"),
|
||||
.desc = N_("Destroy a device on the node. Note that this "
|
||||
"command destroys devices on the physical host"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_destroy[] = {
|
||||
@ -362,14 +352,9 @@ virshNodeDeviceListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "nodedev-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_list_devices[] = {
|
||||
{.name = "help",
|
||||
.data = N_("enumerate devices on this host")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_list_devices = {
|
||||
.help = N_("enumerate devices on this host"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_list_devices[] = {
|
||||
@ -577,14 +562,9 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "nodedev-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("node device details in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the node device details as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_dumpxml = {
|
||||
.help = N_("node device details in XML"),
|
||||
.desc = N_("Output the node device details as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
|
||||
@ -645,14 +625,9 @@ cmdNodeDeviceDumpXML(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-detach" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_detach[] = {
|
||||
{.name = "help",
|
||||
.data = N_("detach node device from its device driver")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Detach node device from its device driver before assigning to a domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_detach = {
|
||||
.help = N_("detach node device from its device driver"),
|
||||
.desc = N_("Detach node device from its device driver before assigning to a domain."),
|
||||
};
|
||||
|
||||
|
||||
@ -712,14 +687,9 @@ cmdNodeDeviceDetach(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-reattach" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_reattach[] = {
|
||||
{.name = "help",
|
||||
.data = N_("reattach node device to its device driver")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Reattach node device to its device driver once released by the domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_reattach = {
|
||||
.help = N_("reattach node device to its device driver"),
|
||||
.desc = N_("Reattach node device to its device driver once released by the domain."),
|
||||
};
|
||||
|
||||
|
||||
@ -762,14 +732,9 @@ cmdNodeDeviceReAttach(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-reset" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_reset[] = {
|
||||
{.name = "help",
|
||||
.data = N_("reset node device")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Reset node device before or after assigning to a domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_reset = {
|
||||
.help = N_("reset node device"),
|
||||
.desc = N_("Reset node device before or after assigning to a domain."),
|
||||
};
|
||||
|
||||
|
||||
@ -906,14 +871,9 @@ virshNodeDeviceEventCallback virshNodeDeviceEventCallbacks[] = {
|
||||
G_STATIC_ASSERT(VIR_NODE_DEVICE_EVENT_ID_LAST == G_N_ELEMENTS(virshNodeDeviceEventCallbacks));
|
||||
|
||||
|
||||
static const vshCmdInfo info_node_device_event[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Node Device Events")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("List event types, or wait for node device events to occur")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_event = {
|
||||
.help = N_("Node Device Events"),
|
||||
.desc = N_("List event types, or wait for node device events to occur"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_event[] = {
|
||||
@ -1034,14 +994,9 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-undefine" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_undefine[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Undefine an inactive node device")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Undefines the configuration for an inactive node device")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_undefine = {
|
||||
.help = N_("Undefine an inactive node device"),
|
||||
.desc = N_("Undefines the configuration for an inactive node device"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_undefine[] = {
|
||||
@ -1081,16 +1036,11 @@ cmdNodeDeviceUndefine(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "nodedev-define" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_define[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Define or modify a device by an xml file on a node")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Defines or modifies a persistent device on the node that "
|
||||
static const vshCmdInfo info_node_device_define = {
|
||||
.help = N_("Define or modify a device by an xml file on a node"),
|
||||
.desc = N_("Defines or modifies a persistent device on the node that "
|
||||
"can be assigned to a domain. The device must be started "
|
||||
"before it can be assigned to a domain.")
|
||||
},
|
||||
{.name = NULL}
|
||||
"before it can be assigned to a domain."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_define[] = {
|
||||
@ -1135,14 +1085,9 @@ cmdNodeDeviceDefine(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "nodedev-start" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_start[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Start an inactive node device")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Starts an inactive node device that was previously defined")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_start = {
|
||||
.help = N_("Start an inactive node device"),
|
||||
.desc = N_("Starts an inactive node device that was previously defined"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_start[] = {
|
||||
@ -1185,14 +1130,9 @@ cmdNodeDeviceStart(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-autostart" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_autostart[] = {
|
||||
{.name = "help",
|
||||
.data = N_("autostart a defined node device")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Configure a node device to be automatically started at boot.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_autostart = {
|
||||
.help = N_("autostart a defined node device"),
|
||||
.desc = N_("Configure a node device to be automatically started at boot."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_autostart[] = {
|
||||
@ -1246,14 +1186,9 @@ cmdNodeDeviceAutostart(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-info" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("node device information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about the node device")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_info = {
|
||||
.help = N_("node device information"),
|
||||
.desc = N_("Returns basic information about the node device"),
|
||||
};
|
||||
|
||||
|
||||
@ -1302,14 +1237,9 @@ cmdNodeDeviceInfo(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nodedev-update" command
|
||||
*/
|
||||
static const vshCmdInfo info_node_device_update[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Update a active and/or inactive node device")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Updates the configuration of a node device")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_node_device_update = {
|
||||
.help = N_("Update a active and/or inactive node device"),
|
||||
.desc = N_("Updates the configuration of a node device"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_node_device_update[] = {
|
||||
@ -1399,19 +1329,19 @@ const vshCmdDef nodedevCmds[] = {
|
||||
{.name = "nodedev-create",
|
||||
.handler = cmdNodeDeviceCreate,
|
||||
.opts = opts_node_device_create,
|
||||
.info = info_node_device_create,
|
||||
.info = &info_node_device_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-destroy",
|
||||
.handler = cmdNodeDeviceDestroy,
|
||||
.opts = opts_node_device_destroy,
|
||||
.info = info_node_device_destroy,
|
||||
.info = &info_node_device_destroy,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-detach",
|
||||
.handler = cmdNodeDeviceDetach,
|
||||
.opts = opts_node_device_detach,
|
||||
.info = info_node_device_detach,
|
||||
.info = &info_node_device_detach,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-dettach",
|
||||
@ -1420,67 +1350,67 @@ const vshCmdDef nodedevCmds[] = {
|
||||
{.name = "nodedev-dumpxml",
|
||||
.handler = cmdNodeDeviceDumpXML,
|
||||
.opts = opts_node_device_dumpxml,
|
||||
.info = info_node_device_dumpxml,
|
||||
.info = &info_node_device_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-list",
|
||||
.handler = cmdNodeListDevices,
|
||||
.opts = opts_node_list_devices,
|
||||
.info = info_node_list_devices,
|
||||
.info = &info_node_list_devices,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-reattach",
|
||||
.handler = cmdNodeDeviceReAttach,
|
||||
.opts = opts_node_device_reattach,
|
||||
.info = info_node_device_reattach,
|
||||
.info = &info_node_device_reattach,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-reset",
|
||||
.handler = cmdNodeDeviceReset,
|
||||
.opts = opts_node_device_reset,
|
||||
.info = info_node_device_reset,
|
||||
.info = &info_node_device_reset,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-event",
|
||||
.handler = cmdNodeDeviceEvent,
|
||||
.opts = opts_node_device_event,
|
||||
.info = info_node_device_event,
|
||||
.info = &info_node_device_event,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-define",
|
||||
.handler = cmdNodeDeviceDefine,
|
||||
.opts = opts_node_device_define,
|
||||
.info = info_node_device_define,
|
||||
.info = &info_node_device_define,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-undefine",
|
||||
.handler = cmdNodeDeviceUndefine,
|
||||
.opts = opts_node_device_undefine,
|
||||
.info = info_node_device_undefine,
|
||||
.info = &info_node_device_undefine,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-start",
|
||||
.handler = cmdNodeDeviceStart,
|
||||
.opts = opts_node_device_start,
|
||||
.info = info_node_device_start,
|
||||
.info = &info_node_device_start,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-autostart",
|
||||
.handler = cmdNodeDeviceAutostart,
|
||||
.opts = opts_node_device_autostart,
|
||||
.info = info_node_device_autostart,
|
||||
.info = &info_node_device_autostart,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-info",
|
||||
.handler = cmdNodeDeviceInfo,
|
||||
.opts = opts_node_device_info,
|
||||
.info = info_node_device_info,
|
||||
.info = &info_node_device_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nodedev-update",
|
||||
.handler = cmdNodeDeviceUpdate,
|
||||
.opts = opts_node_device_update,
|
||||
.info = info_node_device_update,
|
||||
.info = &info_node_device_update,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -69,14 +69,9 @@ virshCommandOptNWFilterBy(vshControl *ctl, const vshCmd *cmd,
|
||||
/*
|
||||
* "nwfilter-define" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_define[] = {
|
||||
{.name = "help",
|
||||
.data = N_("define or update a network filter from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Define a new network filter or update an existing one.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_define = {
|
||||
.help = N_("define or update a network filter from an XML file"),
|
||||
.desc = N_("Define a new network filter or update an existing one."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_define[] = {
|
||||
@ -126,14 +121,9 @@ cmdNWFilterDefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nwfilter-undefine" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_undefine[] = {
|
||||
{.name = "help",
|
||||
.data = N_("undefine a network filter")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Undefine a given network filter.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_undefine = {
|
||||
.help = N_("undefine a network filter"),
|
||||
.desc = N_("Undefine a given network filter."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_undefine[] = {
|
||||
@ -169,14 +159,9 @@ cmdNWFilterUndefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nwfilter-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("network filter information in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the network filter information as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_dumpxml = {
|
||||
.help = N_("network filter information in XML"),
|
||||
.desc = N_("Output the network filter information as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_dumpxml[] = {
|
||||
@ -351,14 +336,9 @@ virshNWFilterListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "nwfilter-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list network filters")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of network filters.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_list = {
|
||||
.help = N_("list network filters"),
|
||||
.desc = N_("Returns list of network filters."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_list[] = {
|
||||
@ -403,14 +383,9 @@ cmdNWFilterList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "nwfilter-edit" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_edit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("edit XML configuration for a network filter")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Edit the XML configuration for a network filter.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_edit = {
|
||||
.help = N_("edit XML configuration for a network filter"),
|
||||
.desc = N_("Edit the XML configuration for a network filter."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_edit[] = {
|
||||
@ -493,14 +468,9 @@ virshCommandOptNWFilterBindingBy(vshControl *ctl,
|
||||
/*
|
||||
* "nwfilter-binding-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_binding_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a network filter binding from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a new network filter binding.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_binding_create = {
|
||||
.help = N_("create a network filter binding from an XML file"),
|
||||
.desc = N_("Create a new network filter binding."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_binding_create[] = {
|
||||
@ -548,14 +518,9 @@ cmdNWFilterBindingCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nwfilter-binding-delete" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_binding_delete[] = {
|
||||
{.name = "help",
|
||||
.data = N_("delete a network filter binding")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Delete a given network filter binding.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_binding_delete = {
|
||||
.help = N_("delete a network filter binding"),
|
||||
.desc = N_("Delete a given network filter binding."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_binding_delete[] = {
|
||||
@ -593,14 +558,9 @@ cmdNWFilterBindingDelete(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "nwfilter-binding-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_binding_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("network filter information in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the network filter information as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_binding_dumpxml = {
|
||||
.help = N_("network filter information in XML"),
|
||||
.desc = N_("Output the network filter information as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_binding_dumpxml[] = {
|
||||
@ -726,14 +686,9 @@ virshNWFilterBindingListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "nwfilter-binding-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_nwfilter_binding_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list network filter bindings")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of network filter bindings.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_nwfilter_binding_list = {
|
||||
.help = N_("list network filter bindings"),
|
||||
.desc = N_("Returns list of network filter bindings."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_nwfilter_binding_list[] = {
|
||||
@ -778,55 +733,55 @@ const vshCmdDef nwfilterCmds[] = {
|
||||
{.name = "nwfilter-define",
|
||||
.handler = cmdNWFilterDefine,
|
||||
.opts = opts_nwfilter_define,
|
||||
.info = info_nwfilter_define,
|
||||
.info = &info_nwfilter_define,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-dumpxml",
|
||||
.handler = cmdNWFilterDumpXML,
|
||||
.opts = opts_nwfilter_dumpxml,
|
||||
.info = info_nwfilter_dumpxml,
|
||||
.info = &info_nwfilter_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-edit",
|
||||
.handler = cmdNWFilterEdit,
|
||||
.opts = opts_nwfilter_edit,
|
||||
.info = info_nwfilter_edit,
|
||||
.info = &info_nwfilter_edit,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-list",
|
||||
.handler = cmdNWFilterList,
|
||||
.opts = opts_nwfilter_list,
|
||||
.info = info_nwfilter_list,
|
||||
.info = &info_nwfilter_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-undefine",
|
||||
.handler = cmdNWFilterUndefine,
|
||||
.opts = opts_nwfilter_undefine,
|
||||
.info = info_nwfilter_undefine,
|
||||
.info = &info_nwfilter_undefine,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-binding-create",
|
||||
.handler = cmdNWFilterBindingCreate,
|
||||
.opts = opts_nwfilter_binding_create,
|
||||
.info = info_nwfilter_binding_create,
|
||||
.info = &info_nwfilter_binding_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-binding-delete",
|
||||
.handler = cmdNWFilterBindingDelete,
|
||||
.opts = opts_nwfilter_binding_delete,
|
||||
.info = info_nwfilter_binding_delete,
|
||||
.info = &info_nwfilter_binding_delete,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-binding-dumpxml",
|
||||
.handler = cmdNWFilterBindingDumpXML,
|
||||
.opts = opts_nwfilter_binding_dumpxml,
|
||||
.info = info_nwfilter_binding_dumpxml,
|
||||
.info = &info_nwfilter_binding_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "nwfilter-binding-list",
|
||||
.handler = cmdNWFilterBindingList,
|
||||
.opts = opts_nwfilter_binding_list,
|
||||
.info = info_nwfilter_binding_list,
|
||||
.info = &info_nwfilter_binding_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -196,14 +196,9 @@ virshCommandOptPoolBy(vshControl *ctl, const vshCmd *cmd, const char *optname,
|
||||
/*
|
||||
* "pool-autostart" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_autostart[] = {
|
||||
{.name = "help",
|
||||
.data = N_("autostart a pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Configure a pool to be automatically started at boot.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_autostart = {
|
||||
.help = N_("autostart a pool"),
|
||||
.desc = N_("Configure a pool to be automatically started at boot."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_autostart[] = {
|
||||
@ -247,14 +242,9 @@ cmdPoolAutostart(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a pool from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_create = {
|
||||
.help = N_("create a pool from an XML file"),
|
||||
.desc = N_("Create a pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_create[] = {
|
||||
@ -437,14 +427,9 @@ virshBuildPoolXML(vshControl *ctl,
|
||||
/*
|
||||
* "pool-create-as" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_create_as[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a pool from a set of args")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_create_as = {
|
||||
.help = N_("create a pool from a set of args"),
|
||||
.desc = N_("Create a pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_create_as[] = {
|
||||
@ -503,15 +488,10 @@ cmdPoolCreateAs(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-define" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_define[] = {
|
||||
{.name = "help",
|
||||
.data = N_("define an inactive persistent storage pool or modify "
|
||||
"an existing persistent one from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Define or modify a persistent storage pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_define = {
|
||||
.help = N_("define an inactive persistent storage pool or modify "
|
||||
"an existing persistent one from an XML file"),
|
||||
.desc = N_("Define or modify a persistent storage pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_define[] = {
|
||||
@ -554,14 +534,9 @@ cmdPoolDefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-define-as" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_define_as[] = {
|
||||
{.name = "help",
|
||||
.data = N_("define a pool from a set of args")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Define a pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_define_as = {
|
||||
.help = N_("define a pool from a set of args"),
|
||||
.desc = N_("Define a pool."),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -593,14 +568,9 @@ cmdPoolDefineAs(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-build" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_build[] = {
|
||||
{.name = "help",
|
||||
.data = N_("build a pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Build a given pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_build = {
|
||||
.help = N_("build a pool"),
|
||||
.desc = N_("Build a given pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_build[] = {
|
||||
@ -641,14 +611,9 @@ cmdPoolBuild(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-destroy" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_destroy[] = {
|
||||
{.name = "help",
|
||||
.data = N_("destroy (stop) a pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Forcefully stop a given pool. Raw data in the pool is untouched")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_destroy = {
|
||||
.help = N_("destroy (stop) a pool"),
|
||||
.desc = N_("Forcefully stop a given pool. Raw data in the pool is untouched"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_destroy[] = {
|
||||
@ -680,14 +645,9 @@ cmdPoolDestroy(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-delete" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_delete[] = {
|
||||
{.name = "help",
|
||||
.data = N_("delete a pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Delete a given pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_delete = {
|
||||
.help = N_("delete a pool"),
|
||||
.desc = N_("Delete a given pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_delete[] = {
|
||||
@ -719,14 +679,9 @@ cmdPoolDelete(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-refresh" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_refresh[] = {
|
||||
{.name = "help",
|
||||
.data = N_("refresh a pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Refresh a given pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_refresh = {
|
||||
.help = N_("refresh a pool"),
|
||||
.desc = N_("Refresh a given pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_refresh[] = {
|
||||
@ -758,14 +713,9 @@ cmdPoolRefresh(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("pool information in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the pool information as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_dumpxml = {
|
||||
.help = N_("pool information in XML"),
|
||||
.desc = N_("Output the pool information as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_dumpxml[] = {
|
||||
@ -1051,14 +1001,9 @@ virshStoragePoolStateToString(int state)
|
||||
/*
|
||||
* "pool-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list pools")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of pools.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_list = {
|
||||
.help = N_("list pools"),
|
||||
.desc = N_("Returns list of pools."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_list[] = {
|
||||
@ -1401,14 +1346,9 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "find-storage-pool-sources-as" command
|
||||
*/
|
||||
static const vshCmdInfo info_find_storage_pool_sources_as[] = {
|
||||
{.name = "help",
|
||||
.data = N_("find potential storage pool sources")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns XML <sources> document.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_find_storage_pool_sources_as = {
|
||||
.help = N_("find potential storage pool sources"),
|
||||
.desc = N_("Returns XML <sources> document."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_find_storage_pool_sources_as[] = {
|
||||
@ -1489,14 +1429,9 @@ cmdPoolDiscoverSourcesAs(vshControl * ctl, const vshCmd * cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "find-storage-pool-sources" command
|
||||
*/
|
||||
static const vshCmdInfo info_find_storage_pool_sources[] = {
|
||||
{.name = "help",
|
||||
.data = N_("discover potential storage pool sources")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns XML <sources> document.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_find_storage_pool_sources = {
|
||||
.help = N_("discover potential storage pool sources"),
|
||||
.desc = N_("Returns XML <sources> document."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_find_storage_pool_sources[] = {
|
||||
@ -1546,14 +1481,9 @@ cmdPoolDiscoverSources(vshControl * ctl, const vshCmd * cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "pool-info" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("storage pool information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about the storage pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_info = {
|
||||
.help = N_("storage pool information"),
|
||||
.desc = N_("Returns basic information about the storage pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_info[] = {
|
||||
@ -1636,14 +1566,9 @@ cmdPoolInfo(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-name" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_name[] = {
|
||||
{.name = "help",
|
||||
.data = N_("convert a pool UUID to pool name")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_name = {
|
||||
.help = N_("convert a pool UUID to pool name"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_name[] = {
|
||||
@ -1667,14 +1592,9 @@ cmdPoolName(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-start" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_start[] = {
|
||||
{.name = "help",
|
||||
.data = N_("start a (previously defined) inactive pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Start a pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_start = {
|
||||
.help = N_("start a (previously defined) inactive pool"),
|
||||
.desc = N_("Start a pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_start[] = {
|
||||
@ -1727,14 +1647,9 @@ cmdPoolStart(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-undefine" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_undefine[] = {
|
||||
{.name = "help",
|
||||
.data = N_("undefine an inactive pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Undefine the configuration for an inactive pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_undefine = {
|
||||
.help = N_("undefine an inactive pool"),
|
||||
.desc = N_("Undefine the configuration for an inactive pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_undefine[] = {
|
||||
@ -1766,14 +1681,9 @@ cmdPoolUndefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-uuid" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_uuid[] = {
|
||||
{.name = "help",
|
||||
.data = N_("convert a pool name to pool UUID")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_uuid = {
|
||||
.help = N_("convert a pool name to pool UUID"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_uuid[] = {
|
||||
@ -1802,14 +1712,9 @@ cmdPoolUuid(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-edit" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_edit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("edit XML configuration for a storage pool")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Edit the XML configuration for a storage pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_edit = {
|
||||
.help = N_("edit XML configuration for a storage pool"),
|
||||
.desc = N_("Edit the XML configuration for a storage pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_edit[] = {
|
||||
@ -1965,14 +1870,9 @@ virshPoolEventCallback virshPoolEventCallbacks[] = {
|
||||
G_STATIC_ASSERT(VIR_STORAGE_POOL_EVENT_ID_LAST == G_N_ELEMENTS(virshPoolEventCallbacks));
|
||||
|
||||
|
||||
static const vshCmdInfo info_pool_event[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Storage Pool Events")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("List event types, or wait for storage pool events to occur")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_event = {
|
||||
.help = N_("Storage Pool Events"),
|
||||
.desc = N_("List event types, or wait for storage pool events to occur"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_event[] = {
|
||||
@ -2085,14 +1985,9 @@ cmdPoolEvent(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "pool-capabilities" command
|
||||
*/
|
||||
static const vshCmdInfo info_pool_capabilities[] = {
|
||||
{.name = "help",
|
||||
.data = N_("storage pool capabilities")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns capabilities of storage pool support.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_pool_capabilities = {
|
||||
.help = N_("storage pool capabilities"),
|
||||
.desc = N_("Returns capabilities of storage pool support."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_pool_capabilities[] = {
|
||||
@ -2122,127 +2017,127 @@ const vshCmdDef storagePoolCmds[] = {
|
||||
{.name = "find-storage-pool-sources-as",
|
||||
.handler = cmdPoolDiscoverSourcesAs,
|
||||
.opts = opts_find_storage_pool_sources_as,
|
||||
.info = info_find_storage_pool_sources_as,
|
||||
.info = &info_find_storage_pool_sources_as,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "find-storage-pool-sources",
|
||||
.handler = cmdPoolDiscoverSources,
|
||||
.opts = opts_find_storage_pool_sources,
|
||||
.info = info_find_storage_pool_sources,
|
||||
.info = &info_find_storage_pool_sources,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-autostart",
|
||||
.handler = cmdPoolAutostart,
|
||||
.opts = opts_pool_autostart,
|
||||
.info = info_pool_autostart,
|
||||
.info = &info_pool_autostart,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-build",
|
||||
.handler = cmdPoolBuild,
|
||||
.opts = opts_pool_build,
|
||||
.info = info_pool_build,
|
||||
.info = &info_pool_build,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-create-as",
|
||||
.handler = cmdPoolCreateAs,
|
||||
.opts = opts_pool_create_as,
|
||||
.info = info_pool_create_as,
|
||||
.info = &info_pool_create_as,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-create",
|
||||
.handler = cmdPoolCreate,
|
||||
.opts = opts_pool_create,
|
||||
.info = info_pool_create,
|
||||
.info = &info_pool_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-define-as",
|
||||
.handler = cmdPoolDefineAs,
|
||||
.opts = opts_pool_define_as,
|
||||
.info = info_pool_define_as,
|
||||
.info = &info_pool_define_as,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-define",
|
||||
.handler = cmdPoolDefine,
|
||||
.opts = opts_pool_define,
|
||||
.info = info_pool_define,
|
||||
.info = &info_pool_define,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-delete",
|
||||
.handler = cmdPoolDelete,
|
||||
.opts = opts_pool_delete,
|
||||
.info = info_pool_delete,
|
||||
.info = &info_pool_delete,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-destroy",
|
||||
.handler = cmdPoolDestroy,
|
||||
.opts = opts_pool_destroy,
|
||||
.info = info_pool_destroy,
|
||||
.info = &info_pool_destroy,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-dumpxml",
|
||||
.handler = cmdPoolDumpXML,
|
||||
.opts = opts_pool_dumpxml,
|
||||
.info = info_pool_dumpxml,
|
||||
.info = &info_pool_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-edit",
|
||||
.handler = cmdPoolEdit,
|
||||
.opts = opts_pool_edit,
|
||||
.info = info_pool_edit,
|
||||
.info = &info_pool_edit,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-info",
|
||||
.handler = cmdPoolInfo,
|
||||
.opts = opts_pool_info,
|
||||
.info = info_pool_info,
|
||||
.info = &info_pool_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-list",
|
||||
.handler = cmdPoolList,
|
||||
.opts = opts_pool_list,
|
||||
.info = info_pool_list,
|
||||
.info = &info_pool_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-name",
|
||||
.handler = cmdPoolName,
|
||||
.opts = opts_pool_name,
|
||||
.info = info_pool_name,
|
||||
.info = &info_pool_name,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-refresh",
|
||||
.handler = cmdPoolRefresh,
|
||||
.opts = opts_pool_refresh,
|
||||
.info = info_pool_refresh,
|
||||
.info = &info_pool_refresh,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-start",
|
||||
.handler = cmdPoolStart,
|
||||
.opts = opts_pool_start,
|
||||
.info = info_pool_start,
|
||||
.info = &info_pool_start,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-undefine",
|
||||
.handler = cmdPoolUndefine,
|
||||
.opts = opts_pool_undefine,
|
||||
.info = info_pool_undefine,
|
||||
.info = &info_pool_undefine,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-uuid",
|
||||
.handler = cmdPoolUuid,
|
||||
.opts = opts_pool_uuid,
|
||||
.info = info_pool_uuid,
|
||||
.info = &info_pool_uuid,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-event",
|
||||
.handler = cmdPoolEvent,
|
||||
.opts = opts_pool_event,
|
||||
.info = info_pool_event,
|
||||
.info = &info_pool_event,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "pool-capabilities",
|
||||
.handler = cmdPoolCapabilities,
|
||||
.opts = opts_pool_capabilities,
|
||||
.info = info_pool_capabilities,
|
||||
.info = &info_pool_capabilities,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -61,14 +61,9 @@ virshCommandOptSecret(vshControl *ctl, const vshCmd *cmd, const char **name)
|
||||
/*
|
||||
* "secret-define" command
|
||||
*/
|
||||
static const vshCmdInfo info_secret_define[] = {
|
||||
{.name = "help",
|
||||
.data = N_("define or modify a secret from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Define or modify a secret.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_secret_define = {
|
||||
.help = N_("define or modify a secret from an XML file"),
|
||||
.desc = N_("Define or modify a secret."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_secret_define[] = {
|
||||
@ -121,14 +116,9 @@ cmdSecretDefine(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "secret-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_secret_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("secret attributes in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output attributes of a secret as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_secret_dumpxml = {
|
||||
.help = N_("secret attributes in XML"),
|
||||
.desc = N_("Output attributes of a secret as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_secret_dumpxml[] = {
|
||||
@ -181,14 +171,9 @@ cmdSecretDumpXML(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "secret-set-value" command
|
||||
*/
|
||||
static const vshCmdInfo info_secret_set_value[] = {
|
||||
{.name = "help",
|
||||
.data = N_("set a secret value")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Set a secret value.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_secret_set_value = {
|
||||
.help = N_("set a secret value"),
|
||||
.desc = N_("Set a secret value."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_secret_set_value[] = {
|
||||
@ -297,14 +282,9 @@ cmdSecretSetValue(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "secret-get-value" command
|
||||
*/
|
||||
static const vshCmdInfo info_secret_get_value[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Output a secret value")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output a secret value to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_secret_get_value = {
|
||||
.help = N_("Output a secret value"),
|
||||
.desc = N_("Output a secret value to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_secret_get_value[] = {
|
||||
@ -355,14 +335,9 @@ cmdSecretGetValue(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "secret-undefine" command
|
||||
*/
|
||||
static const vshCmdInfo info_secret_undefine[] = {
|
||||
{.name = "help",
|
||||
.data = N_("undefine a secret")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Undefine a secret.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_secret_undefine = {
|
||||
.help = N_("undefine a secret"),
|
||||
.desc = N_("Undefine a secret."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_secret_undefine[] = {
|
||||
@ -539,14 +514,9 @@ virshSecretListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "secret-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_secret_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list secrets")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns a list of secrets")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_secret_list = {
|
||||
.help = N_("list secrets"),
|
||||
.desc = N_("Returns a list of secrets"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_secret_list[] = {
|
||||
@ -732,14 +702,9 @@ virshSecretEventCallback virshSecretEventCallbacks[] = {
|
||||
};
|
||||
G_STATIC_ASSERT(VIR_SECRET_EVENT_ID_LAST == G_N_ELEMENTS(virshSecretEventCallbacks));
|
||||
|
||||
static const vshCmdInfo info_secret_event[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Secret Events")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("List event types, or wait for secret events to occur")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_secret_event = {
|
||||
.help = N_("Secret Events"),
|
||||
.desc = N_("List event types, or wait for secret events to occur"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_secret_event[] = {
|
||||
@ -852,43 +817,43 @@ const vshCmdDef secretCmds[] = {
|
||||
{.name = "secret-define",
|
||||
.handler = cmdSecretDefine,
|
||||
.opts = opts_secret_define,
|
||||
.info = info_secret_define,
|
||||
.info = &info_secret_define,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "secret-dumpxml",
|
||||
.handler = cmdSecretDumpXML,
|
||||
.opts = opts_secret_dumpxml,
|
||||
.info = info_secret_dumpxml,
|
||||
.info = &info_secret_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "secret-event",
|
||||
.handler = cmdSecretEvent,
|
||||
.opts = opts_secret_event,
|
||||
.info = info_secret_event,
|
||||
.info = &info_secret_event,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "secret-get-value",
|
||||
.handler = cmdSecretGetValue,
|
||||
.opts = opts_secret_get_value,
|
||||
.info = info_secret_get_value,
|
||||
.info = &info_secret_get_value,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "secret-list",
|
||||
.handler = cmdSecretList,
|
||||
.opts = opts_secret_list,
|
||||
.info = info_secret_list,
|
||||
.info = &info_secret_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "secret-set-value",
|
||||
.handler = cmdSecretSetValue,
|
||||
.opts = opts_secret_set_value,
|
||||
.info = info_secret_set_value,
|
||||
.info = &info_secret_set_value,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "secret-undefine",
|
||||
.handler = cmdSecretUndefine,
|
||||
.opts = opts_secret_undefine,
|
||||
.info = info_secret_undefine,
|
||||
.info = &info_secret_undefine,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -100,14 +100,9 @@ virshSnapshotCreate(vshControl *ctl, virDomainPtr dom, const char *buffer,
|
||||
/*
|
||||
* "snapshot-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Create a snapshot from XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a snapshot (disk and RAM) from XML")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_create = {
|
||||
.help = N_("Create a snapshot from XML"),
|
||||
.desc = N_("Create a snapshot (disk and RAM) from XML"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_create[] = {
|
||||
@ -309,14 +304,9 @@ virshParseSnapshotDiskspec(vshControl *ctl, virBuffer *buf, const char *str)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const vshCmdInfo info_snapshot_create_as[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Create a snapshot from a set of args")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a snapshot (disk and RAM) from arguments")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_create_as = {
|
||||
.help = N_("Create a snapshot from a set of args"),
|
||||
.desc = N_("Create a snapshot (disk and RAM) from arguments"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_create_as[] = {
|
||||
@ -486,14 +476,9 @@ virshLookupSnapshot(vshControl *ctl, const vshCmd *cmd,
|
||||
/*
|
||||
* "snapshot-edit" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_edit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("edit XML for a snapshot")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Edit the domain snapshot XML for a named snapshot")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_edit = {
|
||||
.help = N_("edit XML for a snapshot"),
|
||||
.desc = N_("Edit the domain snapshot XML for a named snapshot"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_edit[] = {
|
||||
@ -596,14 +581,9 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "snapshot-current" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_current[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Get or set the current snapshot")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Get or set the current snapshot")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_current = {
|
||||
.help = N_("Get or set the current snapshot"),
|
||||
.desc = N_("Get or set the current snapshot"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_current[] = {
|
||||
@ -808,14 +788,9 @@ virshSnapshotFilter(vshControl *ctl, virDomainSnapshotPtr snapshot,
|
||||
/*
|
||||
* "snapshot-info" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("snapshot information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about a snapshot.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_info = {
|
||||
.help = N_("snapshot information"),
|
||||
.desc = N_("Returns basic information about a snapshot."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_info[] = {
|
||||
@ -1342,14 +1317,9 @@ virshSnapshotListLookup(int id, bool parent, void *opaque)
|
||||
/*
|
||||
* "snapshot-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("List snapshots for a domain")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Snapshot List")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_list = {
|
||||
.help = N_("List snapshots for a domain"),
|
||||
.desc = N_("Snapshot List"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_list[] = {
|
||||
@ -1589,14 +1559,9 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "snapshot-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Dump XML for a domain snapshot")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Snapshot Dump XML")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_dumpxml = {
|
||||
.help = N_("Dump XML for a domain snapshot"),
|
||||
.desc = N_("Snapshot Dump XML"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_dumpxml[] = {
|
||||
@ -1659,14 +1624,9 @@ cmdSnapshotDumpXML(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "snapshot-parent" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_parent[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Get the name of the parent of a snapshot")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Extract the snapshot's parent, if any")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_parent = {
|
||||
.help = N_("Get the name of the parent of a snapshot"),
|
||||
.desc = N_("Extract the snapshot's parent, if any"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_parent[] = {
|
||||
@ -1711,14 +1671,9 @@ cmdSnapshotParent(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "snapshot-revert" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_revert[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Revert a domain to a snapshot")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Revert domain to snapshot")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_revert = {
|
||||
.help = N_("Revert a domain to a snapshot"),
|
||||
.desc = N_("Revert domain to snapshot"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_revert[] = {
|
||||
@ -1797,14 +1752,9 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "snapshot-delete" command
|
||||
*/
|
||||
static const vshCmdInfo info_snapshot_delete[] = {
|
||||
{.name = "help",
|
||||
.data = N_("Delete a domain snapshot")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Snapshot Delete")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_snapshot_delete = {
|
||||
.help = N_("Delete a domain snapshot"),
|
||||
.desc = N_("Snapshot Delete"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_snapshot_delete[] = {
|
||||
@ -1872,61 +1822,61 @@ const vshCmdDef snapshotCmds[] = {
|
||||
{.name = "snapshot-create",
|
||||
.handler = cmdSnapshotCreate,
|
||||
.opts = opts_snapshot_create,
|
||||
.info = info_snapshot_create,
|
||||
.info = &info_snapshot_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-create-as",
|
||||
.handler = cmdSnapshotCreateAs,
|
||||
.opts = opts_snapshot_create_as,
|
||||
.info = info_snapshot_create_as,
|
||||
.info = &info_snapshot_create_as,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-current",
|
||||
.handler = cmdSnapshotCurrent,
|
||||
.opts = opts_snapshot_current,
|
||||
.info = info_snapshot_current,
|
||||
.info = &info_snapshot_current,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-delete",
|
||||
.handler = cmdSnapshotDelete,
|
||||
.opts = opts_snapshot_delete,
|
||||
.info = info_snapshot_delete,
|
||||
.info = &info_snapshot_delete,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-dumpxml",
|
||||
.handler = cmdSnapshotDumpXML,
|
||||
.opts = opts_snapshot_dumpxml,
|
||||
.info = info_snapshot_dumpxml,
|
||||
.info = &info_snapshot_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-edit",
|
||||
.handler = cmdSnapshotEdit,
|
||||
.opts = opts_snapshot_edit,
|
||||
.info = info_snapshot_edit,
|
||||
.info = &info_snapshot_edit,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-info",
|
||||
.handler = cmdSnapshotInfo,
|
||||
.opts = opts_snapshot_info,
|
||||
.info = info_snapshot_info,
|
||||
.info = &info_snapshot_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-list",
|
||||
.handler = cmdSnapshotList,
|
||||
.opts = opts_snapshot_list,
|
||||
.info = info_snapshot_list,
|
||||
.info = &info_snapshot_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-parent",
|
||||
.handler = cmdSnapshotParent,
|
||||
.opts = opts_snapshot_parent,
|
||||
.info = info_snapshot_parent,
|
||||
.info = &info_snapshot_parent,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "snapshot-revert",
|
||||
.handler = cmdDomainSnapshotRevert,
|
||||
.opts = opts_snapshot_revert,
|
||||
.info = info_snapshot_revert,
|
||||
.info = &info_snapshot_revert,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -164,14 +164,9 @@ virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
|
||||
/*
|
||||
* "vol-create-as" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_create_as[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a volume from a set of args")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a vol.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_create_as = {
|
||||
.help = N_("create a volume from a set of args"),
|
||||
.desc = N_("Create a vol."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_create_as[] = {
|
||||
@ -363,14 +358,9 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-create" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_create[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a vol from an XML file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a vol.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_create = {
|
||||
.help = N_("create a vol from an XML file"),
|
||||
.desc = N_("Create a vol."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_create[] = {
|
||||
@ -426,14 +416,9 @@ cmdVolCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-create-from" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_create_from[] = {
|
||||
{.name = "help",
|
||||
.data = N_("create a vol, using another volume as input")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Create a vol from an existing volume.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_create_from = {
|
||||
.help = N_("create a vol, using another volume as input"),
|
||||
.desc = N_("Create a vol from an existing volume."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_create_from[] = {
|
||||
@ -526,14 +511,9 @@ virshMakeCloneXML(const char *origxml, const char *newname)
|
||||
/*
|
||||
* "vol-clone" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_clone[] = {
|
||||
{.name = "help",
|
||||
.data = N_("clone a volume.")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Clone an existing volume within the parent pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_clone = {
|
||||
.help = N_("clone a volume."),
|
||||
.desc = N_("Clone an existing volume within the parent pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_clone[] = {
|
||||
@ -616,14 +596,9 @@ cmdVolClone(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-upload" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_upload[] = {
|
||||
{.name = "help",
|
||||
.data = N_("upload file contents to a volume")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Upload file contents to a volume")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_upload = {
|
||||
.help = N_("upload file contents to a volume"),
|
||||
.desc = N_("Upload file contents to a volume"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_upload[] = {
|
||||
@ -729,14 +704,9 @@ cmdVolUpload(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-download" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_download[] = {
|
||||
{.name = "help",
|
||||
.data = N_("download volume contents to a file")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Download volume contents to a file")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_download = {
|
||||
.help = N_("download volume contents to a file"),
|
||||
.desc = N_("Download volume contents to a file"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_download[] = {
|
||||
@ -845,14 +815,9 @@ cmdVolDownload(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-delete" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_delete[] = {
|
||||
{.name = "help",
|
||||
.data = N_("delete a vol")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Delete a given vol.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_delete = {
|
||||
.help = N_("delete a vol"),
|
||||
.desc = N_("Delete a given vol."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_delete[] = {
|
||||
@ -894,14 +859,9 @@ cmdVolDelete(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-wipe" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_wipe[] = {
|
||||
{.name = "help",
|
||||
.data = N_("wipe a vol")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Ensure data previously on a volume is not accessible to future reads")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_wipe = {
|
||||
.help = N_("wipe a vol"),
|
||||
.desc = N_("Ensure data previously on a volume is not accessible to future reads"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_wipe[] = {
|
||||
@ -978,14 +938,9 @@ virshVolumeTypeToString(int type)
|
||||
/*
|
||||
* "vol-info" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("storage vol information")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns basic information about the storage vol.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_info = {
|
||||
.help = N_("storage vol information"),
|
||||
.desc = N_("Returns basic information about the storage vol."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_info[] = {
|
||||
@ -1058,16 +1013,11 @@ cmdVolInfo(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-resize" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_resize[] = {
|
||||
{.name = "help",
|
||||
.data = N_("resize a vol")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Resizes a storage volume. This is safe only for storage "
|
||||
static const vshCmdInfo info_vol_resize = {
|
||||
.help = N_("resize a vol"),
|
||||
.desc = N_("Resizes a storage volume. This is safe only for storage "
|
||||
"volumes not in use by an active guest.\n"
|
||||
"See blockresize for live resizing.")
|
||||
},
|
||||
{.name = NULL}
|
||||
"See blockresize for live resizing."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_resize[] = {
|
||||
@ -1153,14 +1103,9 @@ cmdVolResize(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-dumpxml" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_dumpxml[] = {
|
||||
{.name = "help",
|
||||
.data = N_("vol information in XML")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Output the vol information as an XML dump to stdout.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_dumpxml = {
|
||||
.help = N_("vol information in XML"),
|
||||
.desc = N_("Output the vol information as an XML dump to stdout."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_dumpxml[] = {
|
||||
@ -1327,14 +1272,9 @@ virshStorageVolListCollect(vshControl *ctl,
|
||||
/*
|
||||
* "vol-list" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list vols")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Returns list of vols by pool.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_list = {
|
||||
.help = N_("list vols"),
|
||||
.desc = N_("Returns list of vols by pool."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_list[] = {
|
||||
@ -1485,14 +1425,9 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
/*
|
||||
* "vol-name" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_name[] = {
|
||||
{.name = "help",
|
||||
.data = N_("returns the volume name for a given volume key or path")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_name = {
|
||||
.help = N_("returns the volume name for a given volume key or path"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_name[] = {
|
||||
@ -1516,14 +1451,9 @@ cmdVolName(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-pool" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_pool[] = {
|
||||
{.name = "help",
|
||||
.data = N_("returns the storage pool for a given volume key or path")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_pool = {
|
||||
.help = N_("returns the storage pool for a given volume key or path"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_pool[] = {
|
||||
@ -1571,14 +1501,9 @@ cmdVolPool(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-key" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_key[] = {
|
||||
{.name = "help",
|
||||
.data = N_("returns the volume key for a given volume name or path")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_key = {
|
||||
.help = N_("returns the volume key for a given volume name or path"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_key[] = {
|
||||
@ -1602,14 +1527,9 @@ cmdVolKey(vshControl *ctl, const vshCmd *cmd)
|
||||
/*
|
||||
* "vol-path" command
|
||||
*/
|
||||
static const vshCmdInfo info_vol_path[] = {
|
||||
{.name = "help",
|
||||
.data = N_("returns the volume path for a given volume name or key")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_vol_path = {
|
||||
.help = N_("returns the volume path for a given volume name or key"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_vol_path[] = {
|
||||
@ -1639,97 +1559,97 @@ const vshCmdDef storageVolCmds[] = {
|
||||
{.name = "vol-clone",
|
||||
.handler = cmdVolClone,
|
||||
.opts = opts_vol_clone,
|
||||
.info = info_vol_clone,
|
||||
.info = &info_vol_clone,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-create-as",
|
||||
.handler = cmdVolCreateAs,
|
||||
.opts = opts_vol_create_as,
|
||||
.info = info_vol_create_as,
|
||||
.info = &info_vol_create_as,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-create",
|
||||
.handler = cmdVolCreate,
|
||||
.opts = opts_vol_create,
|
||||
.info = info_vol_create,
|
||||
.info = &info_vol_create,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-create-from",
|
||||
.handler = cmdVolCreateFrom,
|
||||
.opts = opts_vol_create_from,
|
||||
.info = info_vol_create_from,
|
||||
.info = &info_vol_create_from,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-delete",
|
||||
.handler = cmdVolDelete,
|
||||
.opts = opts_vol_delete,
|
||||
.info = info_vol_delete,
|
||||
.info = &info_vol_delete,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-download",
|
||||
.handler = cmdVolDownload,
|
||||
.opts = opts_vol_download,
|
||||
.info = info_vol_download,
|
||||
.info = &info_vol_download,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-dumpxml",
|
||||
.handler = cmdVolDumpXML,
|
||||
.opts = opts_vol_dumpxml,
|
||||
.info = info_vol_dumpxml,
|
||||
.info = &info_vol_dumpxml,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-info",
|
||||
.handler = cmdVolInfo,
|
||||
.opts = opts_vol_info,
|
||||
.info = info_vol_info,
|
||||
.info = &info_vol_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-key",
|
||||
.handler = cmdVolKey,
|
||||
.opts = opts_vol_key,
|
||||
.info = info_vol_key,
|
||||
.info = &info_vol_key,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-list",
|
||||
.handler = cmdVolList,
|
||||
.opts = opts_vol_list,
|
||||
.info = info_vol_list,
|
||||
.info = &info_vol_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-name",
|
||||
.handler = cmdVolName,
|
||||
.opts = opts_vol_name,
|
||||
.info = info_vol_name,
|
||||
.info = &info_vol_name,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-path",
|
||||
.handler = cmdVolPath,
|
||||
.opts = opts_vol_path,
|
||||
.info = info_vol_path,
|
||||
.info = &info_vol_path,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-pool",
|
||||
.handler = cmdVolPool,
|
||||
.opts = opts_vol_pool,
|
||||
.info = info_vol_pool,
|
||||
.info = &info_vol_pool,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-resize",
|
||||
.handler = cmdVolResize,
|
||||
.opts = opts_vol_resize,
|
||||
.info = info_vol_resize,
|
||||
.info = &info_vol_resize,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-upload",
|
||||
.handler = cmdVolUpload,
|
||||
.opts = opts_vol_upload,
|
||||
.info = info_vol_upload,
|
||||
.info = &info_vol_upload,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "vol-wipe",
|
||||
.handler = cmdVolWipe,
|
||||
.opts = opts_vol_wipe,
|
||||
.info = info_vol_wipe,
|
||||
.info = &info_vol_wipe,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -256,15 +256,10 @@ static const vshCmdOptDef opts_connect[] = {
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
static const vshCmdInfo info_connect[] = {
|
||||
{.name = "help",
|
||||
.data = N_("(re)connect to hypervisor")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Connect to local hypervisor. This is built-in "
|
||||
"command after shell start up.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_connect = {
|
||||
.help = N_("(re)connect to hypervisor"),
|
||||
.desc = N_("Connect to local hypervisor. This is built-in "
|
||||
"command after shell start up."),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -464,8 +459,7 @@ virshUsage(void)
|
||||
cmd->flags & VSH_CMD_FLAG_HIDDEN)
|
||||
continue;
|
||||
fprintf(stdout,
|
||||
" %-30s %s\n", cmd->name,
|
||||
_(vshCmddefGetInfo(cmd, "help")));
|
||||
" %-30s %s\n", cmd->name, _(cmd->info->help));
|
||||
}
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
@ -795,7 +789,7 @@ static const vshCmdDef virshCmds[] = {
|
||||
{.name = "connect",
|
||||
.handler = cmdConnect,
|
||||
.opts = opts_connect,
|
||||
.info = info_connect,
|
||||
.info = &info_connect,
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT
|
||||
},
|
||||
{.name = NULL}
|
||||
|
@ -167,14 +167,9 @@ vshAdmReconnect(vshControl *ctl)
|
||||
* 'uri' command
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_uri[] = {
|
||||
{.name = "help",
|
||||
.data = N_("print the admin server URI")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_uri = {
|
||||
.help = N_("print the admin server URI"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -198,14 +193,9 @@ cmdURI(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
* "version" command
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_version[] = {
|
||||
{.name = "help",
|
||||
.data = N_("show version")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Display the system and also the daemon version information.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_version = {
|
||||
.help = N_("show version"),
|
||||
.desc = N_("Display the system and also the daemon version information."),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -270,14 +260,9 @@ static const vshCmdOptDef opts_connect[] = {
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
static const vshCmdInfo info_connect[] = {
|
||||
{.name = "help",
|
||||
.data = N_("connect to daemon's admin server")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Connect to a daemon's administrating server.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_connect = {
|
||||
.help = N_("connect to daemon's admin server"),
|
||||
.desc = N_("Connect to a daemon's administrating server."),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -308,14 +293,9 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
|
||||
* -------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_srv_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list available servers on a daemon")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("List all manageable servers on a daemon.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_srv_list = {
|
||||
.help = N_("list available servers on a daemon"),
|
||||
.desc = N_("List all manageable servers on a daemon."),
|
||||
};
|
||||
|
||||
static bool
|
||||
@ -371,14 +351,9 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
* ------------------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_srv_threadpool_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("get server workerpool parameters")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Retrieve threadpool attributes from a server.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_srv_threadpool_info = {
|
||||
.help = N_("get server workerpool parameters"),
|
||||
.desc = N_("Retrieve threadpool attributes from a server."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_srv_threadpool_info[] = {
|
||||
@ -432,15 +407,10 @@ cmdSrvThreadpoolInfo(vshControl *ctl, const vshCmd *cmd)
|
||||
* -----------------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_srv_threadpool_set[] = {
|
||||
{.name = "help",
|
||||
.data = N_("set server workerpool parameters")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Tune threadpool attributes on a server. See OPTIONS for "
|
||||
"currently supported attributes.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_srv_threadpool_set = {
|
||||
.help = N_("set server workerpool parameters"),
|
||||
.desc = N_("Tune threadpool attributes on a server. See OPTIONS for "
|
||||
"currently supported attributes."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_srv_threadpool_set[] = {
|
||||
@ -539,14 +509,9 @@ cmdSrvThreadpoolSet(vshControl *ctl, const vshCmd *cmd)
|
||||
* ---------------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_srv_clients_list[] = {
|
||||
{.name = "help",
|
||||
.data = N_("list clients connected to <server>")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("List all manageable clients connected to <server>.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_srv_clients_list = {
|
||||
.help = N_("list clients connected to <server>"),
|
||||
.desc = N_("List all manageable clients connected to <server>."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_srv_clients_list[] = {
|
||||
@ -626,14 +591,9 @@ cmdSrvClientsList(vshControl *ctl, const vshCmd *cmd)
|
||||
* -------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_client_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("retrieve client's identity info from server")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Retrieve identity details about <client> from <server>")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_client_info = {
|
||||
.help = N_("retrieve client's identity info from server"),
|
||||
.desc = N_("Retrieve identity details about <client> from <server>"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_client_info[] = {
|
||||
@ -712,15 +672,10 @@ cmdClientInfo(vshControl *ctl, const vshCmd *cmd)
|
||||
* -------------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_client_disconnect[] = {
|
||||
{.name = "help",
|
||||
.data = N_("force disconnect a client from the given server")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Force close a specific client's connection to the given "
|
||||
"server.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_client_disconnect = {
|
||||
.help = N_("force disconnect a client from the given server"),
|
||||
.desc = N_("Force close a specific client's connection to the given "
|
||||
"server."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_client_disconnect[] = {
|
||||
@ -779,14 +734,9 @@ cmdClientDisconnect(vshControl *ctl, const vshCmd *cmd)
|
||||
* ---------------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_srv_clients_info[] = {
|
||||
{.name = "help",
|
||||
.data = N_("get server's client-related configuration limits")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Retrieve server's client-related configuration limits")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_srv_clients_info = {
|
||||
.help = N_("get server's client-related configuration limits"),
|
||||
.desc = N_("Retrieve server's client-related configuration limits"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_srv_clients_info[] = {
|
||||
@ -837,15 +787,10 @@ cmdSrvClientsInfo(vshControl *ctl, const vshCmd *cmd)
|
||||
* --------------------------
|
||||
*/
|
||||
|
||||
static const vshCmdInfo info_srv_clients_set[] = {
|
||||
{.name = "help",
|
||||
.data = N_("set server's client-related configuration limits")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Tune server's client-related configuration limits. "
|
||||
"See OPTIONS for currently supported attributes.")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_srv_clients_set = {
|
||||
.help = N_("set server's client-related configuration limits"),
|
||||
.desc = N_("Tune server's client-related configuration limits. "
|
||||
"See OPTIONS for currently supported attributes."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_srv_clients_set[] = {
|
||||
@ -938,16 +883,11 @@ cmdSrvClientsSet(vshControl *ctl, const vshCmd *cmd)
|
||||
* Command server-update-tls
|
||||
* --------------------------
|
||||
*/
|
||||
static const vshCmdInfo info_srv_update_tls_file[] = {
|
||||
{.name = "help",
|
||||
.data = N_("notify server to update TLS related files online.")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("notify server to update the CA cert, "
|
||||
static const vshCmdInfo info_srv_update_tls_file = {
|
||||
.help = N_("notify server to update TLS related files online."),
|
||||
.desc = N_("notify server to update the CA cert, "
|
||||
"CA CRL, server cert / key without restarts. "
|
||||
"See OPTIONS for currently supported attributes.")
|
||||
},
|
||||
{.name = NULL}
|
||||
"See OPTIONS for currently supported attributes."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_srv_update_tls_file[] = {
|
||||
@ -992,17 +932,12 @@ cmdSrvUpdateTlsFiles(vshControl *ctl, const vshCmd *cmd)
|
||||
* Command daemon-log-filters
|
||||
* --------------------------
|
||||
*/
|
||||
static const vshCmdInfo info_daemon_log_filters[] = {
|
||||
{.name = "help",
|
||||
.data = N_("fetch or set the currently defined set of logging filters on "
|
||||
"daemon")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Depending on whether run with or without options, the command "
|
||||
static const vshCmdInfo info_daemon_log_filters = {
|
||||
.help = N_("fetch or set the currently defined set of logging filters on "
|
||||
"daemon"),
|
||||
.desc = N_("Depending on whether run with or without options, the command "
|
||||
"fetches or redefines the existing active set of filters on "
|
||||
"daemon.")
|
||||
},
|
||||
{.name = NULL}
|
||||
"daemon."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_daemon_log_filters[] = {
|
||||
@ -1045,17 +980,12 @@ cmdDaemonLogFilters(vshControl *ctl, const vshCmd *cmd)
|
||||
* Command daemon-log-outputs
|
||||
* --------------------------
|
||||
*/
|
||||
static const vshCmdInfo info_daemon_log_outputs[] = {
|
||||
{.name = "help",
|
||||
.data = N_("fetch or set the currently defined set of logging outputs on "
|
||||
"daemon")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Depending on whether run with or without options, the command "
|
||||
static const vshCmdInfo info_daemon_log_outputs = {
|
||||
.help = N_("fetch or set the currently defined set of logging outputs on "
|
||||
"daemon"),
|
||||
.desc = N_("Depending on whether run with or without options, the command "
|
||||
"fetches or redefines the existing active set of outputs on "
|
||||
"daemon.")
|
||||
},
|
||||
{.name = NULL}
|
||||
"daemon."),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_daemon_timeout[] = {
|
||||
@ -1087,14 +1017,9 @@ cmdDaemonTimeout(vshControl *ctl, const vshCmd *cmd)
|
||||
* Command daemon-timeout
|
||||
* --------------------------
|
||||
*/
|
||||
static const vshCmdInfo info_daemon_timeout[] = {
|
||||
{.name = "help",
|
||||
.data = N_("set the auto shutdown timeout of the daemon")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("set the auto shutdown timeout of the daemon")
|
||||
},
|
||||
{.name = NULL}
|
||||
static const vshCmdInfo info_daemon_timeout = {
|
||||
.help = N_("set the auto shutdown timeout of the daemon"),
|
||||
.desc = N_("set the auto shutdown timeout of the daemon"),
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_daemon_log_outputs[] = {
|
||||
@ -1266,8 +1191,7 @@ vshAdmUsage(void)
|
||||
cmd->flags & VSH_CMD_FLAG_HIDDEN)
|
||||
continue;
|
||||
fprintf(stdout,
|
||||
" %-30s %s\n", cmd->name,
|
||||
_(vshCmddefGetInfo(cmd, "help")));
|
||||
" %-30s %s\n", cmd->name, _(cmd->info->help));
|
||||
}
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
@ -1409,19 +1333,19 @@ static const vshCmdDef vshAdmCmds[] = {
|
||||
{.name = "uri",
|
||||
.handler = cmdURI,
|
||||
.opts = NULL,
|
||||
.info = info_uri,
|
||||
.info = &info_uri,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "version",
|
||||
.handler = cmdVersion,
|
||||
.opts = NULL,
|
||||
.info = info_version,
|
||||
.info = &info_version,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "connect",
|
||||
.handler = cmdConnect,
|
||||
.opts = opts_connect,
|
||||
.info = info_connect,
|
||||
.info = &info_connect,
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT
|
||||
},
|
||||
{.name = NULL}
|
||||
@ -1434,7 +1358,7 @@ static const vshCmdDef monitoringCmds[] = {
|
||||
{.name = "server-list",
|
||||
.handler = cmdSrvList,
|
||||
.opts = NULL,
|
||||
.info = info_srv_list,
|
||||
.info = &info_srv_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "srv-threadpool-info",
|
||||
@ -1443,7 +1367,7 @@ static const vshCmdDef monitoringCmds[] = {
|
||||
{.name = "server-threadpool-info",
|
||||
.handler = cmdSrvThreadpoolInfo,
|
||||
.opts = opts_srv_threadpool_info,
|
||||
.info = info_srv_threadpool_info,
|
||||
.info = &info_srv_threadpool_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "srv-clients-list",
|
||||
@ -1452,13 +1376,13 @@ static const vshCmdDef monitoringCmds[] = {
|
||||
{.name = "client-list",
|
||||
.handler = cmdSrvClientsList,
|
||||
.opts = opts_srv_clients_list,
|
||||
.info = info_srv_clients_list,
|
||||
.info = &info_srv_clients_list,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "client-info",
|
||||
.handler = cmdClientInfo,
|
||||
.opts = opts_client_info,
|
||||
.info = info_client_info,
|
||||
.info = &info_client_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "srv-clients-info",
|
||||
@ -1467,7 +1391,7 @@ static const vshCmdDef monitoringCmds[] = {
|
||||
{.name = "server-clients-info",
|
||||
.handler = cmdSrvClientsInfo,
|
||||
.opts = opts_srv_clients_info,
|
||||
.info = info_srv_clients_info,
|
||||
.info = &info_srv_clients_info,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
@ -1480,13 +1404,13 @@ static const vshCmdDef managementCmds[] = {
|
||||
{.name = "server-threadpool-set",
|
||||
.handler = cmdSrvThreadpoolSet,
|
||||
.opts = opts_srv_threadpool_set,
|
||||
.info = info_srv_threadpool_set,
|
||||
.info = &info_srv_threadpool_set,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "client-disconnect",
|
||||
.handler = cmdClientDisconnect,
|
||||
.opts = opts_client_disconnect,
|
||||
.info = info_client_disconnect,
|
||||
.info = &info_client_disconnect,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "srv-clients-set",
|
||||
@ -1495,7 +1419,7 @@ static const vshCmdDef managementCmds[] = {
|
||||
{.name = "server-clients-set",
|
||||
.handler = cmdSrvClientsSet,
|
||||
.opts = opts_srv_clients_set,
|
||||
.info = info_srv_clients_set,
|
||||
.info = &info_srv_clients_set,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "srv-update-tls",
|
||||
@ -1504,25 +1428,25 @@ static const vshCmdDef managementCmds[] = {
|
||||
{.name = "server-update-tls",
|
||||
.handler = cmdSrvUpdateTlsFiles,
|
||||
.opts = opts_srv_update_tls_file,
|
||||
.info = info_srv_update_tls_file,
|
||||
.info = &info_srv_update_tls_file,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "daemon-log-filters",
|
||||
.handler = cmdDaemonLogFilters,
|
||||
.opts = opts_daemon_log_filters,
|
||||
.info = info_daemon_log_filters,
|
||||
.info = &info_daemon_log_filters,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "daemon-log-outputs",
|
||||
.handler = cmdDaemonLogOutputs,
|
||||
.opts = opts_daemon_log_outputs,
|
||||
.info = info_daemon_log_outputs,
|
||||
.info = &info_daemon_log_outputs,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = "daemon-timeout",
|
||||
.handler = cmdDaemonTimeout,
|
||||
.opts = opts_daemon_timeout,
|
||||
.info = info_daemon_timeout,
|
||||
.info = &info_daemon_timeout,
|
||||
.flags = 0
|
||||
},
|
||||
{.name = NULL}
|
||||
|
113
tools/vsh.c
113
tools/vsh.c
@ -239,22 +239,6 @@ vshReportError(vshControl *ctl)
|
||||
*/
|
||||
static int disconnected; /* we may have been disconnected */
|
||||
|
||||
/* ---------------
|
||||
* Utils for work with command definition
|
||||
* ---------------
|
||||
*/
|
||||
const char *
|
||||
vshCmddefGetInfo(const vshCmdDef * cmd, const char *name)
|
||||
{
|
||||
const vshCmdInfo *info;
|
||||
|
||||
for (info = cmd->info; info && info->name; info++) {
|
||||
if (STREQ(info->name, name))
|
||||
return info->data;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Check if the internal command definitions are correct.
|
||||
* None of the errors are to be marked as translatable. */
|
||||
static int
|
||||
@ -263,7 +247,6 @@ vshCmddefCheckInternals(vshControl *ctl,
|
||||
bool missingCompleters)
|
||||
{
|
||||
size_t i;
|
||||
const char *help = NULL;
|
||||
bool seenOptionalOption = false;
|
||||
g_auto(virBuffer) complbuf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
@ -308,7 +291,7 @@ vshCmddefCheckInternals(vshControl *ctl,
|
||||
}
|
||||
|
||||
/* Each command has to provide a non-empty help string. */
|
||||
if (!(help = vshCmddefGetInfo(cmd, "help")) || !*help) {
|
||||
if (!cmd->info || !cmd->info->help || !*cmd->info->help) {
|
||||
vshError(ctl, "command '%s' lacks help", cmd->name);
|
||||
return -1;
|
||||
}
|
||||
@ -627,8 +610,7 @@ vshCmdGrpHelp(vshControl *ctl, const vshCmdGrp *grp)
|
||||
if (cmd->alias ||
|
||||
cmd->flags & VSH_CMD_FLAG_HIDDEN)
|
||||
continue;
|
||||
vshPrint(ctl, " %-30s %s\n", cmd->name,
|
||||
_(vshCmddefGetInfo(cmd, "help")));
|
||||
vshPrint(ctl, " %-30s %s\n", cmd->name, _(cmd->info->help));
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -637,13 +619,11 @@ vshCmdGrpHelp(vshControl *ctl, const vshCmdGrp *grp)
|
||||
static bool
|
||||
vshCmddefHelp(const vshCmdDef *def)
|
||||
{
|
||||
const char *desc = NULL;
|
||||
char buf[256];
|
||||
bool shortopt = false; /* true if 'arg' works instead of '--opt arg' */
|
||||
|
||||
fputs(_(" NAME\n"), stdout);
|
||||
fprintf(stdout, " %s - %s\n", def->name,
|
||||
_(vshCmddefGetInfo(def, "help")));
|
||||
fprintf(stdout, " %s - %s\n", def->name, _(def->info->help));
|
||||
|
||||
fputs(_("\n SYNOPSIS\n"), stdout);
|
||||
fprintf(stdout, " %s", def->name);
|
||||
@ -695,11 +675,10 @@ vshCmddefHelp(const vshCmdDef *def)
|
||||
}
|
||||
fputc('\n', stdout);
|
||||
|
||||
desc = vshCmddefGetInfo(def, "desc");
|
||||
if (desc && *desc) {
|
||||
if (def->info->desc && *def->info->desc) {
|
||||
/* Print the description only if it's not empty. */
|
||||
fputs(_("\n DESCRIPTION\n"), stdout);
|
||||
fprintf(stdout, " %s\n", _(desc));
|
||||
fprintf(stdout, " %s\n", _(def->info->desc));
|
||||
}
|
||||
|
||||
if (def->opts && def->opts->name) {
|
||||
@ -3114,15 +3093,10 @@ const vshCmdOptDef opts_help[] = {
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
const vshCmdInfo info_help[] = {
|
||||
{.name = "help",
|
||||
.data = N_("print help")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Prints global help, command specific help, or help for a\n"
|
||||
" group of related commands")
|
||||
},
|
||||
{.name = NULL}
|
||||
const vshCmdInfo info_help = {
|
||||
.help = N_("print help"),
|
||||
.desc = N_("Prints global help, command specific help, or help for a\n"
|
||||
" group of related commands"),
|
||||
};
|
||||
|
||||
bool
|
||||
@ -3143,8 +3117,7 @@ cmdHelp(vshControl *ctl, const vshCmd *cmd)
|
||||
if (def->alias ||
|
||||
def->flags & VSH_CMD_FLAG_HIDDEN)
|
||||
continue;
|
||||
vshPrint(ctl, " %-30s %s\n", def->name,
|
||||
_(vshCmddefGetInfo(def, "help")));
|
||||
vshPrint(ctl, " %-30s %s\n", def->name, _(def->info->help));
|
||||
}
|
||||
|
||||
vshPrint(ctl, "\n");
|
||||
@ -3176,14 +3149,9 @@ const vshCmdOptDef opts_cd[] = {
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
const vshCmdInfo info_cd[] = {
|
||||
{.name = "help",
|
||||
.data = N_("change the current directory")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Change the current directory.")
|
||||
},
|
||||
{.name = NULL}
|
||||
const vshCmdInfo info_cd = {
|
||||
.help = N_("change the current directory"),
|
||||
.desc = N_("Change the current directory."),
|
||||
};
|
||||
|
||||
bool
|
||||
@ -3243,14 +3211,9 @@ const vshCmdOptDef opts_echo[] = {
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
const vshCmdInfo info_echo[] = {
|
||||
{.name = "help",
|
||||
.data = N_("echo arguments. Used for internal testing.")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Echo back arguments, possibly with quoting. Used for internal testing.")
|
||||
},
|
||||
{.name = NULL}
|
||||
const vshCmdInfo info_echo = {
|
||||
.help = N_("echo arguments. Used for internal testing."),
|
||||
.desc = N_("Echo back arguments, possibly with quoting. Used for internal testing."),
|
||||
};
|
||||
|
||||
/* Exists mainly for debugging virsh, but also handy for adding back
|
||||
@ -3305,14 +3268,9 @@ cmdEcho(vshControl *ctl, const vshCmd *cmd)
|
||||
return true;
|
||||
}
|
||||
|
||||
const vshCmdInfo info_pwd[] = {
|
||||
{.name = "help",
|
||||
.data = N_("print the current directory")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("Print the current directory.")
|
||||
},
|
||||
{.name = NULL}
|
||||
const vshCmdInfo info_pwd = {
|
||||
.help = N_("print the current directory"),
|
||||
.desc = N_("Print the current directory."),
|
||||
};
|
||||
|
||||
bool
|
||||
@ -3325,14 +3283,9 @@ cmdPwd(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
return true;
|
||||
}
|
||||
|
||||
const vshCmdInfo info_quit[] = {
|
||||
{.name = "help",
|
||||
.data = N_("quit this interactive terminal")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = ""
|
||||
},
|
||||
{.name = NULL}
|
||||
const vshCmdInfo info_quit = {
|
||||
.help = N_("quit this interactive terminal"),
|
||||
.desc = "",
|
||||
};
|
||||
|
||||
bool
|
||||
@ -3357,14 +3310,9 @@ const vshCmdOptDef opts_selftest[] = {
|
||||
},
|
||||
{.name = NULL}
|
||||
};
|
||||
const vshCmdInfo info_selftest[] = {
|
||||
{.name = "help",
|
||||
.data = N_("internal command for testing virt shells")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("internal use only")
|
||||
},
|
||||
{.name = NULL}
|
||||
const vshCmdInfo info_selftest = {
|
||||
.help = N_("internal command for testing virt shells"),
|
||||
.desc = N_("internal use only"),
|
||||
};
|
||||
|
||||
bool
|
||||
@ -3402,14 +3350,9 @@ const vshCmdOptDef opts_complete[] = {
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
const vshCmdInfo info_complete[] = {
|
||||
{.name = "help",
|
||||
.data = N_("internal command for autocompletion")
|
||||
},
|
||||
{.name = "desc",
|
||||
.data = N_("internal use only")
|
||||
},
|
||||
{.name = NULL}
|
||||
const vshCmdInfo info_complete = {
|
||||
.help = N_("internal command for autocompletion"),
|
||||
.desc = N_("internal use only"),
|
||||
};
|
||||
|
||||
|
||||
|
38
tools/vsh.h
38
tools/vsh.h
@ -119,15 +119,12 @@ typedef char **(*vshCompleter)(vshControl *ctl,
|
||||
unsigned int flags);
|
||||
|
||||
/*
|
||||
* vshCmdInfo -- name/value pair for information about command
|
||||
*
|
||||
* Commands should have at least the following names:
|
||||
* "help" - short description of command
|
||||
* "desc" - description of command, or empty string
|
||||
*/
|
||||
struct _vshCmdInfo {
|
||||
const char *name; /* name of information, or NULL for list end */
|
||||
const char *data; /* non-NULL information */
|
||||
const char *help; /* short description of command */
|
||||
const char *desc; /* description of command */
|
||||
};
|
||||
|
||||
/*
|
||||
@ -248,7 +245,6 @@ void vshOutputLogFile(vshControl *ctl, int log_level, const char *format,
|
||||
G_GNUC_PRINTF(3, 0);
|
||||
void vshCloseLogFile(vshControl *ctl);
|
||||
|
||||
const char *vshCmddefGetInfo(const vshCmdDef *cmd, const char *info);
|
||||
const vshCmdDef *vshCmddefSearch(const char *cmdname);
|
||||
const vshCmdGrp *vshCmdGrpSearch(const char *grpname);
|
||||
bool vshCmdGrpHelp(vshControl *ctl, const vshCmdGrp *grp);
|
||||
@ -375,17 +371,17 @@ int vshEventWait(vshControl *ctl);
|
||||
|
||||
/* generic commands */
|
||||
extern const vshCmdOptDef opts_help[];
|
||||
extern const vshCmdInfo info_help[];
|
||||
extern const vshCmdInfo info_help;
|
||||
extern const vshCmdOptDef opts_cd[];
|
||||
extern const vshCmdInfo info_cd[];
|
||||
extern const vshCmdInfo info_cd;
|
||||
extern const vshCmdOptDef opts_echo[];
|
||||
extern const vshCmdInfo info_echo[];
|
||||
extern const vshCmdInfo info_pwd[];
|
||||
extern const vshCmdInfo info_quit[];
|
||||
extern const vshCmdInfo info_echo;
|
||||
extern const vshCmdInfo info_pwd;
|
||||
extern const vshCmdInfo info_quit;
|
||||
extern const vshCmdOptDef opts_selftest[];
|
||||
extern const vshCmdInfo info_selftest[];
|
||||
extern const vshCmdInfo info_selftest;
|
||||
extern const vshCmdOptDef opts_complete[];
|
||||
extern const vshCmdInfo info_complete[];
|
||||
extern const vshCmdInfo info_complete;
|
||||
|
||||
bool cmdHelp(vshControl *ctl, const vshCmd *cmd);
|
||||
bool cmdCd(vshControl *ctl, const vshCmd *cmd);
|
||||
@ -400,7 +396,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "cd", \
|
||||
.handler = cmdCd, \
|
||||
.opts = opts_cd, \
|
||||
.info = info_cd, \
|
||||
.info = &info_cd, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT \
|
||||
}
|
||||
|
||||
@ -409,7 +405,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "echo", \
|
||||
.handler = cmdEcho, \
|
||||
.opts = opts_echo, \
|
||||
.info = info_echo, \
|
||||
.info = &info_echo, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT \
|
||||
}
|
||||
|
||||
@ -418,7 +414,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "exit", \
|
||||
.handler = cmdQuit, \
|
||||
.opts = NULL, \
|
||||
.info = info_quit, \
|
||||
.info = &info_quit, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT \
|
||||
}
|
||||
|
||||
@ -427,7 +423,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "help", \
|
||||
.handler = cmdHelp, \
|
||||
.opts = opts_help, \
|
||||
.info = info_help, \
|
||||
.info = &info_help, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT \
|
||||
}
|
||||
|
||||
@ -436,7 +432,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "pwd", \
|
||||
.handler = cmdPwd, \
|
||||
.opts = NULL, \
|
||||
.info = info_pwd, \
|
||||
.info = &info_pwd, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT \
|
||||
}
|
||||
|
||||
@ -445,7 +441,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "quit", \
|
||||
.handler = cmdQuit, \
|
||||
.opts = NULL, \
|
||||
.info = info_quit, \
|
||||
.info = &info_quit, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT \
|
||||
}
|
||||
|
||||
@ -454,7 +450,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "self-test", \
|
||||
.handler = cmdSelfTest, \
|
||||
.opts = opts_selftest, \
|
||||
.info = info_selftest, \
|
||||
.info = &info_selftest, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT | VSH_CMD_FLAG_HIDDEN, \
|
||||
}
|
||||
|
||||
@ -463,7 +459,7 @@ bool cmdComplete(vshControl *ctl, const vshCmd *cmd);
|
||||
.name = "complete", \
|
||||
.handler = cmdComplete, \
|
||||
.opts = opts_complete, \
|
||||
.info = info_complete, \
|
||||
.info = &info_complete, \
|
||||
.flags = VSH_CMD_FLAG_NOCONNECT | VSH_CMD_FLAG_HIDDEN, \
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user