-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #36826 - add new Host - Installed Products report for SCA hosts #9863
Fixes #36826 - add new Host - Installed Products report for SCA hosts #9863
Conversation
I need to add the product number along with the name as well. |
9026521
to
f2cf84b
Compare
I realized users might miss the "days from now" input being gone... it's awkward to introduce into this new report, so I'm thinking that we might want to keep the old report around but rename it to say that it's for non-SCA orgs only. |
I agree. We also have an email notification that you can set up which emails you the Subscription - Entitlement Report filtered based on that Days from Now input, so I'm not sure how this would work if we delete the report? I think the old Entitlement Report should stick around as-is and this new report should be SCA-only. |
f2cf84b
to
12b3185
Compare
Changes I've made:
The subscriptions entitlement report will continue to not show anything for SCA hosts. The new host products report will report regardless of SCA status. |
12b3185
to
193b079
Compare
version: 4.11.0 | ||
-%> | ||
<%- report_headers 'Host Name', 'Organization', 'Lifecycle Environment', 'Content View', 'Host Collections', 'Virtual', 'Guest of Host', 'OS', 'Arch', 'Sockets', 'RAM', 'Cores', 'SLA', 'Role', 'Usage', 'Products', 'Last Checkin' -%> | ||
<%- load_hosts(search: input('Hosts filter'), includes: [:operatingsystem, :architecture, :content_view_environments, :organization, :reported_data, :subscription_facet, :pools => [:subscription]]).each_record do |host| -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't need to load :pools => [:subscription]
here anymore :)
app/views/unattended/report_templates/subscription_-_entitlement_report.erb
Show resolved
Hide resolved
7856620
to
92212fa
Compare
@jeremylenz I added in your suggestions Edit -- I kept the simple content access check due to the reason in #9863 (comment) |
92212fa
to
1c570fa
Compare
[test katello] |
Test failure looks related!
|
1c570fa
to
c329a54
Compare
Tests are passing now! |
@@ -0,0 +1,40 @@ | |||
<%# | |||
name: Host - Products |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like "Installed Products" is a phrase people are used to; we use it elsewhere including the new host details Details tab. Thoughts on calling it Host - Installed Products
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me 👍
'Role': host.purpose_role_status_label, | ||
'Usage': host.purpose_usage_status_label, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is recording the role status and usage status, which tell you if the host's assigned role and usage are "supported by a valid subscription."
Instead these columns should be simply "Role" and "Usage," and should match the values shown for the hosts on the new host details Overview tab / System Purpose card. I think the values you want are just purpose_role
and purpose_usage
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that makes more sense, alright, I'll update the katello and foreman PRs.
'Role': host.purpose_role_status_label, | ||
'Usage': host.purpose_usage_status_label, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in light of my comments above, these should really be called "Role Status" and "Usage Status"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well if I change them to be purpose role and purpose usage, I think Role and Usage make sense again. I'll just remove the role and usage statuses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant
- leave the statuses here, in the old Entitlement report, and call the columns 'Role Status' and 'Usage Status'; and
- in the new Host Installed Products report, call the columns 'Role' and 'Usage' and have the actual values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also have both (status and value) columns in the Entitlement Report if you want.
'OS': host.operatingsystem, | ||
'Arch': host.architecture, | ||
'Sockets': host.sockets, | ||
'RAM': host.ram, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in MBs seems, at least according to the fact parser. That would make sense given your values there. I can make the top bit say "RAM (MB)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me! 👍
'SLA': host_sla(host), | ||
'Role': host.purpose_role_status_label, | ||
'Usage': host.purpose_usage_status_label, | ||
'Products': host_products_names_and_ids(host), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Products': host_products_names_and_ids(host), | |
'Installed products': host_products_names_and_ids(host), |
'Role': host.purpose_role_status_label, | ||
'Usage': host.purpose_usage_status_label, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't on the list, but I think it'd be nice to also show the system's Release Version too.
c329a54
to
8f35c6f
Compare
8f35c6f
to
261324b
Compare
@jeremylenz I added the usage and role statuses back in. |
Since the statuses are only useful for those using entitlement mode, I'd remove the status columns from the new Host Installed Products report, and only have them in the Entitlement Report. So:
apologies again for confusions |
261324b
to
03283b8
Compare
@jeremylenz should actually be fixed now! :D |
I spun it up for a final test and tried to run
Not sure how to address this, I guess something links the templates and template inputs? maybe |
* Add system purpose role and usage to subscriptions entitlement report
03283b8
to
1b15841
Compare
@jeremylenz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ianballou !
APJ 👍
[test katello] |
Waiting for tests to pass on Katello/katello#10769 |
[test katello] |
Makes the old Subscriptions Entitlements Report work for SCA users. Only shows subscription information if there is any. Also adds system purpose statuses to the host output.
To test:
-> There should now be subscription data for the hosts in the report
The above is out of date -- see my later comment for new information.