.help = N_("source of network interface")
},
{.name = "target",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("target network name")
},
{.name = "mac",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("MAC address")
},
{.name = "script",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("script used to bridge network interface")
},
{.name = "model",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("model type")
},
{.name = "inbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's incoming traffics")
},
{.name = "outbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's outgoing traffics")
},
{.name = "persistent",
.help = N_("bandwidth limit in MiB/s")
},
{.name = "base",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of base file to commit into (default bottom of chain)")
},
{.name = "shallow",
.help = N_("use backing file of top as base")
},
{.name = "top",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of top file to commit from (default top of chain)")
},
{.name = "active",
.help = N_("fully-qualified path of source disk")
},
{.name = "dest",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of the copy to create")
},
{.name = "bandwidth",
.help = N_("with --wait, don't wait for cancel to finish")
},
{.name = "xml",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filename containing XML description of the copy destination")
},
{.name = "format",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("format of the destination file")
},
{.name = "granularity",
.help = N_("bandwidth limit in MiB/s")
},
{.name = "base",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of backing file in chain for a partial pull")
},
{.name = "wait",
.help = N_("interface device (MAC Address)")
},
{.name = "inbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's incoming traffics")
},
{.name = "outbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's outgoing traffics")
},
{.name = "config",
.help = N_("remove domain managed state file")
},
{.name = "storage",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("remove associated storage volumes (comma separated list of "
"targets or source paths) (see domblklist)")
},
.help = N_("dump domain's memory only")
},
{.name = "format",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("specify the format of memory-only dump")
},
{.name = NULL}
.help = N_("domain name, id or uuid")
},
{.name = "file",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("where to store the screenshot")
},
{.name = "screen",
.help = N_("vcpu number")
},
{.name = "cpulist",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("host cpu number(s) to set, or omit option to query")
},
.help = N_("domain name, id or uuid")
},
{.name = "cpulist",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("host cpu number(s) to set, or omit option to query")
},
.help = N_("use an editor to change the metadata")
},
{.name = "key",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("key to be used as a namespace identifier"),
},
{.name = "set",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("new metadata to set"),
},
{.name = "remove",
.help = N_("domain name, id or uuid")
},
{.name = "mode",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("NUMA mode, one of strict, preferred and interleave \n"
"or a number from the virDomainNumatuneMemMode enum")
},
{.name = "nodeset",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("NUMA node selections to set")
},
{.name = "config",
static const vshCmdOptDef opts_qemu_monitor_event[] = {
{.name = "domain",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filter by domain name, id or uuid")
},
{.name = "event",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filter by event name")
},
{.name = "pretty",
.help = N_("abort on soft errors during migration")
},
{.name = "migrateuri",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("migration URI, usually can be omitted")
},
{.name = "graphicsuri",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("graphics URI to be used for seamless graphics migration")
},
{.name = "listen-address",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("listen address that destination should bind to for incoming migration")
},
{.name = "dname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("rename to new name during migration (if supported)")
},
{.name = "timeout",
.help = N_("includes the password into the connection URI if available")
},
{.name = "type",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("select particular graphical display "
"(e.g. \"vnc\", \"spice\", \"rdp\")")
},
static const vshCmdOptDef opts_event[] = {
{.name = "domain",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filter by domain name, id, or uuid")
},
{.name = "event",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("which event type to wait for")
},
{.name = "all",
.help = N_("Fully-qualified path or target of disk device")
},
{.name = "source",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source of the media")
},
{.name = "eject",
"free ranges smaller than this (Bytes)")
},
{.name = "mountpoint",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("which mount point to trim")
},
{.name = NULL}
.help = N_("print XML document, but don't define/create")
},
{.name = "source-host",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source-host for underlying storage")
},
{.name = "source-path",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source path for underlying storage")
},
{.name = "source-dev",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source device for underlying storage")
},
{.name = "source-name",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source name for underlying storage")
},
{.name = "target",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("target for underlying storage")
},
{.name = "source-format",
.help = N_("type of storage pool sources to find")
},
{.name = "host",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional host to query")
},
{.name = "port",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional port to query")
},
{.name = "initiator",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional initiator IQN to use for query")
},
{.name = NULL}
.help = N_("type of storage pool sources to discover")
},
{.name = "srcSpec",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional file of source xml to query for pools")
},
{.name = NULL}
.help = N_("domain name, id or uuid")
},
{.name = "xmlfile",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("domain snapshot XML")
},
{.name = "redefine",
.help = N_("domain name, id or uuid")
},
{.name = "name",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("name of snapshot")
},
{.name = "description",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("description of snapshot")
},
{.name = "print-xml",
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
.help = N_("include security sensitive information in XML dump")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("name of existing snapshot to make current")
},
{.name = NULL}
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
.help = N_("list snapshots in a tree")
},
{.name = "from",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("limit list to children of given snapshot")
},
{.name = "current",
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("find parent of snapshot name")
},
{.name = "current",
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
static const vshCmdOptDef opts_connect[] = {
{.name = "name",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("hypervisor connection URI")
},
static const vshCmdOptDef opts_help[] = {
{.name = "command",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("Prints global help, command specific help, or help for a group of related commands")
},
{.name = NULL}
static const vshCmdOptDef opts_cd[] = {
{.name = "dir",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("directory to switch to (default: home or else root)")
},
{.name = NULL}
snprintf(buf, sizeof(buf), _("--%s <string>"), opt->name);
break;
case VSH_OT_DATA:
+ /* OT_DATA should always be VSH_OFLAG_REQ */
+ if (!(opt->flags & VSH_OFLAG_REQ)) {
+ vshError(ctl,
+ _("internal error: bad options in command: '%s'"),
+ def->name);
+ return false;
+ }
snprintf(buf, sizeof(buf), _("[--%s] <string>"),
opt->name);
break;