[libvirt] [jenkins-ci PATCH v2 05/20] quayadmin: Tweak list-repos output format

Andrea Bolognani posted 20 patches 6 years, 5 months ago
[libvirt] [jenkins-ci PATCH v2 05/20] quayadmin: Tweak list-repos output format
Posted by Andrea Bolognani 6 years, 5 months ago
We're going to introduce several other list-* commands later,
and we want their output to be more or less consistent, so
start by tweaking the existing command.

More specifically, we want the output of each list-* command
to be such that you can take one of the lines, append it to
the arguments you just used and by doing so obtain a valid
list of arguments for the corresponding show-* command, eg.

  $ quayadmin list-repos libvirt
  buildenv-debian-10
  $ quayadmin show-repo libvirt buildenv-debian-10
  repo:
    namespace: libvirt
    repo: buildenv-debian-10
  $

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 guests/quayadmin | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guests/quayadmin b/guests/quayadmin
index 536fbaf..6eeacd1 100755
--- a/guests/quayadmin
+++ b/guests/quayadmin
@@ -73,7 +73,7 @@ def run_list_repos(args):
 
     info = res.json()
     for repo in info["repositories"]:
-        print ("{}/{}".format(repo["namespace"], repo["name"]))
+        print ("{}".format(repo["name"]))
 
 
 def run_show_repo(args):
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH v2 05/20] quayadmin: Tweak list-repos output format
Posted by Daniel P. Berrangé 6 years, 5 months ago
On Wed, Jul 17, 2019 at 03:49:14PM +0200, Andrea Bolognani wrote:
> We're going to introduce several other list-* commands later,
> and we want their output to be more or less consistent, so
> start by tweaking the existing command.
> 
> More specifically, we want the output of each list-* command
> to be such that you can take one of the lines, append it to
> the arguments you just used and by doing so obtain a valid
> list of arguments for the corresponding show-* command, eg.
> 
>   $ quayadmin list-repos libvirt
>   buildenv-debian-10
>   $ quayadmin show-repo libvirt buildenv-debian-10
>   repo:
>     namespace: libvirt
>     repo: buildenv-debian-10
>   $
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  guests/quayadmin | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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