Map<String, Map<String, Set<String>>> getAllServices(AddServiceInfo info) throws AmbariException {
    Cluster cluster = managementController.getClusters().getCluster(info.clusterName());
    Map<String, Map<String, Set<String>>> clusterServices = transformValues(
      cluster.getServices(),
      service -> transformValues(service.getServiceComponents(), component -> component.getServiceComponentsHosts()));

   return  mergeDisjunctMaps(clusterServices, info.newServices());
  }
Gets all services from the cluster together together with services from AddServiceInfo.
@param info
@return A map of <i>service name -> component name -> hosts</i> for all services in the cluster and the input
 AddServiceInfo combined.
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/StackAdvisorAdapter.java