Class: Facts::Linux::Hypervisors::Xen
- Inherits:
-
Object
- Object
- Facts::Linux::Hypervisors::Xen
- Defined in:
- lib/facter/facts/linux/hypervisors/xen.rb
Constant Summary collapse
- FACT_NAME =
'hypervisors.xen'
Instance Method Summary collapse
- #call_the_resolver ⇒ Object
-
#initialize ⇒ Xen
constructor
A new instance of Xen.
Constructor Details
Instance Method Details
#call_the_resolver ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/facter/facts/linux/hypervisors/xen.rb', line 13 def call_the_resolver if xen? @log.debug('Xen hypervisor detected') fact_value = {} fact_value[:context] = hvm? ? 'hvm' : 'pv' fact_value[:privileged] = Facter::Resolvers::Xen.resolve(:privileged) return Facter::ResolvedFact.new(FACT_NAME, fact_value) end @log.debug('No Xen hypervisor detected.') [] end |