Revision 2afd577f

b/lib/client/gnt_node.py
232 232

  
233 233
  return GenericList(constants.QR_NODE, selected_fields, args, opts.units,
234 234
                     opts.separator, not opts.no_headers,
235
                     format_override=fmtoverride, verbose=opts.verbose)
235
                     format_override=fmtoverride, verbose=opts.verbose,
236
                     force_filter=opts.force_filter)
236 237

  
237 238

  
238 239
def ListNodeFields(opts, args):
......
835 836
    "[<node_name>...]", "Show information about the node(s)"),
836 837
  'list': (
837 838
    ListNodes, ARGS_MANY_NODES,
838
    [NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, VERBOSE_OPT],
839
    [NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, VERBOSE_OPT,
840
     FORCE_FILTER_OPT],
839 841
    "[nodes...]",
840 842
    "Lists the nodes in the cluster. The available fields can be shown using"
841 843
    " the \"list-fields\" command (see the man page for details)."
b/man/gnt-node.rst
150 150
| **list**
151 151
| [--no-headers] [--separator=*SEPARATOR*]
152 152
| [--units=*UNITS*] [-v] [-o *[+]FIELD,...*]
153
| [--filter]
153 154
| [node...]
154 155

  
155 156
Lists the nodes in the cluster.
......
182 183
see the default list plus a few other fields, instead of retyping
183 184
the entire list of fields.
184 185

  
185
Note that some of this fields are known from the configuration of
186
the cluster (e.g. name, pinst, sinst, pip, sip and thus the master
187
does not need to contact the node for this data (making the listing
188
fast if only fields from this set are selected), whereas the other
189
fields are "live" fields and we need to make a query to the cluster
190
nodes.
191

  
192
Depending on the virtualization type and implementation details,
193
the mtotal, mnode and mfree may have slighly varying meanings. For
194
example, some solutions share the node memory with the pool of
195
memory used for instances (KVM), whereas others have separate
186
Note that some of these fields are known from the configuration of the
187
cluster (e.g. ``name``, ``pinst``, ``sinst``, ``pip``, ``sip``) and thus
188
the master does not need to contact the node for this data (making the
189
listing fast if only fields from this set are selected), whereas the
190
other fields are "live" fields and require a query to the cluster nodes.
191

  
192
Depending on the virtualization type and implementation details, the
193
``mtotal``, ``mnode`` and ``mfree`` fields may have slighly varying
194
meanings. For example, some solutions share the node memory with the
195
pool of memory used for instances (KVM), whereas others have separate
196 196
memory for the node and for the instances (Xen).
197 197

  
198
If exactly one argument is given and it appears to be a query filter
199
(see **ganeti(7)**), the query result is filtered accordingly. For
200
ambiguous cases (e.g. a single field name as a filter) the ``--filter``
201
(``-F``) option forces the argument to be treated as a filter (e.g.
202
``gnt-node list -F master_candidate``).
203

  
198 204
If no node names are given, then all nodes are queried. Otherwise,
199 205
only the given nodes will be listed.
200 206

  

Also available in: Unified diff