public ServiceInfo getService(String name) {
    Collection<ServiceInfo> services = getServices();
    for (ServiceInfo service : services) {
      if (service.getName().equals(name)) {
        return service;
      }
    }
    //todo: exception?
    return null;
  }
@return A list containing all repos for this stack, grouped by os
ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java