Hide Forgot
Description of problem: The katello shell changeset command doesn't recognize client remembered options. For example, despite having a remember --environment option, the changeset command keeps reprompting for the option. Version-Release number of selected component (if applicable): * katello-cli-0.1.54-3.el6.noarch * katello-0.1.235-2.el6.noarch Steps to Reproduce: 1. # katello -u admin -p admin shell 2. katello> client remember --option org --value redhat 3. katello> client remember --option environment --value Stage 4. katello> changeset list Actual results: Usage: katello [options] > katello> changeset list > katello: error: Option --environment is required; please see --help Expected results: > katello> changeset list > --------------------------------------------------------------------------------------------------------- > Changeset List > > Id Name Updated At State Environment Id Environment Name > --------------------------------------------------------------------------------------------------------- > 1 01 - cf repos 2012/02/14 09:18:11 promoted 3 Stage > 2 02 - rht repos 2012/02/14 09:24:19 promoted 3 Stage > 6 03 - templates 2012/02/14 13:46:03 failed 3 Stage > 8 04 - configserver 2012/02/14 14:56:11 review 3 Stage Additional info:
Created attachment 562290 [details] 0001-790550-katello-shell-Honor-saved_options-environment.patch Looks like the problem is because the changeset command stores the parser value as 'env' ... not 'environment'. How would the user know that the proper --option name is 'env' not 'environment'? Rather than document that the saved_option --option 'env' is what you use for any command that needs --environment, I'd propose the attached patch instead. Thoughts?
For thoughts on the approach+patch in comment#1, adding katello shell expert tstracho to the cc-list.
Created attachment 564445 [details] 0001-783405-remembered-options-are-now-recognized-by-opti.patch Thanks for your patch, James! I eventually implemented the fix different way. I find it better to keep option names and destinations separate. You can take advantage of having shorter destination names and also more options for one destination.
*** Bug 783405 has been marked as a duplicate of this bug. ***
# VERIFIED Client remember options getting stored under: .katello/client-options.conf and the scenario with having changeset list with remembered org & env is going ok now. verified on versions of Katello: --- katello-0.1.243-1.git.0.a066880.el6.noarch katello-cli-0.1.57-1.git.0.4e2dd9a.el6.noarch pulp-0.0.266-1.el6.noarch candlepin-0.5.20-1.el6.noarch ---