diff options
author | ytti <saku@ytti.fi> | 2018-04-27 16:34:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-27 16:34:25 +0300 |
commit | 94cc123723aa42d7d1a35af39f51427fdd15cc5f (patch) | |
tree | 64d7813aa2df4b98664a5000c4e8b8bec1849109 /lib/oxidized/model/xos.rb | |
parent | f530a50a949310aa9996d764eeaaba7458b7d6b6 (diff) | |
parent | 36758bb67d28e49f66608ce54fd1e9e57f2267da (diff) |
Merge pull request #1314 from wk/xos-scrub-generated
scrub generated time from xos.rb configs (closes #629)
Diffstat (limited to 'lib/oxidized/model/xos.rb')
-rw-r--r-- | lib/oxidized/model/xos.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/oxidized/model/xos.rb b/lib/oxidized/model/xos.rb index e862596..5ce8017 100644 --- a/lib/oxidized/model/xos.rb +++ b/lib/oxidized/model/xos.rb @@ -26,7 +26,10 @@ class XOS < Oxidized::Model 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 |