public List<DataNode> getAllExistingDataNodes() {
      List<DataNode> dataNodes = new ArrayList<>();
      for (Datacenter dcObj : hardwareLayout.getDatacenters()) {
        dataNodes.addAll(dcObj.getDataNodes());
      }
      return Collections.unmodifiableList(dataNodes);
    }
@return all existing nodes in hardware layout when this method is being invoked.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/TestUtils.java