@locking.ssynchronized(_LOCK, shared=1)
  def GetLockInfo(self, requested): # pylint: disable=W0613
    """Retrieves information about pending requests.

    @type requested: set
    @param requested: Requested information, see C{query.LQ_*}

    """
    # No need to sort here, that's being done by the lock manager and query
    # library. There are no priorities for requests, hence all show up as
    # one item under "pending".
    result = []

    if self._pending_fn:
      owner_name = self._owner.getName()

      for client in self._pending_fn():
        req = client.GetCurrentRequest()
        if req:
          if req.nicename is None:
            name = "%s%s" % (req.host, req.path)
          else:
            name = req.nicename
          result.append(("rpc/%s" % name, None, [owner_name], None))

    return result
dataset/ETHPy150Open ganeti/ganeti/lib/http/client.py/_PendingRequestMonitor.GetLockInfo/original