.\"
.\" The "list" command description
.\"
-.SS \fBlist\fR [\-\-help] [\-\-regexp <regexp>] [\-\-processes <processes>]
+.SS \fBlist\fR [\-\-help] [\-\-processes <processes>]
.RS 2
List submissions in the following format:
Print short help text about the "list" command and exit.
.RE
-.PP
-.B \-\-regexp
-REGEXP
-.RS 2
-Use REGEXP to filter out submission project. Regexp is applied to OBS project name.
-Note, that regexp can also be specified in \fIrepa\fR configuration file.
-.RE
-
.PP
.B \-\-processes
PROCESSES
return 'ready'
-def list_submissions(obs, regexp, processes):
+def list_submissions(obs, target, processes):
"""List submissions and groups."""
# submissions
groups = []
for project, desc, build_results in \
- obs.get_projects('^%s.*%s' % (OBS_PROJECT_PREFIX, regexp),
+ obs.get_projects('^%s%s:submit' % (OBS_PROJECT_PREFIX, target),
processes):
meta = json.loads(desc)
if ':submitgroup:' in project:
Add arguments to the parser. Called from [sub_]main.
Set defaults for arguments from config.
"""
- parser.add_argument('-r', '--regexp', help='search regexp',
- default=config.get('list_regexp', '.*'))
parser.add_argument('--processes', type=int,
help='amount of parallel processes to use',
default=config.get('processes'))
def run(argv):
"""Command line entry point. Called from [sub_]main"""
obs = OBS(argv.apiurl, argv.apiuser, argv.apipasswd)
- return list_submissions(obs, argv.regexp, argv.processes)
+ return list_submissions(obs, argv.project, argv.processes)
if __name__ == '__main__':