Class: SonicOS
- Inherits:
-
Oxidized::Model
- Object
- Oxidized::Model
- SonicOS
- Defined in:
- lib/oxidized/model/sonicos.rb
Instance Attribute Summary
Attributes inherited from Oxidized::Model
Instance Method Summary collapse
Methods inherited from Oxidized::Model
cfg, #cfg, cfgs, cmd, #cmd, cmds, comment, #comment, expect, #expect, expects, #expects, #get, inherited, #output, post, pre, prompt, #prompt, #screenscrape, #send
Methods included from Oxidized::Config::Vars
Instance Method Details
#clean(cfg) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/oxidized/model/sonicos.rb', line 38 def clean(cfg) out = [] cfg.each_line do |line| next if line =~ /system-time \"\d{2}\/\d{2}\/\d{4} \d{2}\:\d{2}:\d{2}.\d+\"/ next if line =~ /system-uptime "(\s+up\s+\d+\s+)|(.*Days.*)"/ next if line =~ /checksum \d+/ line = line[1..-1] if line[0] == "\r" out << line.strip end out = out.join "\n" out << "\n" end |