summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model')
-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
+