Conf Package

HPCStatsConf Module

class HPCStats.Conf.HPCStatsConf.HPCStatsConf(filename, cluster)

Bases: ConfigParser.ConfigParser, object

check_cluster()

Check for presence of cluster in configuration file. If any problem is encountered, HPCStatsConfigurationException is raised.

get(section, option, option_type=<type 'str'>)

Try to get option value in section of configuration. Raise HPCStatsConfigurationException if not found.

get_clusters_list()

Returns the list of clusters in configuration file. If any problem is encountered, HPCStatsConfigurationException is raised.

get_default(section, option, default, option_type=<type 'str'>)

Try to get option value in section of configuration. Return default if not found.

get_list(section, option)

Returns a comma separated multi-values parameter formatted into a list. If the parameter is not set, it returns an empty list.

read()

Check if configuration file exists and then read it. Raises HPCStatsConfigurationException if configuration file does not exist.