From f1287a7925901bf3518eb69079304bfb97f7434d Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sat, 20 Apr 2013 00:41:23 +0300 Subject: 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. --- lib/oxidized/node.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/node.rb') 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 -- cgit v1.2.1