Class: Facts::Linux::Disks
- Inherits:
-
Object
- Object
- Facts::Linux::Disks
- Defined in:
- lib/facter/facts/linux/disks.rb
Constant Summary collapse
- FACT_NAME =
'disks'
- ALIASES =
%w[blockdevices blockdevice_.*_model blockdevice_.*_size blockdevice_.*_vendor].freeze
Instance Method Summary collapse
Instance Method Details
#call_the_resolver ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/facter/facts/linux/disks.rb', line 9 def call_the_resolver facts = [] disks = Facter::Resolvers::Linux::Disk.resolve(:disks) return Facter::ResolvedFact.new(FACT_NAME, nil) if disks.nil? || disks.empty? blockdevices = disks.keys.join(',') facts.push(Facter::ResolvedFact.new(FACT_NAME, disks)) facts.push(Facter::ResolvedFact.new('blockdevices', blockdevices, :legacy)) add_legacy_facts(disks, facts) facts end |