return GenericList(constants.QR_GROUP, desired_fields, args, None,
opts.separator, not opts.no_headers,
- format_override=fmtoverride, verbose=opts.verbose)
+ format_override=fmtoverride, verbose=opts.verbose,
+ force_filter=opts.force_filter)
def ListGroupFields(opts, args):
"<group_name> <node>...", "Assign nodes to a group"),
"list": (
ListGroups, ARGS_MANY_GROUPS,
- [NOHDR_OPT, SEP_OPT, FIELDS_OPT, VERBOSE_OPT],
+ [NOHDR_OPT, SEP_OPT, FIELDS_OPT, VERBOSE_OPT, FORCE_FILTER_OPT],
"[<group_name>...]",
"Lists the node groups in the cluster. The available fields can be shown"
" using the \"list-fields\" command (see the man page for details)."
~~~~
| **list** [--no-headers] [--separator=*SEPARATOR*] [-v]
-| [-o *[+]FIELD,...*] [group...]
+| [-o *[+]FIELD,...*] [--filter] [group...]
Lists all existing node groups in the cluster.
@QUERY_FIELDS_GROUP@
+If exactly one argument is given and it appears to be a query filter
+(see **ganeti(7)**), the query result is filtered accordingly. For
+ambiguous cases (e.g. a single field name as a filter) the ``--filter``
+(``-F``) option forces the argument to be treated as a filter.
+
If no group names are given, then all groups are included. Otherwise,
only the named groups will be listed.