private String resolveOsUrl(String os, Map<String, String> osMap) {

    // !!! look for the OS directly
    if (osMap.containsKey(os))
      return osMap.get(os);

    // !!! os not found, find and return the first compatible one
    Set<String> possibleTypes = os_family.findTypes(os);

    for (String type : possibleTypes) {
      if (osMap.containsKey(type))
        return osMap.get(type);
    }

    return null;
  }
Resolves a base url given that certain OS types can be used interchangeably.
@param os the target os to find
@param osMap the map of os-to-baseurl
@return the url for an os.
ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java