summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornopedial <sam@arahant.net>2015-03-03 11:29:24 +0100
committernopedial <sam@arahant.net>2015-03-03 11:29:24 +0100
commit100c4480aa2f1e6e16e47ac6c1bd85429e2ab6a0 (patch)
tree3168bb158fa672621de8310fe823c2157504aeec
parent68de70ff4d0646a87a273e0ca4434a535608db6e (diff)
parent20eed2e40303a80b3d4cd444fb358041bb9c2b60 (diff)
Merge pull request #86 from rodecker/master
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
+