Class: Specinfra::Command::Solaris::Base::Host

Inherits:
Base::Host show all
Defined in:
lib/specinfra/command/solaris/base/host.rb

Direct Known Subclasses

V10::Host

Class Method Summary collapse

Methods inherited from Base::Host

check_is_resolvable, get_ipaddress

Methods inherited from Base

create, escape

Class Method Details

.check_is_reachable(host, port, proto, timeout) ⇒ Object


3
4
5
6
7
8
9
# File 'lib/specinfra/command/solaris/base/host.rb', line 3

def check_is_reachable(host, port, proto, timeout)
  if port.nil?
    "ping -n #{escape(host)} #{escape(timeout)}"
  else
    "nc -vvvvz#{escape(proto[0].chr)} -w #{escape(timeout)} #{escape(host)} #{escape(port)}"
  end
end