diff options
author | Saku Ytti <saku@ytti.fi> | 2014-08-16 11:20:47 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-08-16 11:20:47 +0300 |
commit | 9272a9b98786e65c206ca8206c1c327cf66ffb17 (patch) | |
tree | 73989456c1449a2f7697e9f4a36f153145a18bad /lib/oxidized/model/powerconnect.rb | |
parent | 49db97088d370adb575a01f9d4446496dcff78cb (diff) | |
parent | f0cbdd19179b2aa009c9f6ae29ecf4c01a3ad2a8 (diff) |
Merge branch 'master' into cfg_as_object
Diffstat (limited to 'lib/oxidized/model/powerconnect.rb')
-rw-r--r-- | lib/oxidized/model/powerconnect.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb index 4f90b77..1d0352e 100644 --- a/lib/oxidized/model/powerconnect.rb +++ b/lib/oxidized/model/powerconnect.rb @@ -19,7 +19,7 @@ class PowerConnect < Oxidized::Model cmd 'show system' do |cfg| cfg = cfg.each_line.take_while { |line| not line.match(/uptime/i) } - comment cfg + comment cfg.join "\n" end cmd 'show running-config' @@ -30,9 +30,14 @@ class PowerConnect < Oxidized::Model end cfg :telnet, :ssh do - post_login 'terminal datadump' - post_login 'enable' - pre_logout 'exit' + if vars :enable + send "enable\n" + send vars(:enable) + "\n" + end + + post_login "terminal length 0" + pre_logout "logout" + end end |