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') 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