'Checks if the session is active.'

def _check_session(self):

    if ((self._session is None) or (self._session not in _db_content['session'])):
        LOG.debug('Session    is    faulty')
        raise vexc.VimFaultException([vexc.NOT_AUTHENTICATED], 'Session    Invalid')
