From 55036037d9dac7b142813da8c3ff1370c31acbea Mon Sep 17 00:00:00 2001 From: arienv Date: Sat, 7 Jul 2018 11:10:12 +0200 Subject: Add support for ECI Telecom Apollo platform (#1437) PR #1437 --- lib/oxidized/model/eciapollo.rb | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/oxidized/model/eciapollo.rb (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/eciapollo.rb b/lib/oxidized/model/eciapollo.rb new file mode 100644 index 0000000..ad15360 --- /dev/null +++ b/lib/oxidized/model/eciapollo.rb @@ -0,0 +1,34 @@ +# ECI Telecom Apollo +# Tested on OPT9608 systems via SSH and telnet + +class ECIapollo < Oxidized::Model + prompt /^([\w.@()-]+[#>]\s?)$/ + comment '# ' + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join + end + + cmd :secret do |cfg| + cfg.gsub!(/community (\S+) {/, 'community {') + cfg.gsub!(/ "\$\d\$\S+; ## SECRET-DATA/, ' ;') + cfg + end + + cfg :telnet do + username(/^login:/) + password(/^Password:/) + end + + cfg :telnet, :ssh do + post_login 'set cli screen-length 0' + post_login 'set cli screen-width 0' + pre_logout 'exit' + end + + cmd('show version') { |cfg| comment cfg } + cmd('show system licenses') { |cfg| comment cfg } + cmd('show configuration') { |cfg| comment cfg } + cmd('show configuration | display-set') { |cfg| cfg } + cmd('show chassis inventory') { |cfg| comment cfg } +end -- cgit v1.2.1