Bug 1122656

Summary: Parent host groups not shown clearly in hammer hostgroup list
Product: Red Hat Satellite Reporter: Dominic Cleal <dcleal>
Component: HammerAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: medium    
Version: 6.0.3CC: abradshaw, bkearney, katello-bugs, peter.vreman, sreber
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-09 14:33:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    

Description Dominic Cleal 2014-07-23 17:18:39 UTC
Description of problem:
When running "hammer hostgroup list" with nested host groups, it's unclear which groups are children of which others.

The "label" column is blank (it's now "title" in APIv2) and the ancestry column only shows IDs.

Version-Release number of selected component (if applicable):
rubygem-hammer_cli_foreman-0.1.1-1.201407071351git6be75b7.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. hammer hostgroup create --name test
2. hammer hostgroup create --parent-id 1 --name test2
3. hammer hostgroup create --parent-id 2 --name test3

Actual results:
---|-------|-------|------------------|-------------|-------|---------
ID | NAME  | LABEL | OPERATING SYSTEM | ENVIRONMENT | MODEL | ANCESTRY
---|-------|-------|------------------|-------------|-------|---------
1  | test  |       |                  |             |       |         
2  | test2 |       |                  |             |       | 1       
3  | test3 |       |                  |             |       | 1/2     
---|-------|-------|------------------|-------------|-------|---------

Expected results:
---|-------------|-------|------------------|-------------|-------|
ID | PARENT      | NAME  | OPERATING SYSTEM | ENVIRONMENT | MODEL |
---|-------------|-------|------------------|-------------|-------|
1  |             | test  |                  |             |       |
2  | test/       | test2 |                  |             |       |
3  | test/test2/ | test3 |                  |             |       |
---|-------------|-------|------------------|-------------|-------|

or similar, taking inspiration from the UI.  Maybe the separate parent column is superfluous.  I've no idea why model is here.

Additional info:

Comment 1 Dominic Cleal 2014-07-23 17:18:57 UTC
Created redmine issue http://projects.theforeman.org/issues/6755 from this bug

Comment 4 Peter Vreman 2015-07-20 15:34:36 UTC
Confirmed for Sat6.1.0. The Hostgroup title is now shown, this includes the Parent path:

# hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml hostgroup list
---|------------|-------------------------|------------------|-----------------------------|------
ID | NAME       | TITLE                   | OPERATING SYSTEM | ENVIRONMENT                 | MODEL
---|------------|-------------------------|------------------|-----------------------------|------
1  | crash      | crash                   |                  |                             |
2  | Backup     | crash/Backup            |                  |                             |
3  | BackupTest | crash/Backup/BackupTest | RedHat 6.5       | KT_Hilti_Library_hg_crash_9 |
4  | FTP        | crash/FTP               |                  |                             |
5  | ftp        | crash/FTP/ftp           | RedHat 6.5       | KT_Hilti_Library_hg_crash_9 |
6  | ldap       | crash/FTP/ldap          | RedHat 6.5       | KT_Hilti_Library_hg_crash_9 |
7  | ILF        | crash/ILF               |                  |                             |
8  | Cluster1   | crash/ILF/Cluster1      | RedHat 6.5       | KT_Hilti_Library_hg_crash_9 |
9  | Cluster2   | crash/ILF/Cluster2      | RedHat 6.5       | KT_Hilti_Library_hg_crash_9 |
10 | Gateway1   | crash/ILF/Gateway1      | RedHat 6.5       | KT_Hilti_Library_hg_crash_9 |
11 | Gateway2   | crash/ILF/Gateway2      | RedHat 6.5       | KT_Hilti_Library_hg_crash_9 |
---|------------|-------------------------|------------------|-----------------------------|------

Comment 7 Red Hat Bugzilla 2023-09-14 02:11:57 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days