diff options
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/ironware.rb | 2 | ||||
-rw-r--r-- | lib/oxidized/model/model.rb | 9 | ||||
-rw-r--r-- | lib/oxidized/model/xos.rb | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb index 679bdea..f9998ae 100644 --- a/lib/oxidized/model/ironware.rb +++ b/lib/oxidized/model/ironware.rb @@ -27,7 +27,7 @@ class IronWare < Oxidized::Model cfg :telnet, :ssh do post_login 'skip-page-display' - pre_logout 'exit' + pre_logout 'logout' end end diff --git a/lib/oxidized/model/model.rb b/lib/oxidized/model/model.rb index d3f54b9..899b40a 100644 --- a/lib/oxidized/model/model.rb +++ b/lib/oxidized/model/model.rb @@ -133,10 +133,10 @@ module Oxidized outputs << out end procs[:pre].each do |pre_proc| - outputs.unshift Oxidized::String.new(instance_eval(&pre_proc)) + outputs.unshift process_cmd_output(instance_eval(&pre_proc), '') end procs[:post].each do |post_proc| - outputs << Oxidized::String.new(instance_eval(&post_proc)) + outputs << process_cmd_output(instance_eval(&post_proc), '') end outputs end @@ -152,9 +152,8 @@ module Oxidized private def process_cmd_output output, name - if output.class != Oxidized::String - output = Oxidized::String.new output - end + output = Oxidized::String.new output if ::String === output + output = Oxidized::String.new '' unless Oxidized::String === output output.set_cmd(name) output end diff --git a/lib/oxidized/model/xos.rb b/lib/oxidized/model/xos.rb index a8292ca..88c81ed 100644 --- a/lib/oxidized/model/xos.rb +++ b/lib/oxidized/model/xos.rb @@ -29,7 +29,7 @@ class XOS < Oxidized::Model cfg :telnet do username /^login:/ - password /^passowrd:/ + password /^\r*password:/ end cfg :telnet, :ssh do |