private Map<String, ProvisionAction> findServicesWithCustomAction() {
    ProvisionAction requestAction = request.getRequest().getProvisionAction();
    return request.getRequest().getServices().stream()
      .filter(service -> service.getProvisionAction().isPresent())
      .filter(service -> !Objects.equals(requestAction, service.getProvisionAction().get()))
      .collect(toMap(Service::getName, service -> service.getProvisionAction().get()));
  }
Finds all services for which custom provision action was specified in the request.

@return service -> action map; only contains services whose action does not match the request-level action
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/ProvisionActionPredicateBuilder.java