VirtWhoConf - File /etc/virt-who.conf and /etc/virt-who.d/*.conf
The VirtWhoConf class parses the virt-who configuration files in ini-like
format.
Note
The configuration files under
/etc/virt-who.d/might contain sensitive information, likepassword. It must be filtered.
- class insights.parsers.virt_who_conf.VirtWhoConf(context)[source]
Bases:
IniConfigFileParse the
virt-whoconfiguration files/etc/virt-who.confand/etc/virt-who.d/*.conf.Sample configuration file:
#Terse version of the general config template: [global] interval=3600 #reporter_id= debug=False oneshot=False #log_per_config=False #log_dir= #log_file= #configs= [defaults] owner=Satellite env=Satellite
Examples
>>> type(conf) <class 'insights.parsers.virt_who_conf.VirtWhoConf'> >>> 'global' in conf True >>> conf.has_option('global', 'debug') True >>> conf.get('global', 'oneshot') 'False' >>> conf.getboolean('global', 'oneshot') False >>> conf.get('global', 'interval') '3600' >>> conf.getint('global', 'interval') 3600