Class: Facter::Util::Facts::VirtualDetector
- Inherits:
-
Object
- Object
- Facter::Util::Facts::VirtualDetector
- Defined in:
- lib/facter/util/facts/virtual_detector.rb
Overview
Instance Method Summary collapse
-
#initialize ⇒ VirtualDetector
constructor
A new instance of VirtualDetector.
- #platform ⇒ Object
Constructor Details
#initialize ⇒ VirtualDetector
Returns a new instance of VirtualDetector.
7 8 9 |
# File 'lib/facter/util/facts/virtual_detector.rb', line 7 def initialize @log = Facter::Log.new(self) end |
Instance Method Details
#platform ⇒ Object
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 |