Class: Facts::Solaris::Hypervisors::Ldom
- Inherits:
-
Object
- Object
- Facts::Solaris::Hypervisors::Ldom
- Defined in:
- lib/facter/facts/solaris/hypervisors/ldom.rb
Constant Summary collapse
- FACT_NAME =
'hypervisors.ldom'
Instance Method Summary collapse
- #call_the_resolver ⇒ Object
-
#initialize ⇒ Ldom
constructor
A new instance of Ldom.
Constructor Details
Instance Method Details
#call_the_resolver ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/facter/facts/solaris/hypervisors/ldom.rb', line 13 def call_the_resolver chassis_serial = Facter::Resolvers::Solaris::Ldom.resolve(:chassis_serial) return Facter::ResolvedFact.new(FACT_NAME, nil) if !chassis_serial || chassis_serial.empty? fact_value = %i[ chassis_serial control_domain domain_name domain_uuid role_control role_io role_root role_service ].map! { |key| [key, Facter::Resolvers::Solaris::Ldom.resolve(key)] }.to_h Facter::ResolvedFact.new(FACT_NAME, fact_value) end |