private String getClusterName(RemoteAmbariClusterEntity remoteAmbariClusterEntity) {
    String[] urlSplit = remoteAmbariClusterEntity.getUrl().split("/");

    // remoteAmbariClusterEntity.getName() is not the actual name of Remote Cluster
    // We need to extract the name from cluster url which is like. http://host:port/api/vi/clusters/${clusterName}
    return urlSplit[urlSplit.length - 1];
  }
Constructor for Remote Ambari Cluster

@param remoteAmbariClusterEntity
ambari-server/src/main/java/org/apache/ambari/server/view/RemoteAmbariCluster.java