summaryrefslogtreecommitdiff
path: root/lib/oxidized/node.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2013-04-20 00:41:23 +0300
committerSaku Ytti <saku@ytti.fi>2013-04-20 00:41:23 +0300
commitf1287a7925901bf3518eb69079304bfb97f7434d (patch)
tree3dd2779e4d087b73b99d7136f37db88c76091d8d /lib/oxidized/node.rb
parent5a393d6102655f575549311e6b250534b4dcbb59 (diff)
Example of Syslog triggered fetch
'syslog.rb' listed to UDP port (or reads file). When IOS or JunOS style config change/commit message is seen, it triggers immediate update ot config It transports commit message (junos) remote host from which change was mde (ios) and who made the change (junos+ios). This is carried over to the 'output' methods, that is, 'git blame' will show IOS/JunOS user-name who made the change.
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r--lib/oxidized/node.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index de04c98..35a5948 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -4,7 +4,7 @@ module Oxidized
class ModelNotFound < StandardError; end
class Node
attr_reader :name, :ip, :model, :input, :output, :group, :auth, :prompt
- attr_accessor :last, :running
+ attr_accessor :last, :running, :user, :msg, :from
alias :running? :running
def initialize opt
@name = opt[:name]
@@ -47,6 +47,10 @@ module Oxidized
h
end
+ def reset
+ @user = @msg = @from = nil
+ end
+
private
def resolve_prompt opt