From d18d81d34a8b9d3e77d3e7085cc03564af29206b Mon Sep 17 00:00:00 2001 From: roedie Date: Thu, 18 Feb 2016 12:32:10 +0100 Subject: Add support for Ericsson Redback --- lib/oxidized/model/redback.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/oxidized/model/redback.rb (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/redback.rb b/lib/oxidized/model/redback.rb new file mode 100644 index 0000000..f6847f7 --- /dev/null +++ b/lib/oxidized/model/redback.rb @@ -0,0 +1,22 @@ +class Redback < Oxidized::Model + prompt /^([\[\]\w.@-]+[#>]\s?)$/ + # Ericsson Redback + + cmd 'show chassis' + cmd 'show hardware detail' + cmd 'show release' + cmd 'show config' + + cfg :telnet do + username /^login:/ + password /^\r*password:/ + end + + cfg :telnet, :ssh do + post_login 'terminal length 0' + pre_logout 'exit' + pre_logout 'n' + end + +end + -- cgit v1.2.1 From 0274cad7f1846f367dce47046757b0c4918893a4 Mon Sep 17 00:00:00 2001 From: roedie Date: Fri, 19 Feb 2016 11:19:43 +0100 Subject: Add comment marks to metadata --- lib/oxidized/model/redback.rb | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/redback.rb b/lib/oxidized/model/redback.rb index f6847f7..fcb370d 100644 --- a/lib/oxidized/model/redback.rb +++ b/lib/oxidized/model/redback.rb @@ -1,10 +1,22 @@ class Redback < Oxidized::Model - prompt /^([\[\]\w.@-]+[#>]\s?)$/ + # Ericsson Redback - cmd 'show chassis' - cmd 'show hardware detail' - cmd 'show release' + prompt /^([\[\]\w.@-]+[#>]\s?)$/ + comment '! ' + + cmd 'show chassis' do |cfg| + comment cfg + end + + cmd 'show hardware detail' do |cfg| + comment cfg + end + + cmd 'show release' do |cfg| + comment cfg + end + cmd 'show config' cfg :telnet do -- cgit v1.2.1 From 20877f5bad4f28eefc6a52b5c69e3914270fd90b Mon Sep 17 00:00:00 2001 From: roedie Date: Sat, 20 Feb 2016 10:49:01 +0100 Subject: Rename to IPOS --- lib/oxidized/model/ipos.rb | 35 +++++++++++++++++++++++++++++++++++ lib/oxidized/model/redback.rb | 34 ---------------------------------- 2 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 lib/oxidized/model/ipos.rb delete mode 100644 lib/oxidized/model/redback.rb (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/ipos.rb b/lib/oxidized/model/ipos.rb new file mode 100644 index 0000000..e20cf40 --- /dev/null +++ b/lib/oxidized/model/ipos.rb @@ -0,0 +1,35 @@ +class IPOS < Oxidized::Model + + # Ericsson SSR (IPOS) + # Redback SE (SEOS) + + prompt /^([\[\]\w.@-]+[#>]\s?)$/ + comment '! ' + + cmd 'show chassis' do |cfg| + comment cfg + end + + cmd 'show hardware detail' do |cfg| + comment cfg + end + + cmd 'show release' do |cfg| + comment cfg + end + + cmd 'show config' + + cfg :telnet do + username /^login:/ + password /^\r*password:/ + end + + cfg :telnet, :ssh do + post_login 'terminal length 0' + pre_logout 'exit' + pre_logout 'n' + end + +end + diff --git a/lib/oxidized/model/redback.rb b/lib/oxidized/model/redback.rb deleted file mode 100644 index fcb370d..0000000 --- a/lib/oxidized/model/redback.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Redback < Oxidized::Model - - # Ericsson Redback - - prompt /^([\[\]\w.@-]+[#>]\s?)$/ - comment '! ' - - cmd 'show chassis' do |cfg| - comment cfg - end - - cmd 'show hardware detail' do |cfg| - comment cfg - end - - cmd 'show release' do |cfg| - comment cfg - end - - cmd 'show config' - - cfg :telnet do - username /^login:/ - password /^\r*password:/ - end - - cfg :telnet, :ssh do - post_login 'terminal length 0' - pre_logout 'exit' - pre_logout 'n' - end - -end - -- cgit v1.2.1