summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEverton Marques <everton.marques@gmail.com>2016-06-21 12:35:15 -0300
committerEverton Marques <everton.marques@gmail.com>2016-06-21 12:35:15 -0300
commitde6633a59479567d3696593c1c72a630eff54a57 (patch)
treee0b94b4a913b8de35e23b5e9ee8faca503ff5352
parent570d5e06ea25825c2fcd50023866d87a0c1a9b21 (diff)
Login/password prompts only for telnet.
-rw-r--r--lib/oxidized/model/coriant8600.rb7
-rw-r--r--lib/oxidized/model/coriant8800.rb9
2 files changed, 11 insertions, 5 deletions
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