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/model/coriant8600.rb') 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 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/model/coriant8600.rb') 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 -- 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 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/model/coriant8600.rb') 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' -- cgit v1.2.1