diff --git a/man/ganeti.rst b/man/ganeti.rst index e4ff8516d3d8aa4b49ae78f8ea27b3dcbddb8a9c..a87f626f62e7830f769f3b7797131cc7c2b99d60 100644 --- a/man/ganeti.rst +++ b/man/ganeti.rst @@ -305,6 +305,30 @@ Perl. The language is not generic. Each condition must consist of a field name and a value (except for boolean checks), a field can not be compared to another field. Keywords are case-sensitive. +Examples (see below for syntax details): + +- List webservers:: + + gnt-instance list --filter 'name =* "web*.example.com"' + +- List instances with three or six virtual CPUs and whose primary + nodes reside in groups starting with the string "rack":: + + gnt-instance list --filter + '(be/vcpus == 3 or be/vcpus == 6) and pnode.group =~ m/^rack/' + +- Nodes hosting primary instances:: + + gnt-node list --filter 'pinst_cnt != 0' + +- Nodes which aren't master candidates:: + + gnt-node list --filter 'not master_candidate' + +- Short version for globbing patterns:: + + gnt-instance list '*.site1' '*.site2' + Syntax in pseudo-BNF:: <quoted-string> ::= /* String quoted with single or double quotes, @@ -365,9 +389,6 @@ Operators: *in*, *not in* Collection membership and negation -As a shortcut globbing patterns can be specified as names, e.g. -``gnt-instance list '*.site1' '*.site2'``. - Common daemon functionality ---------------------------