Code Review about a hammer_cli plugin

Hello,

We are using Satellite 6 at work, and we need severals commands.

I created a hammer_cli plugin to implement them, and i would like to know
if the code that i produced must be improved and if yes, how.

I paste the whole plugin in gist, avaiable at :

For the next command, i would like to determine if the latest version of a
content view is "up-to-date" : if there are difference between packages
published (according the filters) and the current state of synced
repositories. Any hint to achieve this?

Thanks for your replies.

PS : currently, i did an external module, but, i think this need could be
common need, and maybe, it should be included in hammer_cli_katello ?

Hi,

Thanks for reaching to this list. I think that might be interesting for
many Katello users and it's worth
sending a pull-request against hammer_cli_katello. That's also the best way
to get the feedback both code-wise
as well as feature wise. It will also run Rubocop (Ruby linter) against the
code, which will also make some style suggestions
to enhance the code.

– Ivan

··· On Tue, Apr 12, 2016 at 11:05 AM, Thomas Bétrancourt wrote:

Hello,

We are using Satellite 6 at work, and we need severals commands.

I created a hammer_cli plugin to implement them, and i would like to know
if the code that i produced must be improved and if yes, how.

I paste the whole plugin in gist, avaiable at :
https://gist.github.com/rclsilver/32a3eb346050f798a73e0dd72f1f3935

For the next command, i would like to determine if the latest version of a
content view is “up-to-date” : if there are difference between packages
published (according the filters) and the current state of synced
repositories. Any hint to achieve this?

Thanks for your replies.

PS : currently, i did an external module, but, i think this need could be
common need, and maybe, it should be included in hammer_cli_katello ?


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.

Hi,

Thanks for your answer.

I agree to make a Pull Request. I'm building and real developpement
environment (through vagrant).

I'll try to include and test my code tomorrow.

This is my first hammer plugin and about my first real code in ruby… Then,
don't be too angry about me and my code :smiley:

I joined #theforeman-dev, where i'll certainly ask some questions, to do
things well.

Regards,
Thomas

··· Le mardi 12 avril 2016 13:06:49 UTC+2, Ivan Necas a écrit : > > Hi, > > Thanks for reaching to this list. I think that might be interesting for > many Katello users and it's worth > sending a pull-request against hammer_cli_katello. That's also the best > way to get the feedback both code-wise > as well as feature wise. It will also run Rubocop (Ruby linter) against > the code, which will also make some style suggestions > to enhance the code. > > -- Ivan > > On Tue, Apr 12, 2016 at 11:05 AM, Thomas Bétrancourt > wrote: > >> Hello, >> >> We are using Satellite 6 at work, and we need severals commands. >> >> I created a hammer_cli plugin to implement them, and i would like to know >> if the code that i produced must be improved and if yes, how. >> >> I paste the whole plugin in gist, avaiable at : >> https://gist.github.com/rclsilver/32a3eb346050f798a73e0dd72f1f3935 >> >> For the next command, i would like to determine if the latest version of >> a content view is "up-to-date" : if there are difference between packages >> published (according the filters) and the current state of synced >> repositories. Any hint to achieve this? >> >> Thanks for your replies. >> >> PS : currently, i did an external module, but, i think this need could be >> common need, and maybe, it should be included in hammer_cli_katello ? >> >> -- >> 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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hello,

A ticket has been opened (Feature #14611: Add content-view purge command - Katello - Foreman) and
also a Pull Request.

··· Le mardi 12 avril 2016 19:18:57 UTC+2, Thomas Bétrancourt a écrit : > > Hi, > > Thanks for your answer. > > I agree to make a Pull Request. I'm building and real developpement > environment (through vagrant). > > I'll try to include and test my code tomorrow. > > This is my first hammer plugin and about my first real code in ruby.. > Then, don't be too angry about me and my code :D > > I joined #theforeman-dev, where i'll certainly ask some questions, to do > things well. > > Regards, > Thomas > > Le mardi 12 avril 2016 13:06:49 UTC+2, Ivan Necas a écrit : >> >> Hi, >> >> Thanks for reaching to this list. I think that might be interesting for >> many Katello users and it's worth >> sending a pull-request against hammer_cli_katello. That's also the best >> way to get the feedback both code-wise >> as well as feature wise. It will also run Rubocop (Ruby linter) against >> the code, which will also make some style suggestions >> to enhance the code. >> >> -- Ivan >> >> On Tue, Apr 12, 2016 at 11:05 AM, Thomas Bétrancourt >> wrote: >> >>> Hello, >>> >>> We are using Satellite 6 at work, and we need severals commands. >>> >>> I created a hammer_cli plugin to implement them, and i would like to >>> know if the code that i produced must be improved and if yes, how. >>> >>> I paste the whole plugin in gist, avaiable at : >>> https://gist.github.com/rclsilver/32a3eb346050f798a73e0dd72f1f3935 >>> >>> For the next command, i would like to determine if the latest version of >>> a content view is "up-to-date" : if there are difference between packages >>> published (according the filters) and the current state of synced >>> repositories. Any hint to achieve this? >>> >>> Thanks for your replies. >>> >>> PS : currently, i did an external module, but, i think this need could >>> be common need, and maybe, it should be included in hammer_cli_katello ? >>> >>> -- >>> 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...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >>