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 | |
parent | 67862310b2b868a037a0f457c07b3c655ec216d1 (diff) |
Unintentional config changes in legacy xos, closes #1348 (#1362)
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | docs/Supported-OS-Types.md | 1 | ||||
-rw-r--r-- | lib/oxidized/model/xos.rb | 10 |
3 files changed, 10 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a6d98a..7d01b98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Master +* BUGFIX: xos model should not modify config on legacy Extreme Networks devices (sq9mev) * BUGFIX: model edgecos, ciscosmb * MISC: bump Dockerfile phusion/baseimage:0.10.0 -> 0.10.1 diff --git a/docs/Supported-OS-Types.md b/docs/Supported-OS-Types.md index 067e0fd..59775ae 100644 --- a/docs/Supported-OS-Types.md +++ b/docs/Supported-OS-Types.md @@ -84,6 +84,7 @@ * [Enterasys](/lib/oxidized/model/enterasys.rb) * [WM](/lib/oxidized/model/mtrlrfs.rb) * [XOS](/lib/oxidized/model/xos.rb) + * [ExtremeWare](/lib/oxidized/model/xos.rb) * F5 * [TMOS](/lib/oxidized/model/tmos.rb) * Fiberstore 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" |