@Experimental(feature=ExperimentalFeature.PATCH_UPGRADES)
  public CommandRepository getCommandRepository(final Cluster cluster, ServiceComponent component, final Host host)
    throws SystemException {

    RepositoryVersionEntity repoVersion = getRepositoryVersionEntity(cluster, component);
    RepoOsEntity osEntity = getOSEntityForHost(host, repoVersion);

    return getCommandRepository(repoVersion, osEntity);
  }
Builds repository information for inclusion in a command.  This replaces escaping json on
a command.

@param cluster the cluster
@param host    the host
@param component {@link ServiceComponent} object, could be null to return service-related repository
@return  the command repository
@throws SystemException
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/RepositoryVersionHelper.java