Class: Facts::Solaris::Mountpoints

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/solaris/mountpoints.rb

Constant Summary collapse

FACT_NAME =
'mountpoints'

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/facter/facts/solaris/mountpoints.rb', line 8

def call_the_resolver
  mountpoints = Facter::Resolvers::Solaris::Mountpoints.resolve(FACT_NAME.to_sym)
  return Facter::ResolvedFact.new(FACT_NAME, nil) unless mountpoints

  fact = {}
  mountpoints.each do |mnt|
    fact[mnt[:path].to_sym] = mnt.reject { |k| k == :path }
  end

  Facter::ResolvedFact.new(FACT_NAME, fact)
end