From nobody Fri Dec 19 19:16:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1563371429; cv=none; d=zoho.com; s=zohoarc; b=UXYmBw3R9aH7SOmFk15g7JtYwK40xQlzt5oxXsjUmdO/f/rsoeeN/psF6gVT8IqCPPTY4PM/E723HqEqhMAkE8AsP35e1+kJIQhwhuNWJSo4JB50ryPWZGqmagfL32zEb2fSLvGkrlsB37ZpQ/912sJHvLwaH2ijjIouscmz/lc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563371429; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Fim04ZESdQ1xrWd7arZcdyEna5lAZm/eHPWOm9Aky/o=; b=KSezWOarmA/9kS/9DFW/KZfdk2D50qiw1baHhzgN9UC+GFT6NwrqU2e2bQLrQfybBjgp6fhn2p9CDYJLwNWtEafsIsCjmQRyCJz85OX/WDQdke2gyl7WV3UiavWQBAe4tf7SIWemF9EAr4vxbw9KtFINJevxXZizg2ruR5Pk1yM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1563371429779647.8783165310151; Wed, 17 Jul 2019 06:50:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25FEA308FBAC; Wed, 17 Jul 2019 13:50:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE9D1614C3; Wed, 17 Jul 2019 13:50:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A6AC41800206; Wed, 17 Jul 2019 13:50:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6HDoPcr025847 for ; Wed, 17 Jul 2019 09:50:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id E790717A75; Wed, 17 Jul 2019 13:50:25 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6DA02614C3 for ; Wed, 17 Jul 2019 13:50:13 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 17 Jul 2019 15:49:24 +0200 Message-Id: <20190717134929.10540-16-abologna@redhat.com> In-Reply-To: <20190717134929.10540-1-abologna@redhat.com> References: <20190717134929.10540-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v2 15/20] quayadmin: Add list-builds command X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 17 Jul 2019 13:50:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/quayadmin | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/guests/quayadmin b/guests/quayadmin index 465cd8d..c2ea2b7 100755 --- a/guests/quayadmin +++ b/guests/quayadmin @@ -180,6 +180,22 @@ def run_delete_repo(config, args): print("Repository {}/{} deleted".format(args.namespace, args.repo)) =20 =20 +def run_list_builds(config, args): + endpoint =3D "/repository/{}/{}/build".format(args.namespace, args.rep= o) + + res =3D get(config, endpoint, debug=3Dargs.debug) + + if has_error(args.quiet, res, 200, + "Cannot list builds for repository {}/{}" + .format(args.namespace, args.repo)): + return 1 + + info =3D res.json() + + for build in info["builds"]: + print(build["id"]) + + def run_list_triggers(config, args): endpoint =3D "/repository/{}/{}/trigger".format(args.namespace, args.r= epo) =20 @@ -301,6 +317,15 @@ def build_parser_delete_repo(subparser): add_arg_repo(parser) =20 =20 +def build_parser_list_builds(subparser): + parser =3D subparser.add_parser("list-builds", help=3D"List repository= builds") + + parser.set_defaults(func=3Drun_list_builds) + + add_arg_namespace(parser) + add_arg_repo(parser) + + def build_parser_list_triggers(subparser): parser =3D subparser.add_parser("list-triggers", help=3D"List reposito= ry triggers") =20 @@ -347,6 +372,8 @@ def build_parser(): build_parser_create_repo(subparser) build_parser_delete_repo(subparser) =20 + build_parser_list_builds(subparser) + build_parser_list_triggers(subparser) build_parser_show_trigger(subparser) build_parser_activate_trigger(subparser) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list