Repository List cli behaviour question

Can't make up my mind so asking y'all to tell me which one to choose
What do you want to see when you do

hammer repository list --organization-id=ACME_Corporation

  1. List of enabled repositories
  2. List of all repositories that may have been enabled or otherwise BUT whose reposets have been enabled. Can add columns saying whether they are enabled or disabled in the output. So that you can then say hammer repository enable --id=666
  3. List of all repositories that may have been enabled or otherwise BUT whose products have at least one enabled repo. Can add columns saying whether they are enabled or disabled in the output.

To make this clearer here is an example. If the user has enabled reposets Reposet_A and Reposet_B with
Reposet_A (Repo_A_1_enabled, Repo_A_2_disabled) and Reposet_B (Repo_B_1_disabled, Repo_B_2_disabled)

hammer repository list --organization-id=ACME_Corporation

Scenario 1: List of enabled repositories
Output -> Repo_A_1_enabled

Scenario 2: List of all repositories that may have been enabled or otherwise BUT whose reposets have been enabled.
Output -> Repo_A_1_enabled, Repo_A_2_disabled, Repo_B_1_disabled, Repo_B_2_disabled

Scenario 3: List of all repositories that may have been enabled or otherwise BUT whose products have at least one enabled repo.
In this definition only product Reposet_A will be considered enabled. So only its repos are displayed.
Output -> Repo_A_1_enabled, Repo_A_2_disabled

Present day -> UI does 1, API does 3 . Any suggestions ?

Partha

I'd go with (1), just like the UI. Then have flags to show disabled

hammer repository list

Shows all enabled repositories

hammer repository list --disabled

Shows all disabled repositories

extra credit:

hammer repository list --all

shows everything…

Mike

··· On 04/01/2014 02:11 PM, Partha Aji wrote: > Can't make up my mind so asking y'all to tell me which one to choose > What do you want to see when you do > > hammer repository list --organization-id=ACME_Corporation > > 1) List of enabled repositories > 2) List of all repositories that may have been enabled or otherwise BUT whose reposets have been enabled. Can add columns saying whether they are enabled or disabled in the output. So that you can then say hammer repository enable --id=666 > 3) List of all repositories that may have been enabled or otherwise BUT whose products have at least one enabled repo. Can add columns saying whether they are enabled or disabled in the output. > > To make this clearer here is an example. If the user has enabled reposets Reposet_A and Reposet_B with > Reposet_A (Repo_A_1_enabled, Repo_A_2_disabled) and Reposet_B (Repo_B_1_disabled, Repo_B_2_disabled) > > hammer repository list --organization-id=ACME_Corporation > > Scenario 1: List of enabled repositories > Output -> Repo_A_1_enabled > > Scenario 2: List of all repositories that may have been enabled or otherwise BUT whose reposets have been enabled. > Output -> Repo_A_1_enabled, Repo_A_2_disabled, Repo_B_1_disabled, Repo_B_2_disabled > > Scenario 3: List of all repositories that may have been enabled or otherwise BUT whose products have at least one enabled repo. > In this definition only product Reposet_A will be considered enabled. So only its repos are displayed. > Output -> Repo_A_1_enabled, Repo_A_2_disabled > > > Present day -> UI does 1, API does 3 . Any suggestions ?


Mike McCune
mmccune AT redhat.com
Red Hat Engineering | Portland, OR
Systems Management | 650-254-4248

> From: "Mike McCune" <mmccune@redhat.com>
> To: foreman-dev@googlegroups.com
> Sent: Tuesday, April 1, 2014 5:19:09 PM
> Subject: Re: [foreman-dev] Repository List cli behaviour question
>
<snip>
>
> # hammer repository list
>
> Shows all enabled repositories
>
> # hammer repository list --disabled
>
> Shows all disabled repositories
>
> extra credit:
>
> # hammer repository list --all
>
> shows everything…
>
> Mike
> –

Hey Mike,
Liked your suggestion and have accounted for this behaviour in my PR -> https://github.com/Katello/katello/pull/3932

I am unable to find instances or was to pass flags in hammer cli. So for now you will have to do something like

hammer repository list --disabled=true

and

hammer repository list --all=true

Adam/Tom/Ivan/David/Any one else - if you guys know of a way to do flags in hammer-cli please let me know. Thanks.

Partha

··· ----- Original Message -----

David

··· ----- Original Message ----- > From: "Partha Aji" > To: foreman-dev@googlegroups.com > Sent: Tuesday, April 1, 2014 6:10:59 PM > Subject: Re: [foreman-dev] Repository List cli behaviour question > > ----- Original Message ----- > > From: "Mike McCune" > > To: foreman-dev@googlegroups.com > > Sent: Tuesday, April 1, 2014 5:19:09 PM > > Subject: Re: [foreman-dev] Repository List cli behaviour question > > > > > > > # hammer repository list > > > > Shows all enabled repositories > > > > # hammer repository list --disabled > > > > Shows all disabled repositories > > > > extra credit: > > > > # hammer repository list --all > > > > shows everything... > > > > Mike > > -- > > Hey Mike, > Liked your suggestion and have accounted for this behaviour in my PR -> > https://github.com/Katello/katello/pull/3932 > > I am unable to find instances or was to pass flags in hammer cli. So for now > you will have to do something like > # hammer repository list --disabled=true > and > # hammer repository list --all=true > > Adam/Tom/Ivan/David/Any one else - if you guys know of a way to do flags in > hammer-cli please let me know. Thanks. > > > Partha > > -- > You received this message because you are subscribed to the Google Groups > "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >

Thanks!

··· > On Apr 1, 2014, at 6:23 PM, David Davis wrote: > > https://github.com/Katello/hammer-cli-katello/blob/master/lib/hammer_cli_katello/content_view.rb#L73 > > David > > ----- Original Message ----- > > From: "Partha Aji" > > To: foreman-dev@googlegroups.com > > Sent: Tuesday, April 1, 2014 6:10:59 PM > > Subject: Re: [foreman-dev] Repository List cli behaviour question > > > > ----- Original Message ----- > > > From: "Mike McCune" > > > To: foreman-dev@googlegroups.com > > > Sent: Tuesday, April 1, 2014 5:19:09 PM > > > Subject: Re: [foreman-dev] Repository List cli behaviour question > > > > > > > > > > > # hammer repository list > > > > > > Shows all enabled repositories > > > > > > # hammer repository list --disabled > > > > > > Shows all disabled repositories > > > > > > extra credit: > > > > > > # hammer repository list --all > > > > > > shows everything... > > > > > > Mike > > > -- > > > > Hey Mike, > > Liked your suggestion and have accounted for this behaviour in my PR -> > > https://github.com/Katello/katello/pull/3932 > > > > I am unable to find instances or was to pass flags in hammer cli. So for now > > you will have to do something like > > # hammer repository list --disabled=true > > and > > # hammer repository list --all=true > > > > Adam/Tom/Ivan/David/Any one else - if you guys know of a way to do flags in > > hammer-cli please let me know. Thanks. > > > > > > Partha > > > > -- > > You received this message because you are subscribed to the Google Groups > > "foreman-dev" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to foreman-dev+unsubscribe@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > You received this message because you are subscribed to the Google Groups "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.