diff options
author | Wild Kat <wk@users.noreply.github.com> | 2018-05-26 23:49:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-26 23:49:29 +0200 |
commit | 39dbb74c527c054007e26ad34c8921d4be6cb638 (patch) | |
tree | d55745153153450fb40e1f591eb861495a6068d9 /lib/oxidized/model/xos.rb | |
parent | defdc69f92b3bcf62b1fd3b5ceac63a7a4e637ae (diff) | |
parent | 42bf10b7bce34ff577c469f6c2f659f3913cbf4a (diff) |
Merge branch 'master' into FortiOS-Push
Diffstat (limited to 'lib/oxidized/model/xos.rb')
-rw-r--r-- | lib/oxidized/model/xos.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/oxidized/model/xos.rb b/lib/oxidized/model/xos.rb index 90f6f4a..5ce8017 100644 --- a/lib/oxidized/model/xos.rb +++ b/lib/oxidized/model/xos.rb @@ -1,5 +1,4 @@ class XOS < Oxidized::Model - # Extreme Networks XOS prompt /^*?[\w .-]+# $/ @@ -8,7 +7,7 @@ class XOS < Oxidized::Model cmd :all do |cfg| # xos inserts leading \r characters and other trailing white space. # this deletes extraneous \r and trailing white space. - cfg.each_line.to_a[1..-2].map{|line|line.delete("\r").rstrip}.join("\n") + "\n" + cfg.each_line.to_a[1..-2].map { |line| line.delete("\r").rstrip }.join("\n") + "\n" end cmd 'show version' do |cfg| @@ -23,11 +22,14 @@ class XOS < Oxidized::Model comment cfg end - cmd 'show switch'do |cfg| + cmd 'show switch' do |cfg| comment cfg.each_line.reject { |line| line.match /Time:/ or line.match /boot/i }.join end - cmd 'show configuration' + cmd 'show configuration' do |cfg| + cfg = cfg.each_line.reject { |line| line.match /^#(\s[\w]+\s)(Configuration generated)/ }.join + cfg + end cmd 'show policy detail' do |cfg| comment cfg @@ -45,5 +47,4 @@ class XOS < Oxidized::Model send "n\n" end end - end |