summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2016-09-30 17:07:36 +0300
committerSaku Ytti <saku@ytti.fi>2016-09-30 17:07:36 +0300
commitd09f9c89c6422e813a470485327efe2cbb8963ca (patch)
tree8ad1edee81810443aeac8a2f6fe845256829036f
parentdbc55487a6839b71899acd7cac65a3a04770ee5f (diff)
prompt not captured after sending enabe PW
fixes #577
-rw-r--r--lib/oxidized/model/ironware.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb
index 1e8c30e..db341d1 100644
--- a/lib/oxidized/model/ironware.rb
+++ b/lib/oxidized/model/ironware.rb
@@ -2,14 +2,14 @@ class IronWare < Oxidized::Model
prompt /^.*(telnet|ssh)\@.+[>#]\s?$/i
comment '! '
-
+
#to handle pager without enable
#expect /^((.*)--More--(.*))$/ do |data, re|
# send ' '
# data.sub re, ''
#end
-
+
#to remove backspace (if handle pager without enable)
#expect /^((.*)[\b](.*))$/ do |data, re|
# data.sub re, ''
@@ -44,14 +44,14 @@ class IronWare < Oxidized::Model
out << sc.rest
cfg = out
end
-
+
comment cfg
end
-
+
cmd 'show flash' do |cfg|
comment cfg
end
-
+
cmd 'show module' do |cfg|
cfg.gsub! /^((Invalid input)|(Type \?)).*$/, '' # some ironware devices are fixed config
comment cfg
@@ -74,7 +74,7 @@ class IronWare < Oxidized::Model
if vars :enable
post_login do
send "enable\r\n"
- send vars(:enable) + "\r\n"
+ cmd vars(:enable)
end
end
post_login ''