From nobody Sun Feb 8 14:20:44 2026 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=1565616973; cv=none; d=zoho.com; s=zohoarc; b=jLy1oqoChqHPaPv1jBxnsssfXTArnkZuzRYiGp3eZH8siFFPZVAw6gQH3i3RMmXQIKGtS/pIbwfJpT3tvigkTO8Ys7q2pRGg+Abzk3cjMfq/oqu4z19wf9TWIk9AHaP1dogwjNgSr+ci1pR8Rt/yrI0cbFjCx0/uDAmDbTcCrZA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565616973; 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=RUMDJyqKvqvRClF15NT0/gkAr77a9vwj4okO3M3u6EM=; b=AXu++zaXgXgoJGMQPQgF+QJbigXJoAYsqT8fyv4Plv+dhnM5Si9weUx+9/c5wvPCKs4/v3RZTSdYtVp5VuGY/b4im5RKHazPbPgm52SXsAPAXepCZfqP6CxxuqpC6yatx5jahJQ73J0M7ZRRrVZ0/tAXHwjAHUMWEDYkIulKJ5I= 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 1565616973698697.8435082897637; Mon, 12 Aug 2019 06:36:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3295A301E12B; Mon, 12 Aug 2019 13:36:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 053A571C87; Mon, 12 Aug 2019 13:36:12 +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 B663824F32; Mon, 12 Aug 2019 13:36:11 +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 x7CDa6T1021358 for ; Mon, 12 Aug 2019 09:36:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 850563849; Mon, 12 Aug 2019 13:36:06 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E5C260872 for ; Mon, 12 Aug 2019 13:36:05 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 12 Aug 2019 15:36:00 +0200 Message-Id: <20190812133601.1612-2-abologna@redhat.com> In-Reply-To: <20190812133601.1612-1-abologna@redhat.com> References: <20190812133601.1612-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 1/2] quayadmin: Fix endpoints 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 12 Aug 2019 13:36:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Some of the endpoints for the Quay API are documented[1] as ending with a slash, and as it turns out the slash being there is actually critical to proper operation: if you leave it out, some APIs will behave on POST as if you had performed a GET, which is extremely confusing and not at all what we want. [1] https://docs.quay.io/api/swagger/ Signed-off-by: Andrea Bolognani Reviewed-by: Fabiano Fid=C3=AAncio --- guests/quayadmin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guests/quayadmin b/guests/quayadmin index 36ce183..02be0f4 100755 --- a/guests/quayadmin +++ b/guests/quayadmin @@ -181,7 +181,7 @@ def run_delete_repo(config, args): =20 =20 def run_list_tags(config, args): - endpoint =3D "/repository/{}/{}/tag".format(args.namespace, args.repo) + endpoint =3D "/repository/{}/{}/tag/".format(args.namespace, args.repo) params =3D { "onlyActiveTags": True, "limit": 100, @@ -201,7 +201,7 @@ def run_list_tags(config, args): =20 =20 def run_show_tag(config, args): - endpoint =3D "/repository/{}/{}/tag".format(args.namespace, args.repo) + endpoint =3D "/repository/{}/{}/tag/".format(args.namespace, args.repo) params =3D { "onlyActiveTags": True, "limit": 100, @@ -279,7 +279,7 @@ def run_delete_tag(config, args): =20 =20 def run_list_builds(config, args): - endpoint =3D "/repository/{}/{}/build".format(args.namespace, args.rep= o) + endpoint =3D "/repository/{}/{}/build/".format(args.namespace, args.re= po) =20 res =3D get(config, endpoint, debug=3Dargs.debug) =20 @@ -319,7 +319,7 @@ def run_show_build(config, args): =20 =20 def run_list_triggers(config, args): - endpoint =3D "/repository/{}/{}/trigger".format(args.namespace, args.r= epo) + endpoint =3D "/repository/{}/{}/trigger/".format(args.namespace, args.= repo) =20 res =3D get(config, endpoint, debug=3Dargs.debug) =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Feb 8 14:20:44 2026 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=1565616970; cv=none; d=zoho.com; s=zohoarc; b=U/IeyDkrbql/E/gsANxWYaDdLyLqjgyGO1i9748ge064a3K77s8GJ2owLDh3fE7ejfMSRPg6pg5qXhgkhIoFBLHwb5aqogCF0U2cqfmAAY5C4r2XJuKG7DH0RxLLJ+4ilNUG8vtZzICr+7Qvygfn2lwiWquMLZLpt5Ga91hXKY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565616970; 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=zGyYHnQmBfabS8VQGxmd6RxwCUJNGq7hnxiHfeSEE+w=; b=AJV5gkCx+3dDf9oz0747UqKW3qETqBLYtFvoWL3HEwZds3qCo3TOh0eq36Ig+zKXBTbC8gcRHaGjp9zvlOGE31zo5gYBKbcYrltGg2admQ7rmczuCilILFpO1XviotTdtp2hMGsj6VVoo8wwiY8Dz48wlLxXyZpsxws/UzLcc7U= 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 1565616970704415.6018540181143; Mon, 12 Aug 2019 06:36:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5ADCAC004F49; Mon, 12 Aug 2019 13:36:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31E8419C70; Mon, 12 Aug 2019 13:36:09 +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 E71C124F30; Mon, 12 Aug 2019 13:36:08 +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 x7CDa7p1021365 for ; Mon, 12 Aug 2019 09:36:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4FF5717979; Mon, 12 Aug 2019 13:36:07 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CEC4E60872 for ; Mon, 12 Aug 2019 13:36:06 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 12 Aug 2019 15:36:01 +0200 Message-Id: <20190812133601.1612-3-abologna@redhat.com> In-Reply-To: <20190812133601.1612-1-abologna@redhat.com> References: <20190812133601.1612-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 2/2] quayadmin: Add create-build 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 12 Aug 2019 13:36:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: Fabiano Fid=C3=AAncio --- guests/quayadmin | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/guests/quayadmin b/guests/quayadmin index 02be0f4..8099d6a 100755 --- a/guests/quayadmin +++ b/guests/quayadmin @@ -318,6 +318,29 @@ def run_show_build(config, args): print(" started: {}".format(info["started"])) =20 =20 +def run_create_build(config, args): + endpoint =3D "/repository/{}/{}/build/".format(args.namespace, args.re= po) + payload =3D { + "archive_url": args.archive_url, + } + + res =3D post(config, endpoint, payload=3Dpayload, debug=3Dargs.debug) + + if has_error(args.quiet, res, 201, + "Cannot create build for repository {}/{}" + .format(args.namespace, args.repo)): + return 1 + + if args.quiet: + return 0 + + info =3D res.json() + + print("Build {} created in repository {}/{}".format(info["id"], + args.namespace, + args.repo)) + + def run_list_triggers(config, args): endpoint =3D "/repository/{}/{}/trigger/".format(args.namespace, args.= repo) =20 @@ -415,6 +438,10 @@ def add_arg_image(parser): parser.add_argument("image", help=3D"Image ID") =20 =20 +def add_arg_archive_url(parser): + parser.add_argument("archive_url", help=3D"Archive URL") + + def build_parser_list_repos(subparser): parser =3D subparser.add_parser("list-repos", help=3D"List container r= epositories") =20 @@ -510,6 +537,16 @@ def build_parser_show_build(subparser): add_arg_build(parser) =20 =20 +def build_parser_create_build(subparser): + parser =3D subparser.add_parser("create-build", help=3D"Create a new b= uild") + + parser.set_defaults(func=3Drun_create_build) + + add_arg_namespace(parser) + add_arg_repo(parser) + add_arg_archive_url(parser) + + def build_parser_list_triggers(subparser): parser =3D subparser.add_parser("list-triggers", help=3D"List reposito= ry triggers") =20 @@ -563,6 +600,7 @@ def build_parser(): =20 build_parser_list_builds(subparser) build_parser_show_build(subparser) + build_parser_create_build(subparser) =20 build_parser_list_triggers(subparser) build_parser_show_trigger(subparser) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list