Method: Specinfra::Command::Solaris::V10::Host.check_is_reachable
- Defined in:
- lib/specinfra/command/solaris/v10/host.rb
permalink .check_is_reachable(host, port, proto, timeout) ⇒ Object
[View source]
3 4 5 6 7 8 9 10 11 |
# File 'lib/specinfra/command/solaris/v10/host.rb', line 3 def check_is_reachable(host, port, proto, timeout) if port.nil? "ping -n #{escape(host)} #{escape(timeout)}" elsif proto == 'tcp' "echo 'quit' | mconnect -p #{escape(port)} #{escape(host)} > /dev/null 2>&1" else raise NotImplementedError.new end end |