diff options
author | Elvin Efendi <elvin.efendiyev@gmail.com> | 2015-12-07 09:27:04 -0500 |
---|---|---|
committer | Elvin Efendi <elvin.efendiyev@gmail.com> | 2015-12-07 09:27:04 -0500 |
commit | d0105ef311a9bfd0ecd23efe77678670d6042e02 (patch) | |
tree | b6d790f77a5a3b2aa2a3652682ff90c23380e8a6 /lib/oxidized/model/junos.rb | |
parent | cdb6cf6f2cd3d93d5b704025bdd618b2f4a59859 (diff) | |
parent | d0736c757645694ed255e060c5eab45c21f9ffa6 (diff) |
Merge pull request #8 from Shopify/fix-stripping-bug
bug fix
Diffstat (limited to 'lib/oxidized/model/junos.rb')
-rw-r--r-- | lib/oxidized/model/junos.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb index a02d588..1b641ca 100644 --- a/lib/oxidized/model/junos.rb +++ b/lib/oxidized/model/junos.rb @@ -54,7 +54,8 @@ class JunOS < Oxidized::Model end cmd('show chassis hardware detail') { |cfg| comment cfg } cmd('show chassis routing-engine') do |cfg| - cfg.gsub!(/(\S+\s+)(\d+)( percent)/, '\1<stripped>\3') + cfg.gsub!(/(\S+\s+)(\d{2})( percent)/, '\1<stripped>\3') + cfg.gsub!(/(\S+\s+)(\s\d{1})( percent)/, '\1<stripped>\3') cfg.gsub!(/(\s+\d+ days,)(.+seconds)/, '\1 <stripped>\3') cfg.gsub!(/(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)/, '\1<stripped>\3<stripped>\5<stripped>') comment cfg |