diff options
author | nopedial <samer@m247.com> | 2013-04-27 11:06:21 +0100 |
---|---|---|
committer | nopedial <samer@m247.com> | 2013-04-27 11:06:21 +0100 |
commit | 537b28d2652412605b27292be9ff5c1c1c493e76 (patch) | |
tree | a5700a6580bf6c292abfa01b648d31fdaa82a57c /lib/oxidized/model/powerconnect.rb | |
parent | 80f5c733b3b9c1bf0be3bcafbb868574b77c91b2 (diff) |
Add models and README.md
Diffstat (limited to 'lib/oxidized/model/powerconnect.rb')
-rw-r--r-- | lib/oxidized/model/powerconnect.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb new file mode 100644 index 0000000..7fa7f2c --- /dev/null +++ b/lib/oxidized/model/powerconnect.rb @@ -0,0 +1,24 @@ +class PowerConnect < Oxidized::Model + + comment '! ' + + cmd :all do |cfg| + cfg.each_line.to_a[1..-3].join + end + + cmd 'show running-config' do |cfg| + cfg = cfg.each_line.to_a[3..-1].join + cfg + end + + cfg :telnet do + username /^User Name:/ + password /^\r?Password:/ + end + + cfg :telnet, :ssh do + post_login 'terminal datadump' + pre_logout 'exit' + end + +end |