@Deprecated
  private JsonArray getBaseUrls(Cluster cluster, ServiceComponent component, Host host) throws SystemException {

    String hostOsType = host.getOsType();
    String hostOsFamily = host.getOsFamily();
    String hostName = host.getHostName();

    StackId stackId = component.getDesiredStackId();
    Map<String, List<RepositoryInfo>> repos;

    try {
      repos = ami.get().getRepository(stackId.getStackName(), stackId.getStackVersion());
    }catch (AmbariException e) {
      throw new SystemException("Unhandled exception", e);
    }

    String family = os_family.get().find(hostOsType);
    if (null == family) {
      family = hostOsFamily;
    }

    final List<RepositoryInfo> repoInfoList;

    // !!! check for the most specific first
    if (repos.containsKey(hostOsType)) {
      repoInfoList = repos.get(hostOsType);
    } else if (null != family && repos.containsKey(family)) {
      repoInfoList = repos.get(family);
    } else {
      repoInfoList = null;
      LOG.warn("Could not retrieve repo information for host"
        + ", hostname=" + hostName
        + ", clusterName=" + cluster.getClusterName()
        + ", stackInfo=" + stackId.getStackId());
    }

    return (null == repoInfoList) ? null : (JsonArray) gson.toJsonTree(repoInfoList);
  }
Executed by two different representations of repos.  When we are comfortable with the new
implementation, this may be removed and called inline in {@link #getCommandRepository(Cluster, ServiceComponent, Host)}

@param cluster   the cluster to isolate the stack
@param component the component
@param host      used to resolve the family for the repositories
@return JsonArray the type as defined by the supplied {@code function}.
@throws SystemException
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/RepositoryVersionHelper.java