'Return the current mount state.
_HostMountStateManager will not permit a new state object to be
created while any previous state object is still in use.
get_state will raise HypervisorUnavailable if the libvirt connection is
currently down.
:rtype: _HostMountState'

@contextlib.contextmanager
def get_state(self):

    with self.cond:
        state = self.state
        if (state is None):
            raise exception.HypervisorUnavailable(host=CONF.host)
        self.use_count += 1
    try:
        LOG.debug('Got    _HostMountState    generation    %(gen)i', {'gen': state.generation})
        (yield state)
    finally:
        with self.cond:
            self.use_count -= 1
            self.cond.notify_all()
