Sha256: b615e9506e9f31fb8df0a8c112b8eb6b8879baa68bd34fd84b52cf9b54022712

Contents?: true

Size: 513 Bytes

Versions: 7

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

module Facts
  module Linux
    module Networking
      class Mtu
        FACT_NAME = 'networking.mtu'

        def call_the_resolver
          interfaces = Facter::Resolvers::NetworkingLinux.resolve(:interfaces)
          primary = Facter::Resolvers::NetworkingLinux.resolve(:primary_interface)

          fact_value = interfaces[primary][:mtu] if interfaces && interfaces[primary]

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
facter-4.0.28 lib/facts/linux/networking/mtu.rb
facter-4.0.26 lib/facts/linux/networking/mtu.rb
facter-4.0.25 lib/facts/linux/networking/mtu.rb
facter-4.0.24 lib/facts/linux/networking/mtu.rb
facter-4.0.23 lib/facts/linux/networking/mtu.rb
facter-4.0.22 lib/facts/linux/networking/mtu.rb
facter-4.0.21 lib/facts/linux/networking/mtu.rb