From 21f1bd6b7287e5106ade30c146049be5f66e1d47 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 25 Feb 2016 08:37:32 -0600 Subject: Prompt detect not working The prompt detection was not working on my edgeswitch. The old regex was a little odd, so I don't know if there is some corner case I'm not accounting for. My prompts ``` (palmer-elevator.sw) > ``` ``` (palmer-elevator.sw) # ``` --- lib/oxidized/model/edgeswitch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/edgeswitch.rb b/lib/oxidized/model/edgeswitch.rb index 31014da..0777b85 100644 --- a/lib/oxidized/model/edgeswitch.rb +++ b/lib/oxidized/model/edgeswitch.rb @@ -4,7 +4,7 @@ class EdgeSwitch < Oxidized::Model comment '!' - prompt /[(]\w*\s\w*[)][\s#>]*[\s#>]/ + prompt /\(.*\)\s[#>]/ cmd 'show running-config' do |cfg| cfg.each_line.reject { |line| line.match /System Up Time.*/ or line.match /Current SNTP Synchronized Time.*/ }.join -- cgit v1.2.1 From f70539c1a907fc4e416c8b60b359dc618690a80a Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 25 Feb 2016 09:23:25 -0600 Subject: Edgeswitch: not properly closing the connecton Quit fully logs out even when enabled. exit exit did not log out the second one failed. --- lib/oxidized/model/edgeswitch.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/edgeswitch.rb b/lib/oxidized/model/edgeswitch.rb index 0777b85..607df6c 100644 --- a/lib/oxidized/model/edgeswitch.rb +++ b/lib/oxidized/model/edgeswitch.rb @@ -18,8 +18,7 @@ class EdgeSwitch < Oxidized::Model cfg :telnet, :ssh do post_login 'enable' post_login 'terminal length 0' - pre_logout 'exit' - pre_logout 'exit' + pre_logout 'quit' end end -- cgit v1.2.1