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.13.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.12.7 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.12.6 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.12.5 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.12.4 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.12.3 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.12.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.12.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.10 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.9 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.8 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.7 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.6 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.5 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.4 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.3 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.2 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.11.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.10.4 lib/specinfra/command/openbsd/base/interface.rb