[stable-2.15] facts: Add a generic detection for VMware product name (#83109)

* Use startswith instead of hardcoded values in VMWare product
  detction

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/83228/head
Abhijeet Kasurde 1 month ago committed by GitHub
parent 6fe3b64990
commit 2e32adac3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,3 @@
---
bugfixes:
- facts - add a generic detection for VMware in product name.

@ -176,7 +176,7 @@ class LinuxVirtual(Virtual):
virtual_facts['virtualization_type'] = 'RHEV'
found_virt = True
if product_name in ('VMware Virtual Platform', 'VMware7,1'):
if product_name and product_name.startswith(("VMware",)):
guest_tech.add('VMware')
if not found_virt:
virtual_facts['virtualization_type'] = 'VMware'

Loading…
Cancel
Save