private RequestStageContainer createRequest(String caption) {
    ActionManager actionManager = getManagementController().getActionManager();

    RequestStageContainer requestStages = new RequestStageContainer(
            actionManager.getNextRequestId(), null, requestFactory, actionManager);
    requestStages.setRequestContext(caption);

    return requestStages;
  }
Adds requested entities to resources
@param resources a list of resources to add to
@param requestedEntities requested entities
@param requestedIds
@param clusterName name of cluster or null if no any
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java