Class: AOSW
- Inherits:
-
Oxidized::Model
- Object
- Oxidized::Model
- AOSW
- Defined in:
- lib/oxidized/model/aosw.rb
Constant Summary
Constants inherited from Oxidized::Model
Oxidized::Model::METADATA_DEFAULT
Constants included from Oxidized::Model::Macros
Oxidized::Model::Macros::VERBS
Instance Attribute Summary
Attributes inherited from Oxidized::Model
Attributes included from Oxidized::Model::DSLCommands
Instance Method Summary collapse
Methods inherited from Oxidized::Model
#cfg, #cmd, #comment, #expect, #expects, #get, inherited, #interpolate_string, #metadata, #output, #prompt, #screenscrape, #send, #significant_changes, #xmlcomment
Methods included from Oxidized::Model::DSLSetup
#cfg, #cfgs, #comment, #expect, #expects, #input_sequence, #inputs, #metadata, #prompt
Methods included from Oxidized::Model::DSLCommands
Methods included from Oxidized::Config::Vars
Instance Method Details
#clean(cfg) ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/oxidized/model/aosw.rb', line 117 def clean(cfg) out = [] cfg.each_line do |line| # drop the temperature, fan speed and voltage, which change each run next if line =~ /Output \d Config/i next if line =~ /(Tachometers|Temperatures|Voltages)/ next if line =~ /((Card|CPU) Temperature|Chassis Fan|VMON1[0-9])/ next if line =~ /[0-9.]{1,6}\s+(RPMS?|m?V|C|W)/i out << line.strip end out = comment out.join "\n" out << "\n" end |
#rstrip_cfg(cfg) ⇒ Object
108 109 110 111 112 113 114 115 |
# File 'lib/oxidized/model/aosw.rb', line 108 def rstrip_cfg(cfg) out = [] cfg.each_line do |line| out << line.rstrip end out = out.join "\n" out << "\n" end |