class Nagira::HostService

Attributes

hostname[R]
servicename[R]

Public Class Methods

new(hostname,servicename) click to toggle source
# File lib/nagira/hostservice.rb, line 4
def initialize(hostname,servicename)
  @hostname = hostname
  @servicename = servicename
end

Public Instance Methods

current_state() click to toggle source
# File lib/nagira/hostservice.rb, line 25
def current_state
  status.slice('current_state')
end
full()
Alias for: status
state() click to toggle source
# File lib/nagira/hostservice.rb, line 21
def state
  status.slice('host_name', 'service_description', 'current_state')
end
status() click to toggle source
# File lib/nagira/hostservice.rb, line 10
def status
  begin
    Parser
      .status['hosts'][hostname]['servicestatus'][servicename]
  rescue NoMethodError
    {  }
  end
end
Also aliased as: full