Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1503586 - Remove --include and --thin options
Summary: Remove --include and --thin options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Kavita
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks: 1505305
TreeView+ depends on / blocked
 
Reported: 2017-10-18 12:35 UTC by Stanislav Tkachenko
Modified: 2022-03-13 14:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1505305 (view as bug list)
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20754 0 None None None 2017-10-18 12:35:51 UTC

Description Stanislav Tkachenko 2017-10-18 12:35:52 UTC
Description of problem:
According to [1] new parameters (include and thin) were added to API and hammer automatically generates options for that parameters but it has no effect in the cli.

It is already fixed in [2]

Since the fix is trivial and those options were not present in previous releases I'd vote for cherry-pick into 6.3 and to not expose useless options in new release.

[1] http://projects.theforeman.org/issues/20754
[2] https://github.com/theforeman/hammer-cli-foreman/pull/331

Version-Release number of selected component (if applicable):
Satellite 6.3 Snap 20:
* tfm-rubygem-hammer_cli-0.11.0.1-1.el7sat.noarch
* foreman-1.15.4.8-1.el7sat.noarch
* katello-3.4.5-4.el7sat.noarch
* satellite-6.3.0-20.0.beta.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. hammer host list --help
2. hammer hostgroup list --help
3.

Actual results:
--thin and --include options are present

Expected results:
Those options should not be present

Additional info:

Comment 2 Satellite Program 2017-10-18 14:04:24 UTC
Upstream bug assigned to kgaikwad

Comment 3 Satellite Program 2017-10-18 14:04:26 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20754 has been resolved.

Comment 4 jcallaha 2017-10-20 15:11:29 UTC
I would like to see the host list --thin actually implemented, as how the API provides it. However, I agree that the hostgroup doesn't need a --thin option.

Comment 5 Brad Buckingham 2017-10-20 18:54:32 UTC
Stanislav,

Based on Jake's feedback in comment 4, should we open a separate bug to later  re-introduce support for --thin for the 'host list' command?  The alternative, if that is the desired outcome, is that the upstream fix may need to be changed.

Comment 6 Stanislav Tkachenko 2017-10-23 09:26:36 UTC
(In reply to Brad Buckingham from comment #5)

Personally I'd vote for the first option. So I'd humbly ask Jake to create that RFE as he better understand what should be added :)

Comment 7 jcallaha 2017-10-23 16:01:01 UTC
It looks like the host list --thin option already works in 6.3. On this system, a host list without --think takes 4m30.936s since it has 5012 hosts. Below are the results of specifying --thin. I am unsure of how to use --include, so I can't put those results in as well. 


-bash-4.2# time hammer host list --thin true --organization-id 1
------|-------------------------------------------------|------------------|------------|----|-----|--------------|----------------------
ID    | NAME                                            | OPERATING SYSTEM | HOST GROUP | IP | MAC | CONTENT VIEW | LIFECYCLE ENVIRONMENT
------|-------------------------------------------------|------------------|------------|----|-----|--------------|----------------------
12868 | 7eb079806c6f                                    |                  |            |    |     |              |                      
12867 | errata.test                                     |                  |            |    |     |              |                
...
13537 | virt-who-fff6deb7.07ea.4f43.86d7.a79acef7c1ae-1 |                  |            |    |     |              |                      
15084 | virt-who-fffc49cb.5170.402a.98c3.d26317c22c11-1 |                  |            |    |     |              |                      
------|-------------------------------------------------|------------------|------------|----|-----|--------------|----------------------

real	0m8.999s
user	0m3.123s
sys	0m0.131s

Comment 8 Tomas Strachota 2017-10-24 11:31:57 UTC
Hammer propagates values of both --thin and --include to the server and the response is modified accordingly but hammer doesn't reflect on that with its output fields. So passing --thin results in a faster response and half empty table. Passing --include has no effect at all, because hammer just throws the additional fields away (include can add only parameters afair).

I agree that we need to implement displaying additional fields or limiting them on request. This feature is tracked here for upstream: http://projects.theforeman.org/issues/19135

Comment 9 Peter Ondrejka 2017-11-14 15:42:00 UTC
Verified on Sat 6.3 snap 24:

# hammer host list -h
Usage:
    hammer host list [OPTIONS]

Options:
 --environment ENVIRONMENT_NAME          Environment name
 --environment-id ENVIRONMENT_ID          
 --hostgroup HOSTGROUP_NAME              Hostgroup name
 --hostgroup-id HOSTGROUP_ID              
 --hostgroup-title HOSTGROUP_TITLE       Hostgroup title
 --location LOCATION_NAME                Location name
 --location-id LOCATION_ID                
 --location-title LOCATION_TITLE         Location title
 --order ORDER                           sort results
 --organization ORGANIZATION_NAME        Organization name
 --organization-id ORGANIZATION_ID       organization ID
 --organization-title ORGANIZATION_TITLE Organization title
 --page PAGE                             paginate results
 --per-page PER_PAGE                     number of entries per request
 --search SEARCH                         filter results
 -h, --help                              print help



# hammer hostgroup list -h
Usage:
    hammer hostgroup list [OPTIONS]

Options:
 --location LOCATION_NAME                Location name
 --location-id LOCATION_ID                
 --location-title LOCATION_TITLE         Location title
 --order ORDER                           sort results
 --organization ORGANIZATION_NAME        Organization name
 --organization-id ORGANIZATION_ID       organization ID
 --organization-title ORGANIZATION_TITLE Organization title
 --page PAGE                             paginate results
 --per-page PER_PAGE                     number of entries per request
 --puppet-class PUPPET_CLASS_NAME        Puppet class name
 --puppet-class-id PUPPET_CLASS_ID       ID of Puppet class
 --search SEARCH                         filter results
 -h, --help                              print help

Comment 10 Satellite Program 2018-02-21 16:54:17 UTC
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/RHSA-2018:0336


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