Bug 1023163 - Hammer CLI: --help for many commands repeatedly appends options to the output
Summary: Hammer CLI: --help for many commands repeatedly appends options to the output
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 18:58 UTC by Apurva Bhole
Modified: 2019-09-26 17:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:06:49 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 3523 0 None None None 2016-04-22 15:04:41 UTC

Description Apurva Bhole 2013-10-24 18:58:46 UTC
Description of problem:
--help for environment/domain/organization update/delete commands repearedly appends options to the output. 
The issue probably exists for all the commands for which --help fetches for options having unique constrain. Eg. id, name  

Version-Release number of selected component (if applicable):
foreman-postgresql-1.3.0-20.el6sat.noarch
ruby193-rubygem-foreman-katello-engine-0.0.17-6.el6sat.noarch
ruby193-rubygem-foreman_api-0.1.7-2.el6sat.noarch
apollo.usersys.redhat.com-foreman-proxy-1.0-1.noarch
rubygem-foreman_api-0.1.7-3.el6sat.noarch
foreman-1.3.0-20.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.12-3.el6sat.noarch
foreman-proxy-1.3.0-3.el6sat.noarch
apollo.usersys.redhat.com-foreman-client-1.0-1.noarch
rubygem-hammer_cli_foreman-0.0.8-2.el6sat.noarch
katello-configure-foreman-1.4.7-7.el6sat.noarch
katello-foreman-all-1.4.6-47.el6sat.noarch

rubygem-hammer_cli-0.0.7-2.el6sat.noarch
rubygem-hammer_cli_foreman-0.0.8-2.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. organization update --help
Usage:
    hammer organization update [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help

2. organization update --help
Usage:
    hammer organization update [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource

3. organization update --help
Usage:
    hammer organization update [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource


Expected results:
(Always)

Usage:
    hammer organization update [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help

Comment 1 RHEL Program Management 2013-10-24 19:04:52 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Dominic Cleal 2013-10-25 14:21:16 UTC
Got it.. when reproducing it, you need to run in "hammer shell".

Comment 6 Dominic Cleal 2014-01-29 14:05:53 UTC
Fixed in hammer-cli-foreman 0.0.16.

Comment 8 Sachin Ghai 2014-05-06 09:52:52 UTC
Verified with Satellite-6.0.3-RHEL-6-20140430.4

now --help doesn't append options to output.. Tried via hammer shell.

hammer> organization update --help
Usage:
     organization update [OPTIONS]

Options:
    --description DESCRIPTION     description
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    --redhat-repository-url REDHAT_REPOSITORY_URL Redhat CDN url
    -h, --help                    print help
hammer> organization update --help
Usage:
     organization update [OPTIONS]

Options:
    --description DESCRIPTION     description
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    --redhat-repository-url REDHAT_REPOSITORY_URL Redhat CDN url
    -h, --help                    print help
hammer> organization update --help
Usage:
     organization update [OPTIONS]

Options:
    --description DESCRIPTION     description
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    --redhat-repository-url REDHAT_REPOSITORY_URL Redhat CDN url
    -h, --help                    print help
hammer>

Comment 9 Sachin Ghai 2014-05-06 09:54:27 UTC
success for environment update, options doesn't append to the output

hammer> environment update --help
Usage:
     environment update [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
hammer> environment update --help
Usage:
     environment update [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
hammer> environment update --help
Usage:
     environment update [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
hammer>

Comment 10 Sachin Ghai 2014-05-06 09:54:59 UTC
hammer> domain update --help
Usage:
     domain update [OPTIONS]

Options:
    --description DESC            Full name describing the domain
    --dns-id DNS_ID               DNS Proxy to use within this domain
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
hammer> domain update --help
Usage:
     domain update [OPTIONS]

Options:
    --description DESC            Full name describing the domain
    --dns-id DNS_ID               DNS Proxy to use within this domain
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
hammer> domain update --help
Usage:
     domain update [OPTIONS]

Options:
    --description DESC            Full name describing the domain
    --dns-id DNS_ID               DNS Proxy to use within this domain
    --id ID                       resource id
    --name NAME                   resource name
    --new-name NEW_NAME           new name for the resource
    -h, --help                    print help
hammer>

Comment 11 Sachin Ghai 2014-05-06 09:55:47 UTC
hammer> domain delete --help
Usage:
     domain delete [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    -h, --help                    print help
hammer> domain delete --help
Usage:
     domain delete [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    -h, --help                    print help
hammer> environment delete --help
Usage:
     environment delete [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    -h, --help                    print help
hammer> environment delete --help
Usage:
     environment delete [OPTIONS]

Options:
    --id ID                       resource id
    --name NAME                   resource name
    -h, --help                    print help
hammer>

Comment 12 Bryan Kearney 2014-07-02 14:06:49 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.


Note You need to log in before you can comment on or make changes to this bug.