Sha256: 43091aa91369595faeee02956bf06768f501668644a0fb2f81c9cb6f71018a0b

Contents?: true

Size: 439 Bytes

Versions: 8

Compression:

Stored size: 439 Bytes

Contents

module Serverspec::Type
  class Interface < Base
    def speed
      ret = @runner.get_interface_speed_of(@name)
      val = ret.stdout.strip
      val = val.to_i if val.match(/^\d+$/)
      val
    end

    def has_ipv4_address?(ip_address)
      @runner.check_interface_has_ipv4_address(@name, ip_address)
    end

    def has_ipv6_address?(ip_address)
      @runner.check_interface_has_ipv6_address(@name, ip_address)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
serverspec-2.3.1 lib/serverspec/type/interface.rb
serverspec-2.3.0 lib/serverspec/type/interface.rb
serverspec-2.2.0 lib/serverspec/type/interface.rb
serverspec-clc-2.1.0 lib/serverspec/type/interface.rb
serverspec-2.1.0 lib/serverspec/type/interface.rb
serverspec-2.0.1 lib/serverspec/type/interface.rb
serverspec-2.0.0 lib/serverspec/type/interface.rb
serverspec-2.0.0.beta21 lib/serverspec/type/interface.rb