.RS 2
10. \fBunlock\fR - unlock submission
.RE
+.RS 2
+11. \fBremove\fR - remove submission
+.RE
.\" ===========================================================================
.\" Global options
.RE
+.\"
+.\" The "remove" command description
+.\"
+.SS \fBremove\fR [options] <submision>
+
+.RS 2
+Remove submission by triggering 're' Jenkins job. 're' job remove prerelease OBS project.
+
+.\"
+.\" The "remove" command's options
+.\"
+.RS 2
+\fBOPTIONS\fR
+.RS 2
+.B \-h, \-\-help
+.RS 2
+Print short help text about the "remove" command and exit.
+.RE
+
+.PP
+.B \-c \-\-comment COMMENT
+.RS 2
+Provide a comment with the explanation of a reason for remove. This is mandatory option.
+.RE
+
+
.SH CONFIGURATION FILE
.RS 2
--- /dev/null
+#!/usr/bin/env python
+#
+# This file is part of REPA: Release Engineering Process Assistant.
+#
+# Copyright (C) 2015 Intel Corporation
+#
+# REPA is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# version 2 as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+"""
+REPA: Release Engineering Process Assistant.
+
+Copyright (C) Intel Corporation 2015
+Licence: GPL version 2
+Author: Ed Bartosh <eduard.bartosh@intel.com>
+
+Remove module.
+Remove submission.
+"""
+
+import sys
+
+from collections import namedtuple
+
+from repa.main import sub_main
+from repa.jenkins import trigger_build
+
+class Remove(object):
+ """Subcommand: remove submissions."""
+
+ name = 'remove'
+ description = 'Remove submission'
+ help = description
+
+ @staticmethod
+ def add_arguments(parser, _):
+ """Adds arguments to the parser. Called from [sub_]main."""
+ parser.add_argument('submission', help='submission')
+ parser.add_argument('-c', '--comment', help='comment', required=True)
+
+ @staticmethod
+ def run(argv):
+ """Command line entry point. Called from [sub_]main."""
+ job = 're'
+ cred = namedtuple('cred', ['url', 'username', 'password'])(\
+ argv.jenkins_url, argv.jenkins_user, argv.jenkins_passwd)
+ build, status, out = \
+ trigger_build(job, {'action': 'remove',
+ 'submission': argv.submission,
+ 'target_project': argv.project,
+ 'comment': argv.comment}, cred)
+ print "Jenkins job: %s, build #%s, status: %s" % (job, build, status)
+ print out
+ return status == 'SUCCESS'
+
+if __name__ == '__main__':
+ sys.exit(sub_main(sys.argv[1:], Remove()))