Class: Facts::Solaris::MtuInterfaces

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

Constant Summary collapse

FACT_NAME =
'mtu_.*'
TYPE =
:legacy

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



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

def call_the_resolver
  arr = []
  interfaces = Facter::Resolvers::Solaris::Networking.resolve(:interfaces)
  interfaces&.each do |interface_name, info|
    arr << Facter::ResolvedFact.new("mtu_#{interface_name}", info[:mtu], :legacy) if info[:mtu]
  end

  arr
end