Proxy observability CLI - open questions

Hi all,
smart proxies recently received a lot of improvements in the UI to allow
for it's health and status tracking. We (the proxy observability team)
want to provide the same functionality in the CLI now. Since the nature
of web UI and CLI is different, some questions about how to structure
the information arose. We'd like discuss them prior to implementing it.

There's plenty of new information to display. UI tackled the problem by
splitting the page into multiple tabs. From the initial discussion there
are two proposals on how to deal with it in the CLI:

  1. Mimic the tabs with additional subcommands
    The 'proxy info' command would display only the basic information from
    the first tab. The rest would be in subcommands:
    hammer proxy services
    hammer proxy puppet
    hammer proxy puppet-ca
    Plugins extending the proxy page would define additional subcommands.

  2. Put everything into 'proxy info' and introduce verbosity
    This would produce huge amount of text to stdout so we'd need to add
    verbosity parameter into hammer to reduce it. E.g:
    hammer proxy info --id 1 # …info from the first tab + services
    hammer proxy info --id 1 --verbosity=[1…2] # …more information
    We could probably find better verbosity switches (like -v and -vv).

Plainly from hammer plugin author's perspective there's probably not
much difference. We'll need to add a better interface for extending
existing commands from plugins in both cases (to enable for adding more
fields into the info command). That's something we'll most likely need
to do (sooner or later) anyway to support host facets, additional info
for compute resources, etc.

I personally find the first option cleaner in terms of structure and
more versatile for future extensions.

Which one do you like more? Do you have an idea for a third approach?

Then there's a special chapter: Katello proxy extensions

Since hammer-cli-katello uses a wrapper command 'capsule' for all
content related stuff I propose keeping it this way and add 'hammer
capsule content sync-status' command to list sync tasks, progress and
counts of synchronized items.

The final katello commands would then be:
hammer capsule content synchronize
hammer capsule content sync-status
hammer capsule content cancel-sync
Or do you find full names better?

'hammer capsule info' is currently a separate command independent of
'hammer proxy info' and it doesn't provide any additional information.
Shouldn't 'capsule info' be just alias to 'proxy info'?

Thanks for your feedback
Tomas

> Hi all,
> smart proxies recently received a lot of improvements in the UI to allow
> for it's health and status tracking. We (the proxy observability team)
> want to provide the same functionality in the CLI now. Since the nature
> of web UI and CLI is different, some questions about how to structure
> the information arose. We'd like discuss them prior to implementing it.
>
>
> There's plenty of new information to display. UI tackled the problem by
> splitting the page into multiple tabs. From the initial discussion there
> are two proposals on how to deal with it in the CLI:
>
> 1) Mimic the tabs with additional subcommands
> The 'proxy info' command would display only the basic information from
> the first tab. The rest would be in subcommands:
> hammer proxy services
> hammer proxy puppet
> hammer proxy puppet-ca
> Plugins extending the proxy page would define additional subcommands.
>
> 2) Put everything into 'proxy info' and introduce verbosity
> This would produce huge amount of text to stdout so we'd need to add
> verbosity parameter into hammer to reduce it. E.g:
> hammer proxy info --id 1 # …info from the first tab + services
> hammer proxy info --id 1 --verbosity=[1…2] # …more information
> We could probably find better verbosity switches (like -v and -vv).
>
> Plainly from hammer plugin author's perspective there's probably not
> much difference. We'll need to add a better interface for extending
> existing commands from plugins in both cases (to enable for adding more
> fields into the info command). That's something we'll most likely need
> to do (sooner or later) anyway to support host facets, additional info
> for compute resources, etc.
>
> I personally find the first option cleaner in terms of structure and
> more versatile for future extensions.
>
> Which one do you like more? Do you have an idea for a third approach?

I like 1 better, I believe it will be more sensical to the user.

>
>
> Then there's a special chapter: Katello proxy extensions
>
> Since hammer-cli-katello uses a wrapper command 'capsule' for all
> content related stuff I propose keeping it this way and add 'hammer
> capsule content sync-status' command to list sync tasks, progress and
> counts of synchronized items.
>
> The final katello commands would then be:
> hammer capsule content synchronize
> hammer capsule content sync-status
> hammer capsule content cancel-sync
> Or do you find full names better?

If you could make "capsule" be a synonym for proxy, then I wuold be all
for it.

>
> 'hammer capsule info' is currently a separate command independent of
> 'hammer proxy info' and it doesn't provide any additional information.
> Shouldn't 'capsule info' be just alias to 'proxy info'?

ack

– bk

··· On 02/08/2016 11:18 AM, Tomas Strachota wrote:

+1 to Bryan's reply. (1) with a synonym works for me.

++1 for Bryan's reply.
Thanks for bringing this up!

··· 2016-02-08 22:33 GMT+02:00 Greg Sutcliffe :

+1 to Bryan’s reply. (1) with a synonym works for me.


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 for the feedback.
I created 6 new user stories:

As a CLI user I'd like to see list of services on a proxy
As a CLI user I'd like to see puppet related info for a proxy
As a CLI user I'd like to see puppet-ca related info for a proxy
As a user I'd like the capsule command to be alias of proxy
As a user I'd like to cancel running synchronization from CLI
As a user I'd like to see my sync status from CLI

All tracked from [1]. If you feel there's something missing lease let me
know or comment in one of the issues.

Regards
Tomas

[1] Tracker #12719: As a user I would like to consume Proxy additional information via hammer. - Hammer CLI - Foreman

··· On 02/08/2016 10:33 PM, Shlomi Zadok wrote: > ++1 for Bryan's reply. > Thanks for bringing this up! > > 2016-02-08 22:33 GMT+02:00 Greg Sutcliffe >: > > +1 to Bryan's reply. (1) with a synonym works for me. > > -- > 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.