Bug 1313056 - hammer cli : hostgroup info is not showing content-related fields
hammer cli : hostgroup info is not showing content-related fields
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts - Content (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: --
Assigned To: Partha Aji
jcallaha
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-29 15:08 EST by Brad Buckingham
Modified: 2018-02-21 11:54 EST (History)
8 users (show)

See Also:
Fixed In Version: tfm-rubygem-hammer_cli_katello-0.11.3.5-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 11:54:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 18523 None None None 2017-02-15 10:19 EST
Foreman Issue Tracker 21912 None None None 2017-12-08 11:15 EST

  None (edit)
Description Brad Buckingham 2016-02-29 15:08:48 EST
Description of problem:

Bug 1267629 raised the issue that content-related fields are not included as part of the API.  This included fields such as the following:

    "content_source_id": 1,
    "content_source_name": "katello-centos7-devel",
    "content_view_id": 1,
    "content_view_name": "Default Organization View",
    "lifecycle_environment_id": 1,
    "lifecycle_environment_name": "Library",

That issue has since been addressed; however, the fields should also be visible from the hammer cli.

Version-Release number of selected component (if applicable):
Satellite 6.1 and prior.

How reproducible:
Always

Steps to Reproduce:
1. create a hostgroup that contains a content source, lifecycle environment and content view
2. perform a 'hammer hostgroup info --id [id]'
3.

Actual results:

hammer> hostgroup info --id 1
Id:                     1
Name:                   group1
Title:                  group1
Puppet CA Proxy Id:     1
Puppet Master Proxy Id: 1
Puppetclasses:          

Parameters:             

Organizations:          
    Default Organization
Parent Id:

Expected results:

The output should include details on the content source, lifecycle environment and content view associated with the host group.

Additional info:
Comment 2 Bryan Kearney 2016-07-26 11:25:24 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 3 Bryan Kearney 2016-07-26 11:34:46 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 5 Brad Buckingham 2017-02-10 08:27:17 EST
The issue raised by this bugzilla has been partially addressed by bug 1360136.  That bug added the content view and lifecycle environment to hammer-cli-katello; however, it did not include content source.  For completeness, we should also extend it to include content source.
Comment 6 Amit Upadhye 2017-02-15 10:19:13 EST
Created redmine issue http://projects.theforeman.org/issues/18523 from this bug
Comment 7 pm-sat@redhat.com 2017-02-21 10:21:15 EST
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18523 has been resolved.
Comment 8 Djebran Lezzoum 2017-06-22 02:50:09 EDT
verified and passed automation test on satellite 6.3.0 snap 3
Comment 13 Djebran Lezzoum 2017-07-06 12:36:54 EDT
Think the ids here are mandatory as without them we cannot understand from which organization we got the content view and lifecycle environment

as the --query-organization is used at creation stage and not shown/saved at later stage.

and even if with hammer --output="json" we cannot get that ids

Move to ASSIGNED as for more consistency the fields
      - content_source_id
      - content_view_id
      - lifecycle_environment_id
are also needed.
Comment 15 Partha Aji 2017-12-08 11:15:03 EST
Connecting redmine issue http://projects.theforeman.org/issues/21912 from this bug
Comment 16 Brad Buckingham 2017-12-15 17:51:45 EST
Upstream PR merged. Moving to POST.
Comment 20 jcallaha 2018-02-07 14:43:01 EST
Verified in Satellite 6.3 Snap 35

-bash-4.2# hammer hostgroup info --id 1
Id:                     1
Name:                   rhel74
Title:                  rhel74
Operating System:       RHEL Server 7.4
Subnet:                 Default Subnet
Domain:                 idmqe.lab.eng.bos.redhat.com
Architecture:           x86_64
Partition Table:        Kickstart default
Puppet CA Proxy Id:     
Puppet Master Proxy Id: 
ComputeProfile:         2-Medium
Puppetclasses:          

Parameters:             
    kt_activation_keys => rhel7
Locations:              
    Default Location
Organizations:          
    Default Organization
Parent Id:              
OpenSCAP Proxy:         
Content View:           
    ID:   2
    Name: rhel7
Lifecycle Environment:  
    ID:   1
    Name: Library
Content Source:         
    ID:   1
    Name: yttrium.idmqe.lab.eng.bos.redhat.com
Kickstart Repository:   
    ID:   20
    Name:
Comment 21 pm-sat@redhat.com 2018-02-21 11:54:17 EST
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.