diff options
-rw-r--r-- | extra/rest_client.rb | 6 | ||||
-rwxr-xr-x | extra/syslog.rb | 3 | ||||
-rw-r--r-- | lib/oxidized/model/junos.rb | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/extra/rest_client.rb b/extra/rest_client.rb index 2c58d04..88daeae 100644 --- a/extra/rest_client.rb +++ b/extra/rest_client.rb @@ -16,9 +16,9 @@ module Oxidized @web = Net::HTTP.new host, port end - def next node, opt={} - data = JSON.dump :node => node, :user => opt[:user], :msg => opt[:msg], :from => opt[:from] - @web.put '/nodes/next/' + node.to_s, data + def next opt + data = JSON.dump opt + @web.put '/nodes/next/' + opt[:name].to_s, data end end diff --git a/extra/syslog.rb b/extra/syslog.rb index 10757bc..7671d22 100755 --- a/extra/syslog.rb +++ b/extra/syslog.rb @@ -50,8 +50,7 @@ module Oxidized end def rest opt - Oxidized::RestClient.next opt[:name], :user => opt[:user], :msg => opt[:msg], - :from => opt[:from] + Oxidized::RestClient.next opt end def ios ip, log, i diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb index 72f5275..a7080e1 100644 --- a/lib/oxidized/model/junos.rb +++ b/lib/oxidized/model/junos.rb @@ -8,7 +8,7 @@ class JunOS < Oxidized::Model cmd :all do |cfg| # we don't need screen-scraping in ssh due to exec - cfg = cfg.lines[1..-2].join if telnet + cfg = cfg.lines.to_a[1..-2].join if telnet cfg end |