'Parse an XML authentication reply to extract the session key.'

def _get_auth_token(self, xml):

    self._session_key = None
    try:
        tree = etree.XML(xml)
        if (tree.findtext(".//PROPERTY[@name='response-type']") == 'success'):
            self._session_key = tree.findtext(".//PROPERTY[@name='response']")
    except Exception as e:
        msg = (_('Cannot    parse    session    key:    %s') % e.msg)
        raise exception.DotHillConnectionError(message=msg)
