Description of problem: The katello cmdline tool does not tell you all arguments needed for a specific command. Version-Release number of selected component (if applicable): 1.4.8-1.git.4.c940d43.el6 How reproducible: All the time. Steps to Reproduce: For example: 1. katello -u admin -p PASSWORD activation_key --help Actual results: # katello -u admin -p PASSWORD activation_key --help Usage: katello options activation_key command Supported Commands: add_system_group add system group to an activation key create create an activation key delete delete an activation key info show information about an activation key list list all activation keys remove_system_group remove system groups to a system update update an activation key Options: -h, --help show this help message and exit # katello -u admin -p PASSWORD activation_key list Usage: katello options activation_key list options katello: error: Option --org is required; please see --help Expected results: # katello -u admin -p PASSWORD activation_key --help Usage: katello options activation_key command --org <organization name> Supported Commands: add_system_group add system group to an activation key create create an activation key delete delete an activation key info show information about an activation key list list all activation keys remove_system_group remove system groups to a system update update an activation key Options: -h, --help show this help message and exit Additional info: As far as I can see, this is the case for all commands that requires --org or other extra options such as --product, --product_label, --product_id, etc.
moving to our downstream product to include this. Our CLI is undergoing a lot of work and this may be included
The new hammer_cli will resolve this issue. The katello command line
Sorry.. the katello command line has been deprecated.
Failed. The user is asking for documentation on required fields which is not there yet. Please see below. Please note that Sat6 uses hammer cli. # hammer -u admin -p changeme activation-key list --help Usage: hammer activation-key list [OPTIONS] Options: --by BY Field to sort the results on --content-view CONTENT_VIEW_NAME Content view name to search by --content-view-id CONTENT_VIEW_ID content view numeric identifier --full-results FULL_RESULTS Whether or not to show all results --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME Name to search by --lifecycle-environment-id LIFECYCLE_ENVIRONMENT_ID --name NAME activation key name to filter by --order ORDER Sort field and order, eg. 'name DESC' --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID --organization-label ORGANIZATION_LABEL Organization label to search by --page PAGE Page number, starting at 1 --per-page PER_PAGE Number of results per page to return --search SEARCH Search string -h, --help print help
Connecting redmine issue http://projects.theforeman.org/issues/4128 from this bug
@suresh, i don't understand how this failed. can you explain more?
So.. I see that it's named --organization instead of --org. But.. Isn't it applicable to --organization instead then?
It's the same on what I think is the current version of the hammer cli tool. [root@sat6 ~]# rpm -qa|grep hammer rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch rubygem-hammer_cli-0.1.1-12.el6sat.noarch rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch rubygem-hammer_cli_import-0.10.4-1.1.el6sat.noarch [root@sat6 ~]# hammer -u Admin -p Password activation-key --help Usage: hammer activation-key [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND subcommand [ARG] ... subcommand arguments Subcommands: add-host-collection Associate a resource add-subscription Add subscription create Create an activation key delete Destroy an activation key host-collections List associated host collections info Show an activation key list List activation keys remove-host-collection Disassociate a resource remove-subscription Remove subscription subscriptions List associated subscriptions update Update an activation key Options: -h, --help print help [root@devsedh2-lx9054 ~]# hammer -u Admin -p Password activation-key list Error: Missing options to search organization [root@sat6 ~]#
@Adam Price: If my understanding is correct, the user is asking to indicate the required fields in the help command.
Yes, please. Without listing all required arguments, the --help information is incorrect and risks leading the user to think that there is a bug.
Upstream bug assigned to mbacovsk
*** Bug 1044455 has been marked as a duplicate of this bug. ***
really old bug. If I look at the original issue: [vagrant@sat-test-rhel7 ~]$ hammer -u admin -p changeme activation-key list Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id. I am going to move this to ON_QA as it addresses the original issue.
Verified with satellite 6.2 snap 13 Help can't mark the options as required since there are multiple options to provide the same required information (--organization vs. --organization-d vs. --organization-label). The commands now have more informative error messages pointing the user to what is missing. $ hammer activation-key list Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501