Class: Specinfra::Command::Solaris::Base::Host
- Inherits:
-
Base::Host
- Object
- Base
- Base::Host
- Specinfra::Command::Solaris::Base::Host
- Defined in:
- lib/specinfra/command/solaris/base/host.rb
Direct Known Subclasses
Class Method Summary collapse
Methods inherited from Base::Host
check_is_resolvable, get_ipaddress, get_ipv4_address, get_ipv6_address
Methods inherited from Base
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 |