def get_config_option(res_id, option, config_path):
    # Retrive the configuration file
    config = read_config_file(config_path)

    # If the section exists in the configuration file
    if config.has_section(res_id):
        try:
            # Return the value of the given option
            return config.get(res_id, option)
        except ConfigParser.NoOptionError:
            raise ResourceException("The option '%s' doesn't exist in "
                                    "libvirt configuration file." % option)
    else:
        raise ResourceException("The cloud manager '%s' doesn't exist in the "
                                "configuration file." % res_id)

#-----------------------------------------------------------------------------
Retrieves an option in a configuration file.
dataset/ETHPy150Open comodit/synapse-agent/custom_plugins/cloudmanagers-plugin/cm_util.py/get_config_option