Closed evgeni closed 5 years ago
I try to use function of FactAnalyzer. If an hypervisor has no guest on it the function system_type return 'unknown' instead of 'hypervisor'
Correct, if there are no facts and no guests, it currently returns unknown. What information would you use in this caee?
I search facts named 'virt', if its present, the host could be a vm or a physical one, else it's an Hypervisor
In which case would we not have the hypervisor::* facts set at the same time?
If you mean the ones we gather from virt-who yes, but from a quick analysis, hypervisors seems not have any particular facts
Yeah, I was acting/writing under the assumption that we have either https://github.com/Katello/katello/pull/7821 merged, or implement https://github.com/RedHatSatellite/katello-attach-subscription/issues/32 as a generic-ish workaround, so that we always have access to facts
tested and works
@sideangleside @Rocco83 @mossicrue this is what we talked about last week. The interesting part is in
lib/katello_attach_subscription/fact_analyzer.rb
, rest is just tests and fixtures and stuff :)