@Deprecated
  public void addRepoInfoToHostLevelParams(final Cluster cluster, final ActionExecutionContext actionContext,
                                           final RepositoryVersionEntity repositoryVersion, final Map<String, String> hostLevelParams,
                                           final String hostName) throws AmbariException {

    // if the repo is null, see if any values from the context should go on the
    // host params and then return
    if (null == repositoryVersion) {
      // see if the action context has a repository set to use for the command
      if (null != actionContext.getStackId()) {
        StackId stackId = actionContext.getStackId();
        hostLevelParams.put(KeyNames.STACK_NAME, stackId.getStackName());
        hostLevelParams.put(KeyNames.STACK_VERSION, stackId.getStackVersion());
      }

      return;
    } else {
      StackId stackId = repositoryVersion.getStackId();
      hostLevelParams.put(KeyNames.STACK_NAME, stackId.getStackName());
      hostLevelParams.put(KeyNames.STACK_VERSION, stackId.getStackVersion());
    }
  }
This method builds and adds repo infoto hostLevelParams of action

@param cluster cluster to which host level params belongs
@param actionContext context of the action. Must be not {@code null}
@param repositoryVersion repository version entity to use
@param hostLevelParams hasgmap with host level params. Must be not {@code null}
@param hostName host name to which add repo onfo
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/RepositoryVersionHelper.java