The flag was replaced by the 'required' field in the option definition.
Remove last few uses and all assignments.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainInterfaceCompleter,
.help = N_("interface device (MAC Address)")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainInterfaceCompleter,
.help = N_("interface device specified by name or MAC Address")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ | VSH_OFLAG_EMPTY_OK,
+ .flags = VSH_OFLAG_EMPTY_OK,
.help = N_("source of disk device or name of network disk")
},
{.name = "target",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("target of disk device")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("network interface type")
},
{.name = "source",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("source of network interface")
},
{.name = "target",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("block device")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("fully-qualified path of disk")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("fully-qualified path of source disk")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("fully-qualified path of disk")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("fully-qualified path of disk")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("Fully-qualified path of block device")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainInterfaceCompleter,
.help = N_("interface device (MAC Address)")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainInterfaceStateCompleter,
.help = N_("new state of the device")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainInterfaceCompleter,
.help = N_("interface device (MAC Address)")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshNodeSuspendTargetCompleter,
.help = N_("mem(Suspend-to-RAM), "
"disk(Suspend-to-Disk), "
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("where to save the data")
},
{.name = "bypass-cache",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("saved state file to read")
},
{.name = "security-info",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("saved state file to modify")
},
{.name = "xml",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompletePathLocalExisting,
.help = N_("filename containing updated XML for the target")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("saved state file to edit")
},
{.name = "running",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompletePathLocalExisting,
.help = N_("filename containing updated XML for the target")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("the state to restore")
},
{.name = "bypass-cache",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("where to dump the core")
},
VIRSH_COMMON_OPT_LIVE(N_("perform a live core dump if supported")),
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainLifecycleCompleter,
.help = N_("lifecycle type to modify")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainLifecycleActionCompleter,
.help = N_("lifecycle action to set")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("the username")
},
{.name = "password",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("the new password")
},
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("number of virtual CPUs")
},
{.name = "maximum",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainVcpulistCompleter,
.help = N_("ids of vcpus to manipulate")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("device to set threshold for")
},
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("threshold as a scaled number (by default bytes)")
},
{.name = NULL}
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainIOThreadIdCompleter,
.help = N_("IOThread ID number")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainCpulistCompleter,
.help = N_("host cpu number(s) to set")
},
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("iothread for the new IOThread")
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainIOThreadIdCompleter,
.help = N_("iothread id of existing IOThread")
},
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainIOThreadIdCompleter,
.help = N_("iothread_id for the IOThread to delete")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("URI of the namespace")
},
VIRSH_COMMON_OPT_LIVE(N_("modify/get running state")),
{.name = "keycode",
.type = VSH_OT_ARGV,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshKeycodeNameCompleter,
.help = N_("the key code")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("the process ID")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainSignalCompleter,
.help = N_("the signal number or name")
},
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("new memory size, as scaled integer (default KiB)")
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("new maximum memory size, as scaled integer (default KiB)")
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("name of the FD group")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("file descriptors N,M,... to associate")
},
{.name = "cmd",
.type = VSH_OT_ARGV,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("command")
},
{.name = NULL}
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("pid")
},
{.name = "cmd",
.type = VSH_OT_ARGV,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("command")
},
{.name = NULL}
{.name = "cmd",
.type = VSH_OT_ARGV,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("command to run")
},
{.name = NULL}
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("source config data format")
},
{.name = "config",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompletePathLocalExisting,
.help = N_("config data file to import from")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("target config data type format")
},
VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(VSH_OFLAG_REQ_OPT, 0),
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainUUIDCompleter,
.help = N_("domain id or uuid")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("new domain name")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("connection URI of the destination host as seen from the client(normal migration) or source(p2p migration)")
},
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("maximum tolerable downtime (in milliseconds) for migration")
},
{.name = NULL}
.type = VSH_OT_INT,
.required = true,
.positional = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("migration bandwidth limit in MiB/s")
},
{.name = "postcopy",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDeviceAliasCompleter,
.help = N_("device alias")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("network interface type")
},
{.name = "mac",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("target of disk device")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshDomainDiskTargetCompleter,
.help = N_("Fully-qualified path or target of disk device")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("user to list authorized keys for"),
},
{.name = NULL}
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("user to set authorized keys for"),
},
{.name = "file",
.type = VSH_OT_INT,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshAllocpagesPagesizeCompleter,
.help = N_("page size (in kibibytes)")
},
.type = VSH_OT_INT,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("page count")
},
{.name = "cellno",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshNodeSuspendTargetCompleter,
.help = N_("mem(Suspend-to-RAM), disk(Suspend-to-Disk), "
"hybrid(Hybrid-Suspend)")
.type = VSH_OT_INT,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("Suspend duration in seconds, at least 60")
},
{.name = NULL}
.positional = true,
.required = true,
.completer = virshArchCompleter,
- .flags = VSH_OFLAG_REQ,
.help = N_("architecture")
},
{.name = NULL}
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.help = N_("interface name or MAC address"), \
.completer = virshInterfaceNameCompleter, \
.completer_flags = cflags, \
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshInterfaceMacCompleter,
.help = N_("interface mac")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshInterfaceNameCompleter,
.help = N_("interface name")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshInterfaceNameCompleter,
.help = N_("existing interface name")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("new bridge device name")
},
{.name = "no-stp",
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("current bridge device name")
},
{.name = "no-start",
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.help = _helpstr, \
.completer = virshNetworkNameCompleter, \
.completer_flags = cflags, \
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.help = N_("port UUID"), \
.completer = virshNetworkPortUUIDCompleter, \
.completer_flags = cflags, \
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("URI of the namespace")
},
VIRSH_COMMON_OPT_LIVE(N_("modify/get running state")),
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshNetworkUUIDCompleter,
.help = N_("network uuid")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshNetworkUpdateCommandCompleter,
.help = N_("type of update (add-first, add-last (add), delete, or modify)")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshNetworkUpdateSectionCompleter,
.help = N_("which section of network configuration to update")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompletePathLocalExisting,
.help = N_("name of file containing xml (or, if it starts with '<', the complete "
"xml element itself) to add/modify, or to be matched for search")
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device name or wwn pair in 'wwnn,wwpn' format"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device name or wwn pair in 'wwnn,wwpn' format"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device key"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device key"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device key"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device name or wwn pair in 'wwnn,wwpn' format"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device name"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device name or wwn pair in 'wwnn,wwpn' format"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device name or wwn pair in 'wwnn,wwpn' format"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("device name or wwn pair in 'wwnn,wwpn' format"),
.completer = virshNodeDeviceNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("network filter name or uuid"),
.completer = virshNWFilterNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("network filter name or uuid"),
.completer = virshNWFilterNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("network filter name or uuid"),
.completer = virshNWFilterNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("network filter binding port dev"),
.completer = virshNWFilterBindingNameCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("network filter binding portdev"),
.completer = virshNWFilterBindingNameCompleter,
},
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.completer = virshCompleteEmpty, \
.help = N_("name of the pool") \
}, \
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.completer = virshPoolTypeCompleter, \
.help = N_("type of the pool") \
}, \
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshPoolTypeCompleter,
.help = N_("type of storage pool sources to find")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshPoolTypeCompleter,
.help = N_("type of storage pool sources to discover")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("secret UUID"),
.completer = virshSecretUUIDCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("secret UUID"),
.completer = virshSecretUUIDCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("secret UUID"),
.completer = virshSecretUUIDCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("secret UUID"),
.completer = virshSecretUUIDCompleter,
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("snapshot name"),
.completer = virshSnapshotNameCompleter,
},
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.help = _helpstr, \
.completer = virshStorageVolNameCompleter, \
}
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.help = _helpstr, \
.completer = virshStorageVolKeyCompleter, \
}
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("name of the volume")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("size of the vol, as scaled integer (default bytes)")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("clone name")
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = virshCompleteEmpty,
.help = N_("new capacity for the vol, as scaled integer (default bytes)")
},
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.help = _helpstr, \
.completer = virshStoragePoolNameCompleter, \
.completer_flags = cflags, \
.type = VSH_OT_STRING, \
.positional = true, \
.required = true, \
- .flags = VSH_OFLAG_REQ, \
.help = _helpstr, \
.completer = virshDomainNameCompleter, \
.completer_flags = cflags, \
.type = VSH_OT_STRING, \
.required = required_, \
.positional = required_, \
- .flags = required_ ? VSH_OFLAG_REQ : VSH_OFLAG_NONE, \
.completer = virshCompletePathLocalExisting, \
.help = _helpstr \
}
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = vshAdmServerCompleter,
.help = N_("Server to retrieve threadpool attributes from."),
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = vshAdmServerCompleter,
.help = N_("Server to alter threadpool attributes on."),
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = vshAdmServerCompleter,
.help = N_("server which to list connected clients from"),
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = vshAdmServerCompleter,
.help = N_("server to which <client> is connected to"),
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("client which to retrieve identity information for"),
},
{.name = NULL}
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = vshAdmServerCompleter,
.help = N_("server which the client is currently connected to"),
},
.type = VSH_OT_INT,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("client which to disconnect, specified by ID"),
},
{.name = NULL}
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = vshAdmServerCompleter,
.help = N_("Server to retrieve the client limits from."),
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.completer = vshAdmServerCompleter,
.help = N_("Server to alter the client-related configuration limits on."),
},
.type = VSH_OT_STRING,
.positional = true,
.required = true,
- .flags = VSH_OFLAG_REQ,
.help = N_("Available servers on a daemon. "
"Currently only supports 'libvirtd' or 'virtproxyd'.")
},
.type = VSH_OT_INT,
.required = true,
.help = N_("number of seconds the daemon will run without any active connection"),
- .flags = VSH_OFLAG_REQ | VSH_OFLAG_REQ_OPT
+ .flags = VSH_OFLAG_REQ_OPT
},
{.name = NULL}
};
return -1;
}
- if (opt->flags & VSH_OFLAG_REQ) {
- vshError(ctl, "parameter '%s' of command '%s' misused VSH_OFLAG_REQ",
+ if (opt->required) {
+ vshError(ctl, "parameter '%s' of command '%s' misused 'required' flag",
opt->name, cmd->name);
return -1; /* bool can't be mandatory */
}
if (!(opt->flags & VSH_OFLAG_REQ_OPT))
*opts_need_arg |= 1ULL << i;
- if (opt->flags & VSH_OFLAG_REQ)
+ if (opt->required)
*opts_required |= 1ULL << i;
}
}
if (!cmd->skipChecks)
assert(valid && (!needData || valid->type != VSH_OT_BOOL));
- if (valid && valid->flags & VSH_OFLAG_REQ)
+ if (valid && valid->required)
ret = -1;
/* See if option is present on command line. */
*/
enum {
VSH_OFLAG_NONE = 0, /* without flags */
- VSH_OFLAG_REQ = (1 << 0), /* option required */
VSH_OFLAG_EMPTY_OK = (1 << 1), /* empty string option allowed */
VSH_OFLAG_REQ_OPT = (1 << 2), /* --optionname required */
};