Class: Nagios::API::Host
Instance Attribute Summary
Attributes inherited from Resource
#api_client, #attributes
Instance Method Summary
collapse
Methods inherited from Resource
#initialize, #method_missing, #to_hash
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Nagios::API::Resource
Instance Method Details
#name ⇒ Object
28
29
30
|
# File 'lib/nagios/api/host.rb', line 28
def name
host_name
end
|
#schedule_downtime ⇒ Object
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/nagios/api/host.rb', line 36
def schedule_downtime
end
|
#services ⇒ Object
24
25
26
|
# File 'lib/nagios/api/host.rb', line 24
def services
@services ||= Nagios::API::Services.new(api_client: api_client, host: self)
end
|
#state ⇒ Object
32
33
34
|
# File 'lib/nagios/api/host.rb', line 32
def state
api_client.state.for_host(name)
end
|