public String getRepoInfoString(Cluster cluster, ServiceComponent component, Host host) throws AmbariException, SystemException {
    return gson.toJson(getCommandRepository(cluster, component, host));
  }
Get repository info given a cluster and host.

@param cluster  the cluster
@param host     the host

@return the repo info

@throws AmbariException if the repository information can not be obtained
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/RepositoryVersionHelper.java