Sha256: 445bc94e948c2823c55a5917d44f4a8baa60a15c0d4dd900e34f10fb476173cf

Contents?: true

Size: 550 Bytes

Versions: 129

Compression:

Stored size: 550 Bytes

Contents

class Specinfra::Command::Openbsd::Base::Interface < Specinfra::Command::Base::Interface 
  class << self
    def check_exists(name)
      "ifconfig #{name}"
    end

    def get_speed_of(name)
      "ifconfig #{name} | grep 'media\:' | perl -pe 's|.*media\:.*\\((.*?)\\)|\\1|'"
    end

    def check_has_ipv4_address(interface, ip_address)
      "ifconfig #{interface} | grep -w inet | cut -d ' ' -f 2"
    end

    def check_has_ipv6_address(interface, ip_address)
      "ifconfig #{interface} | grep -w inet6 | cut -d ' ' -f 2"
    end
  end
end

Version data entries

129 entries across 129 versions & 1 rubygems

Version Path
specinfra-2.40.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.39.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.39.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.38.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.38.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.9 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.8 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.6 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.5 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.4 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.3 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.2 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.37.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.36.18 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.36.17 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.36.16 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.36.15 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.36.14 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.36.13 lib/specinfra/command/openbsd/base/interface.rb