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.28.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.27.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.27.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.26.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.26.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.25.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.25.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.24.2 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.24.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.24.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.23.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.22.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.21.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.21.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.20.2 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.20.1 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.20.0 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.19.6 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.19.5 lib/specinfra/command/openbsd/base/interface.rb
specinfra-2.19.4 lib/specinfra/command/openbsd/base/interface.rb