lib/facter/facts/linux/is_virtual.rb in facter-4.0.35 vs lib/facter/facts/linux/is_virtual.rb in facter-4.0.36
- old
+ new
@@ -3,12 +3,10 @@
module Facts
module Linux
class IsVirtual
FACT_NAME = 'is_virtual'
- PHYSICAL_HYPERVISORS = %w[physical xen0 vmware_server vmware_workstation openvzhn vserver_host].freeze
-
def call_the_resolver # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
fact_value = check_docker_lxc || check_gce || retrieve_from_virt_what || check_vmware
fact_value ||= check_open_vz || check_vserver || check_xen || check_other_facts || check_lspci || 'physical'
Facter::ResolvedFact.new(FACT_NAME, check_if_virtual(fact_value))
@@ -57,10 +55,10 @@
def check_lspci
Facter::Resolvers::Lspci.resolve(:vm)
end
def check_if_virtual(found_vm)
- PHYSICAL_HYPERVISORS.count(found_vm).zero?
+ Facter::FactsUtils::PHYSICAL_HYPERVISORS.count(found_vm).zero?
end
end
end
end