public final Set<String> getServicesInUpgrade(UpgradeCheckRequest request) throws AmbariException {
    final Cluster cluster = clustersProvider.get().getCluster(request.getClusterName());

    // the check is scoped to some services, so determine if any of those
    // services are included in this upgrade
    try {
      VersionDefinitionXml vdf = getVersionDefinitionXml(request);
      ClusterVersionSummary clusterVersionSummary = vdf.getClusterSummary(cluster,
          metaInfoProvider.get());
      return clusterVersionSummary.getAvailableServiceNames();
    } catch (Exception exception) {
      throw new AmbariException("Unable to run upgrade checks because of an invalid VDF",
          exception);
    }
  }
Gets the services participating in the upgrade from the VDF.

@param request
         the upgrade check request.
@return the services participating in the upgrade, which can either be all
        of the cluster's services or a subset based on repository type.
ambari-server/src/main/java/org/apache/ambari/server/state/CheckHelper.java