Skip to content

Commit

Permalink
Create host_-_subscription_base_data.erb
Browse files Browse the repository at this point in the history
New report to provide host data based on system purpose information for SCA enabled customers.

Requires katello commit
parmstro/katello@d9c1fda
  • Loading branch information
parmstro authored Nov 28, 2024
1 parent ca34010 commit edf1def
Showing 1 changed file with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<%#
name: Host - Subscription Base Data
snippet: false
template_inputs:
- name: Hosts filter
required: false
input_type: user
description: Limit the report only on hosts found by this search query. Keep empty
for report on all available hosts.
advanced: false
value_type: search
resource_type: Host
model: ReportTemplate
require:
- plugin: katello
version: 3.9.0
-%>
<%- report_headers 'Host Name', 'IP Address', 'Organization', 'Lifecycle Environment', 'Content View', 'Virtual', 'Guest of Host', 'OS', 'Arch', 'Sockets', 'Cores', 'Role', 'Usage', 'SLA', 'Release Version', 'Is Hypervisor', 'Products' -%>
<%- load_hosts(search: input('Hosts filter'), includes: [:content_view_environments, :host_collections, :operatingsystem, :architecture, :organization, :reported_data, :interfaces]).each_record do |host| -%>
<%- report_row(
'Host Name': host.name,
'IP Address': host.ip,
'Organization': host.organization,
'Lifecycle Environment': host.single_lifecycle_environment ? host.single_lifecycle_environment.name : nil,
'Content View': host.single_content_view ? host.single_content_view.name : nil,
'Virtual': host.virtual,
'Guest of Host': host.hypervisor_host,
'OS': host.operatingsystem,
'Arch': host.architecture,
'Sockets': host.sockets,
'Cores': host.cores,
'Role': host_purpose_role(host),
'Usage': host_purpose_usage(host),
'SLA': host_sla(host),
'Release Version': host_purpose_release_version(host),
'Is Hypervisor': host_is_hypervisor(host),
'Products': host_products_names(host)
) -%>
<%- end -%>
<%= report_render -%>

0 comments on commit edf1def

Please sign in to comment.