Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2219700

Summary: [RFE] Hammer Command to get the all registered hosts UUID details
Product: Red Hat Satellite Reporter: Amit Agarwal <amiagarw>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.12.4CC: amahindr, aruzicka, rlavi
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-03 11:56:00 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:

Description Amit Agarwal 2023-07-04 20:46:53 UTC
Description of problem:

There does not seem to have a single command which can give details of all registered hosts UUID at a time. 

hammer host info --id will give the UUID info for individual host.  


Steps to Reproduce:
CSV file that we generate from Web UI under Host -> All host or even Hosts -> Content Hosts does not show the UUIDs of the hosts


Actual results:
There does not seem to have a single command which can give details of all registered hosts UUID details at a time.

Expected results:
Hammer Command to get the all registered hosts UUID details

Comment 1 Marek Hulan 2023-08-03 13:40:05 UTC
The best way to achieve this is to create a report template and then render it from hammer. Attaching an example report template and the hammer commands needed to import and use it.

hammer report-template import --file /root/host_uuids.erb --name 'Host - UUIDs' --organization 'Default Organization' --location 'Default Location'
hammer report-template generate --name 'Host - UUIDs'

Example output as CSV

> Name,UUID
> foreman-nuc2.example.com,588766ef-60a1-446b-8db2-7460a6ae1b74
> tony-sloane.example.com,afd308ce-71f1-4e0d-abc2-1ab2f47cfa27
> clark-dirksen.example.com,3b1766f7-3fc2-4ca8-991c-88e181fb173f
> mqtt.example.com,e69c179e-176d-44db-914d-ca46f7e93a13

I don't think we'll be adding option to customize columns for host list hammer command.

Comment 9 Adam Ruzicka 2023-11-03 11:56:00 UTC
There was no response for a little bit over a month so I'll go ahead and close this. If you still want this resolved, feel free to reopen along with the requested information.

Comment 10 Red Hat Bugzilla 2024-03-03 04:25:14 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days