summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pels <martin@rodecker.nl>2015-03-03 11:26:59 +0100
committerMartin Pels <martin@rodecker.nl>2015-03-03 11:26:59 +0100
commit20eed2e40303a80b3d4cd444fb358041bb9c2b60 (patch)
tree3168bb158fa672621de8310fe823c2157504aeec
parent549c1a7cb6e454b31a76ea357254c675246fe73d (diff)
fixes for EOS switches with enable secret configured
-rw-r--r--lib/oxidized/model/eos.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/oxidized/model/eos.rb b/lib/oxidized/model/eos.rb
index 1b43221..98a8c28 100644
--- a/lib/oxidized/model/eos.rb
+++ b/lib/oxidized/model/eos.rb
@@ -2,12 +2,12 @@ class EOS < Oxidized::Model
# Arista EOS model #
- prompt /^([\w.@()-]+[#>]\s?)$/
+ prompt /^.+[#>]\s?$/
comment '! '
cmd :all do |cfg|
- cfg.each_line.to_a[2..-2].join
+ cfg.each_line.to_a[1..-2].join
end
cmd :secret do |cfg|
@@ -28,10 +28,14 @@ class EOS < Oxidized::Model
if vars :enable
post_login do
send "enable\n"
+ expect /[pP]assword:\s?$/
send vars(:enable) + "\n"
+ expect /^.+[#>]\s?$/
end
+ post_login 'terminal length 0'
end
pre_logout 'exit'
end
end
+