Sha256: f70054845e1bbb7f02dc2eef2f455469e7df2f3be49dcca29ea7a5500f8173bc

Contents?: true

Size: 441 Bytes

Versions: 2

Compression:

Stored size: 441 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Windows
    class NetmaskInterfaces
      FACT_NAME = 'netmask_.*'

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

        arr
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facter-4.0.8.pre lib/facts/windows/netmask_interfaces.rb
facter-4.0.7.pre lib/facts/windows/netmask_interfaces.rb