lib/oxidized/model/ironware.rb in oxidized-0.17.0 vs lib/oxidized/model/ironware.rb in oxidized-0.18.0

- old
+ new

@@ -1,17 +1,17 @@ class IronWare < Oxidized::Model prompt /^.*(telnet|ssh)\@.+[>#]\s?$/i comment '! ' - + #to handle pager without enable #expect /^((.*)--More--(.*))$/ do |data, re| # send ' ' # data.sub re, '' #end - + #to remove backspace (if handle pager without enable) #expect /^((.*)[\b](.*))$/ do |data, re| # data.sub re, '' #end @@ -42,18 +42,18 @@ out << sc.scan_until(/.*TEMPERATURE/) temps << sc.scan_until(/.*Fans/) out << sc.rest cfg = out end - + comment cfg end - + cmd 'show flash' do |cfg| comment cfg end - + cmd 'show module' do |cfg| cfg.gsub! /^((Invalid input)|(Type \?)).*$/, '' # some ironware devices are fixed config comment cfg end @@ -72,10 +72,10 @@ #handle pager with enable cfg :telnet, :ssh do if vars :enable post_login do send "enable\r\n" - send vars(:enable) + "\r\n" + cmd vars(:enable) end end post_login '' post_login 'skip-page-display' post_login 'terminal length 0'