[jenkins-ci PATCH 1/2] quayadmin: Fix endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <abologna@xxxxxxxxxx>
---
 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):
 
 
 def run_list_tags(config, args):
-    endpoint = "/repository/{}/{}/tag".format(args.namespace, args.repo)
+    endpoint = "/repository/{}/{}/tag/".format(args.namespace, args.repo)
     params = {
         "onlyActiveTags": True,
         "limit": 100,
@@ -201,7 +201,7 @@ def run_list_tags(config, args):
 
 
 def run_show_tag(config, args):
-    endpoint = "/repository/{}/{}/tag".format(args.namespace, args.repo)
+    endpoint = "/repository/{}/{}/tag/".format(args.namespace, args.repo)
     params = {
         "onlyActiveTags": True,
         "limit": 100,
@@ -279,7 +279,7 @@ def run_delete_tag(config, args):
 
 
 def run_list_builds(config, args):
-    endpoint = "/repository/{}/{}/build".format(args.namespace, args.repo)
+    endpoint = "/repository/{}/{}/build/".format(args.namespace, args.repo)
 
     res = get(config, endpoint, debug=args.debug)
 
@@ -319,7 +319,7 @@ def run_show_build(config, args):
 
 
 def run_list_triggers(config, args):
-    endpoint = "/repository/{}/{}/trigger".format(args.namespace, args.repo)
+    endpoint = "/repository/{}/{}/trigger/".format(args.namespace, args.repo)
 
     res = get(config, endpoint, debug=args.debug)
 
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux