public RequestStatusResponse getRequestStatus() {
    RequestStatusResponse requestStatus = new RequestStatusResponse(getRequestId());
    requestStatus.setRequestContext(getRequestContext());

    // convert HostRoleCommands to ShortTaskStatus
    List<ShortTaskStatus> shortTasks = new ArrayList<>();
    for (HostRoleCommand task : getCommands()) {
      shortTasks.add(new ShortTaskStatus(task));
    }
    requestStatus.setTasks(shortTasks);

    return requestStatus;
  }
Removes pending host requests (outstanding requests not picked up by any host, where hostName is null) for a host group.
@param hostGroupName
@return
ambari-server/src/main/java/org/apache/ambari/server/topology/LogicalRequest.java