reporting/spacewalk-report | 6 ++++++
reporting/spacewalk-report.sgml | 10 ++++++++++
2 files changed, 16 insertions(+)
New commits:
commit 06bfa472ca81c21d07e1d5de97fbbf78995b7ea0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Aug 8 15:55:06 2011 +0200
Add the --where-<column-id> option to help and man page.
diff --git a/reporting/spacewalk-report b/reporting/spacewalk-report
index 583e615..333b443 100755
--- a/reporting/spacewalk-report
+++ b/reporting/spacewalk-report
@@ -63,6 +63,9 @@ def processCommandline():
Option('--list-fields-info', action='store_true',
dest='listfieldsinfo',
help='as --list-fields but also prints description for each column'),
+ Option('--where-<column-id>', action='store',
metavar='VALUE',
+ dest='_where_trap',
+ help='limit the output to records where column-id has value VALUE'),
]
optionParser = OptionParser( \
@@ -89,6 +92,9 @@ def processCommandline():
del sys.argv[i]
i -= 2
+ if k == '<column-id>':
+ optionParser.error('use actual column-id in the --where-<column-id>
parameter')
+
k = k.replace('-', '_')
if where.has_key(k):
where[k].append(v)
diff --git a/reporting/spacewalk-report.sgml b/reporting/spacewalk-report.sgml
index c48b70a..d9be02b 100644
--- a/reporting/spacewalk-report.sgml
+++ b/reporting/spacewalk-report.sgml
@@ -114,6 +114,16 @@ Generate reports from Spacewalk server in csv format
that field.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+
<term>--where-<replaceable>column-id</replaceable>=<replaceable>VALUE</replaceable></term>
+ <listitem>
+ <para>Limit the output to records where column-id has value
+ VALUE. It can be used multiple times -- for the same column
+ it will select records where the column has any of the
+ VALUEs. When different columns are specified, all of them
+ have to meet the condition.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</RefSect1>
Show replies by date