Class: Facts::Macosx::Scope6Interfaces

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/macosx/scope6_interfaces.rb

Constant Summary collapse

FACT_NAME =
'scope6_.*'
TYPE =
:legacy

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/facter/facts/macosx/scope6_interfaces.rb', line 9

def call_the_resolver
  resolved_facts = []
  interfaces = Facter::Resolvers::Networking.resolve(:interfaces)

  interfaces&.each do |interface_name, info|
    if info[:scope6]
      resolved_facts << Facter::ResolvedFact.new("scope6_#{interface_name}", info[:scope6], :legacy)
    end
  end
  resolved_facts
end