Bug 2219700
| Summary: | [RFE] Hammer Command to get the all registered hosts UUID details | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Amit Agarwal <amiagarw> |
| Component: | Hosts | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | NEW --- | QA Contact: | Satellite QE Team <sat-qe-bz-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.12.4 | CC: | aruzicka, rlavi |
| Target Milestone: | Unspecified | Keywords: | 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: | 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
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.
Query from customer "What is expected entries in /root/host_uuids.erb ? Do I need to create this file ? " Query from customer "What is expected entries in /root/host_uuids.erb ? Do I need to create this file ? " Thanks for the input. Customer is facing below issue while attempting the last command? Please advise hammer report-template generate --name 'Host - UUIDs' Generating Report template failed for: undefined method '#uuid' for Host::Managed::Jail (Host::Managed). |