Class: Serverspec::Type::Host

Inherits:
Base
  • Object
show all
Defined in:
lib/serverspec/type/host.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_ary, #to_s

Constructor Details

This class inherits a constructor from Serverspec::Type::Base

Instance Method Details

#ipaddressObject



11
12
13
# File 'lib/serverspec/type/host.rb', line 11

def ipaddress
  @runner.get_host_ipaddress(@name).stdout.strip
end

#reachable?(port, proto, timeout) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/serverspec/type/host.rb', line 7

def reachable?(port, proto, timeout)
  @runner.check_host_is_reachable(@name, port, proto, timeout)
end

#resolvable?(type) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/serverspec/type/host.rb', line 3

def resolvable?(type)
  @runner.check_host_is_resolvable(@name, type)
end