Class: Facter::Util::Facts::VirtualDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/util/facts/virtual_detector.rb

Overview

Since:

  • 2.0.0

Instance Method Summary collapse

Constructor Details

#initializeVirtualDetector

Returns a new instance of VirtualDetector.

Since:

  • 2.0.0



7
8
9
# File 'lib/facter/util/facts/virtual_detector.rb', line 7

def initialize
  @log = Facter::Log.new(self)
end

Instance Method Details

#platformObject

Since:

  • 2.0.0



11
12
13
14
15
16
17
# File 'lib/facter/util/facts/virtual_detector.rb', line 11

def platform
  @@fact_value ||= check_docker_lxc || check_freebsd || check_gce || retrieve_from_virt_what
  @@fact_value ||= check_vmware || check_open_vz || check_vserver || check_xen || check_other_facts
  @@fact_value ||= check_lspci || 'physical'

  @@fact_value
end