TunedConfIni - file /etc/tuned.conf
¶
-
class
insights.parsers.tuned_conf.
TunedConfIni
(context)[source]¶ Bases:
insights.core.IniConfigFile
This class parses the
/etc/tuned.conf
file using theIniConfigFile
base parser.Sample configuration file:
# # Net tuning section # [NetTuning] # Enabled or disable the plugin. Default is True. Any other value # disables it. enabled=False # # CPU monitoring section # [CPUMonitor] # Enabled or disable the plugin. Default is True. Any other value # disables it. # enabled=False
Examples
>>> 'NetTuning' in tuned_obj.sections() True >>> tuned_obj.get('NetTuning', 'enabled') == "False" True >>> tuned_obj.getboolean('NetTuning', 'enabled') == False True >>> sorted(tuned_obj.sections())==sorted(['CPUMonitor', 'NetTuning']) True
-
parse_content
(content, allow_no_value=True)[source]¶ Parses content of the config file.
In child class overload and call super to set flag
allow_no_values
and allow keys with no value in config file:def parse_content(self, content): super(YourClass, self).parse_content(content, allow_no_values=True)
-