Adding Host-Collection field to report template in Red Hat Satellite 6

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6

Issue

  • No column of Host-Collection is present in Report Template.

Resolution

  1. Clone the template you want.

    For example: Host - Registered Content Hosts >> Clone

  2. Now edit the report_headers and add 'Host Collection'

    <%- report_headers 'Name', 'Ip', 'Operating System', 'Subscriptions', 'Applicable Errata', 'Owner', 'Kernel', 'Latest kernel available', 'Host Collection' -%>
    
  3. Call the same variable in report_row

    <%-   report_row(
        'Name': host.name,
        'Ip': host.ip,
        'Operating System': host.operatingsystem,
        'Subscriptions': host_subscriptions_names(host),
        'Applicable Errata': host_applicable_errata_ids(host),
        'Owner': host.owner,
        'Kernel': host_kernel_release(host),
        'Latest kernel available': host_latest_applicable_rpm_version(host, 'kernel'),
        'Host Collection': host_collections(host)
      ) -%>
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments