summaryrefslogtreecommitdiff
path: root/lib/oxidized/node.rb
diff options
context:
space:
mode:
authorDanilo Sousa <dsgoncalves@uoldiveo.com>2017-08-14 18:50:48 -0300
committerDanilo Sousa <dsgoncalves@uoldiveo.com>2017-08-15 11:57:58 -0300
commit1b9cce245de59ae1d2cff0979d640e679b720590 (patch)
treea0a852a2faf2ae4d65d2f2adf588099de27e3bd3 /lib/oxidized/node.rb
parent9d95f9e4404f2857475a7469e511441922c21bf6 (diff)
create `worker_done` event
trigger a event when a full cycle was completed
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r--lib/oxidized/node.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index 8d0d0af..4f9ae54 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -8,6 +8,7 @@ module Oxidized
attr_reader :name, :ip, :model, :input, :output, :group, :auth, :prompt, :vars, :last, :repo
attr_accessor :running, :user, :msg, :from, :stats, :retry
alias :running? :running
+
def initialize opt
Oxidized.logger.debug 'resolving DNS for %s...' % opt[:name]
# remove the prefix if an IP Address is provided with one as IPAddr converts it to a network address.
@@ -217,6 +218,7 @@ module Oxidized
end
#model
+ # FIXME: warning: instance variable @model not initialized
if Oxidized.config.models.has_key?(@model.class.name.to_s.downcase)
if Oxidized.config.models[@model.class.name.to_s.downcase].has_key?(key_str)
value = Oxidized.config.models[@model.class.name.to_s.downcase][key_str]