From 0f4803f627d3fef797d34a8afc43555c54c28e69 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Mon, 20 Jun 2016 16:09:13 -0300 Subject: Coriant8800 from https://www.coriant.com/products/8800.asp --- lib/oxidized/model/coriant8800.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/oxidized/model/coriant8800.rb (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/coriant8800.rb b/lib/oxidized/model/coriant8800.rb new file mode 100644 index 0000000..1c2bf07 --- /dev/null +++ b/lib/oxidized/model/coriant8800.rb @@ -0,0 +1,20 @@ +class Coriant8800 < Oxidized::Model + + prompt /^[^\s#]+#\s/ + + cmd 'show node extensive' do |cfg| + comment cfg + end + + cmd 'show run' do |cfg| + cfg + end + + cfg :telnet, :ssh do + username /^Login:\s$/ + password /^Password:\s$/ + pre_logout 'exit' + post_login 'enable config terminal length 0' + end + +end -- cgit v1.2.1 From 840369c015ea85e1ef8c9a25c2ccb93e40abe000 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Mon, 20 Jun 2016 16:27:29 -0300 Subject: Coriant8600 from https://www.coriant.com/products/8600.asp --- lib/oxidized/model/coriant8600.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/oxidized/model/coriant8600.rb (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/coriant8600.rb b/lib/oxidized/model/coriant8600.rb new file mode 100644 index 0000000..1398949 --- /dev/null +++ b/lib/oxidized/model/coriant8600.rb @@ -0,0 +1,25 @@ +class Coriant8600 < Oxidized::Model + + prompt /^[^\s#]+[#>]/ + + cmd 'show hw-inventory' do |cfg| + comment cfg + end + + cmd 'show flash' do |cfg| + comment cfg + end + + cmd 'show run' do |cfg| + cfg + end + + cfg :telnet, :ssh do + username /^user name:$/ + password /^password:$/ + pre_logout 'exit' + post_login 'enable' + post_login 'terminal more off' + end + +end -- cgit v1.2.1 From 570d5e06ea25825c2fcd50023866d87a0c1a9b21 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Mon, 20 Jun 2016 16:39:55 -0300 Subject: Set comment prefix for Coriant models. --- lib/oxidized/model/coriant8600.rb | 4 +++- lib/oxidized/model/coriant8800.rb | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/coriant8600.rb b/lib/oxidized/model/coriant8600.rb index 1398949..d54082f 100644 --- a/lib/oxidized/model/coriant8600.rb +++ b/lib/oxidized/model/coriant8600.rb @@ -1,6 +1,8 @@ class Coriant8600 < Oxidized::Model - prompt /^[^\s#]+[#>]/ + comment '# ' + + prompt /^[^\s#>]+[#>]/ cmd 'show hw-inventory' do |cfg| comment cfg diff --git a/lib/oxidized/model/coriant8800.rb b/lib/oxidized/model/coriant8800.rb index 1c2bf07..dfc941e 100644 --- a/lib/oxidized/model/coriant8800.rb +++ b/lib/oxidized/model/coriant8800.rb @@ -1,5 +1,7 @@ class Coriant8800 < Oxidized::Model + comment '# ' + prompt /^[^\s#]+#\s/ cmd 'show node extensive' do |cfg| -- cgit v1.2.1 From de6633a59479567d3696593c1c72a630eff54a57 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Tue, 21 Jun 2016 12:35:15 -0300 Subject: Login/password prompts only for telnet. --- lib/oxidized/model/coriant8600.rb | 7 +++++-- lib/oxidized/model/coriant8800.rb | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/coriant8600.rb b/lib/oxidized/model/coriant8600.rb index d54082f..a48ffa5 100644 --- a/lib/oxidized/model/coriant8600.rb +++ b/lib/oxidized/model/coriant8600.rb @@ -2,7 +2,7 @@ class Coriant8600 < Oxidized::Model comment '# ' - prompt /^[^\s#>]+[#>]/ + prompt /^[^\s#>]+[#>]$/ cmd 'show hw-inventory' do |cfg| comment cfg @@ -16,9 +16,12 @@ class Coriant8600 < Oxidized::Model cfg end - cfg :telnet, :ssh do + cfg :telnet do username /^user name:$/ password /^password:$/ + end + + cfg :telnet, :ssh do pre_logout 'exit' post_login 'enable' post_login 'terminal more off' diff --git a/lib/oxidized/model/coriant8800.rb b/lib/oxidized/model/coriant8800.rb index dfc941e..e54b90b 100644 --- a/lib/oxidized/model/coriant8800.rb +++ b/lib/oxidized/model/coriant8800.rb @@ -2,7 +2,7 @@ class Coriant8800 < Oxidized::Model comment '# ' - prompt /^[^\s#]+#\s/ + prompt /^[^\s#]+#\s$/ cmd 'show node extensive' do |cfg| comment cfg @@ -12,11 +12,14 @@ class Coriant8800 < Oxidized::Model cfg end - cfg :telnet, :ssh do + cfg :telnet do username /^Login:\s$/ password /^Password:\s$/ + end + + cfg :telnet, :ssh do pre_logout 'exit' post_login 'enable config terminal length 0' end - + end -- cgit v1.2.1 From 54659e546595c71a4f7bdec7c3a317572b3f82a1 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Tue, 21 Jun 2016 12:36:20 -0300 Subject: Rename coriant8800 to corianttmos. --- lib/oxidized/model/coriant8800.rb | 25 ------------------------- lib/oxidized/model/corianttmos.rb | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 lib/oxidized/model/coriant8800.rb create mode 100644 lib/oxidized/model/corianttmos.rb (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/coriant8800.rb b/lib/oxidized/model/coriant8800.rb deleted file mode 100644 index e54b90b..0000000 --- a/lib/oxidized/model/coriant8800.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Coriant8800 < Oxidized::Model - - comment '# ' - - prompt /^[^\s#]+#\s$/ - - cmd 'show node extensive' do |cfg| - comment cfg - end - - cmd 'show run' do |cfg| - cfg - end - - cfg :telnet do - username /^Login:\s$/ - password /^Password:\s$/ - end - - cfg :telnet, :ssh do - pre_logout 'exit' - post_login 'enable config terminal length 0' - end - -end diff --git a/lib/oxidized/model/corianttmos.rb b/lib/oxidized/model/corianttmos.rb new file mode 100644 index 0000000..e54b90b --- /dev/null +++ b/lib/oxidized/model/corianttmos.rb @@ -0,0 +1,25 @@ +class Coriant8800 < Oxidized::Model + + comment '# ' + + prompt /^[^\s#]+#\s$/ + + cmd 'show node extensive' do |cfg| + comment cfg + end + + cmd 'show run' do |cfg| + cfg + end + + cfg :telnet do + username /^Login:\s$/ + password /^Password:\s$/ + end + + cfg :telnet, :ssh do + pre_logout 'exit' + post_login 'enable config terminal length 0' + end + +end -- cgit v1.2.1 From a85ed690e932d7e0e0908ff6a22d90612af9f9b9 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Tue, 21 Jun 2016 12:39:03 -0300 Subject: Rename Coriant8800 to CoriantTmos. --- lib/oxidized/model/corianttmos.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/corianttmos.rb b/lib/oxidized/model/corianttmos.rb index e54b90b..76603f6 100644 --- a/lib/oxidized/model/corianttmos.rb +++ b/lib/oxidized/model/corianttmos.rb @@ -1,4 +1,4 @@ -class Coriant8800 < Oxidized::Model +class CoriantTmos < Oxidized::Model comment '# ' -- cgit v1.2.1