Hi all,
I discovered integration issue in the katello CLI plugin [1] today.
Value of parameter --environment in all katello commands is treated as
if it was puppet environment. ID resolver matches the option against the
environment resource from foreman.
There are 2 ways of solving the problem:
#1 Tweak id resolver for katello commands to always use
lifecycle-environments whenever it is asked for env id. Something like [2].
It's a simple 3-line solution but closes the possibility of referencing
puppet envs from katello commands.
#2 Rename environment_id parameters in katello API to
lifecycle_environment_id so that the id resolver matches correct resource.
Options would then get expanded to
–lifecycle-environment
–lifecycle-environment-id
–lifecycle-environment-label
which is a bit longish.
On the other hand it's a systematic solution that avoids user confusion
from the option names.
> Hi all,
> I discovered integration issue in the katello CLI plugin [1] today.
>
> Value of parameter --environment in all katello commands is treated as
> if it was puppet environment. ID resolver matches the option against the
> environment resource from foreman.
>
> There are 2 ways of solving the problem:
>
> #1 Tweak id resolver for katello commands to always use
> lifecycle-environments whenever it is asked for env id. Something like [2].
> It's a simple 3-line solution but closes the possibility of referencing
> puppet envs from katello commands.
>
> #2 Rename environment_id parameters in katello API to
> lifecycle_environment_id so that the id resolver matches correct resource.
> Options would then get expanded to
> --lifecycle-environment
> --lifecycle-environment-id
> --lifecycle-environment-label
> which is a bit longish.
> On the other hand it's a systematic solution that avoids user confusion
> from the option names.
+1 on the second one
ideally, also the foreman's current environment would be worth
renaming to puppet-environment (as that's what it is), sooner or later,
it will bite back again (for example with other config management tools coming in play)
···
----- Original Message -----
> Hi all,
> I discovered integration issue in the katello CLI plugin [1] today.
>
> Value of parameter --environment in all katello commands is treated as
> if it was puppet environment. ID resolver matches the option against the
> environment resource from foreman.
>
> There are 2 ways of solving the problem:
>
> #1 Tweak id resolver for katello commands to always use
> lifecycle-environments whenever it is asked for env id. Something like [2].
> It's a simple 3-line solution but closes the possibility of referencing
> puppet envs from katello commands.
>
> #2 Rename environment_id parameters in katello API to
> lifecycle_environment_id so that the id resolver matches correct resource.
> Options would then get expanded to
> --lifecycle-environment
> --lifecycle-environment-id
> --lifecycle-environment-label
> which is a bit longish.
> On the other hand it's a systematic solution that avoids user confusion
> from the option names.
>
> Preferences?
>
> Regards
> Tomas
>
>
> [1] http://projects.theforeman.org/issues/5876
> [2]
> https://gist.github.com/tstrachota/971cfecc7975d94f0c7c#file-katello_id_resolver-rb-L3-L5
>
> --
> 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.
>
···
On 22.05.14 14:55, Tomas Strachota wrote:
> Hi all,
> I discovered integration issue in the katello CLI plugin [1] today.
>
> Value of parameter --environment in all katello commands is treated as
> if it was puppet environment. ID resolver matches the option against the
> environment resource from foreman.
>
> There are 2 ways of solving the problem:
>
> #1 Tweak id resolver for katello commands to always use
> lifecycle-environments whenever it is asked for env id. Something like [2].
> It's a simple 3-line solution but closes the possibility of referencing
> puppet envs from katello commands.
>
> #2 Rename environment_id parameters in katello API to
> lifecycle_environment_id so that the id resolver matches correct resource.
> Options would then get expanded to
> --lifecycle-environment
> --lifecycle-environment-id
> --lifecycle-environment-label
> which is a bit longish.
> On the other hand it's a systematic solution that avoids user confusion
> from the option names.
>
> Preferences?
>
> Regards
> Tomas
>
>
> [1] http://projects.theforeman.org/issues/5876
> [2]
> https://gist.github.com/tstrachota/971cfecc7975d94f0c7c#file-katello_id_resolver-rb-L3-L5
>
>
>
>
>
> > > There are 2 ways of solving the problem:
> >
> > #3 Rename both lifecycle-environment and puppet-environment.
>
> +1 #3
>
> >
> > Because what happens if we add, say Chef Environment?
> >
> > –
> > Later,
> >
> > Lukas "lzap" Zapletal
> > irc: lzap #theforeman
> >
> > –
> > 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 <javascript:>.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
>
>
> > > There are 2 ways of solving the problem:
> >
> > #3 Rename both lifecycle-environment and puppet-environment.
>
> +1 #3
>
> +1 #3 too.
> >
> > Because what happens if we add, say Chef Environment?
> >
> > –
> > Later,
> >
> > Lukas "lzap" Zapletal
> > irc: lzap #theforeman
> >
> > –
> > 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 <javascript:>.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
···
On Tuesday, May 27, 2014 4:58:50 AM UTC-7, Tom McKay wrote:
> ----- Original Message -----
On Tuesday, May 27, 2014 4:58:50 AM UTC-7, Tom McKay wrote:
> ----- Original Message -----