Class: Nagios::Promoo::Opennebula::Probes::BaseProbe

Inherits:
Object
  • Object
show all
Defined in:
lib/nagios/promoo/opennebula/probes/base_probe.rb

Overview

Base probe for all ONe-related probes.

Author:

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ BaseProbe

Returns a new instance of BaseProbe.



17
18
19
# File 'lib/nagios/promoo/opennebula/probes/base_probe.rb', line 17

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



15
16
17
# File 'lib/nagios/promoo/opennebula/probes/base_probe.rb', line 15

def options
  @options
end

Class Method Details

.runnable?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/nagios/promoo/opennebula/probes/base_probe.rb', line 10

def runnable?
  false
end

Instance Method Details

#clientObject



21
22
23
24
25
26
# File 'lib/nagios/promoo/opennebula/probes/base_probe.rb', line 21

def client
  return @_client if @_client

  token = token_file? ? read_token : options[:token]
  @_client = OpenNebula::Client.new(token.to_s, options[:endpoint])
end