'read from driver configuration file.'

def _get_drvcfg(self, tagname, filename=None, multiple=False):

    if (filename is None):
        filename = self.configuration.cinder_eternus_config_file
    LOG.debug('_get_drvcfg,    input[%(filename)s][%(tagname)s].', {'filename': filename, 'tagname': tagname})
    tree = parse(filename)
    elem = tree.getroot()
    ret = None
    if (not multiple):
        ret = elem.findtext(('.//' + tagname))
    else:
        ret = []
        for e in elem.findall(('.//' + tagname)):
            if ((e.text is not None) and (e.text not in ret)):
                ret.append(e.text)
    if (not ret):
        msg = (_('_get_drvcfg,    filename:    %(filename)s,    tagname:    %(tagname)s,    data    is    None!!    Please    edit    driver    configuration    file    and    correct.') % {'filename': filename, 'tagname': tagname})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    return ret
