public TreeMap<String, String> getMetadataAmbariLevelParams() {
    TreeMap<String, String> clusterLevelParams = new TreeMap<>();
    clusterLevelParams.put(JDK_LOCATION, getJdkResourceUrl());
    clusterLevelParams.put(JAVA_HOME, getJavaHome());
    clusterLevelParams.put(AMBARI_JAVA_HOME, getAmbariJavaHome());
    clusterLevelParams.put(JAVA_VERSION, String.valueOf(configs.getJavaVersion()));
    clusterLevelParams.put(JDK_NAME, getJDKName());
    clusterLevelParams.put(JCE_NAME, getJCEName());
    clusterLevelParams.put(DB_NAME, getServerDB());
    clusterLevelParams.put(MYSQL_JDBC_URL, getMysqljdbcUrl());
    clusterLevelParams.put(ORACLE_JDBC_URL, getOjdbcUrl());
    clusterLevelParams.put(DB_DRIVER_FILENAME, configs.getMySQLJarName());
    clusterLevelParams.putAll(getRcaParameters());
    clusterLevelParams.put(HOST_SYS_PREPPED, configs.areHostsSysPrepped());
    clusterLevelParams.put(AGENT_STACK_RETRY_ON_UNAVAILABILITY, configs.isAgentStackRetryOnInstallEnabled());
    clusterLevelParams.put(AGENT_STACK_RETRY_COUNT, configs.getAgentStackRetryOnInstallCount());

    boolean serverUseSsl = configs.getApiSSLAuthentication();
    int port = serverUseSsl ? configs.getClientSSLApiPort() : configs.getClientApiPort();
    clusterLevelParams.put(AMBARI_SERVER_HOST, StageUtils.getHostName());
    clusterLevelParams.put(AMBARI_SERVER_PORT, Integer.toString(port));
    clusterLevelParams.put(AMBARI_SERVER_USE_SSL, Boolean.toString(serverUseSsl));

    for (Map.Entry<String, String> dbConnectorName : configs.getDatabaseConnectorNames().entrySet()) {
      clusterLevelParams.put(dbConnectorName.getKey(), dbConnectorName.getValue());
    }
    for (Map.Entry<String, String> previousDBConnectorName : configs.getPreviousDatabaseConnectorNames().entrySet()) {
      clusterLevelParams.put(previousDBConnectorName.getKey(), previousDBConnectorName.getValue());
    }
    clusterLevelParams.put(GPL_LICENSE_ACCEPTED, configs.getGplLicenseAccepted().toString());

    return clusterLevelParams;
  }
Collects full metadata info about clusters for agent.
@return metadata info about clusters
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java