diff options
author | Bartek <bartek@sq9mev.info> | 2018-06-19 08:28:30 +0200 |
---|---|---|
committer | Wild Kat <wk@users.noreply.github.com> | 2018-06-19 08:28:30 +0200 |
commit | 917736aebb80799d8b38c1a577bf53acd648e43c (patch) | |
tree | eb66813b1ae769a0ccfae91b17fab6665181694a /lib/oxidized/model | |
parent | 67862310b2b868a037a0f457c07b3c655ec216d1 (diff) |
Unintentional config changes in legacy xos, closes #1348 (#1362)
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/xos.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/oxidized/model/xos.rb b/lib/oxidized/model/xos.rb index 5ce8017..a589d0b 100644 --- a/lib/oxidized/model/xos.rb +++ b/lib/oxidized/model/xos.rb @@ -27,7 +27,7 @@ class XOS < Oxidized::Model end cmd 'show configuration' do |cfg| - cfg = cfg.each_line.reject { |line| line.match /^#(\s[\w]+\s)(Configuration generated)/ }.join + cfg = cfg.each_line.reject { |line| line.match /^#(\s[\w -]+\s)(Configuration generated)/ }.join cfg end @@ -41,7 +41,13 @@ class XOS < Oxidized::Model end cfg :telnet, :ssh do - post_login 'disable clipaging' + post_login do + data = cmd 'disable clipaging session' + match = data.match /^disable clipaging session\n\*?[\w .-]+(:\d+)? # $/m + next if match + cmd 'disable clipaging' + end + pre_logout do send "exit\n" send "n\n" |