@classmethod
def iter_nodes(cls, cluster):
    """
        Iterates through all nodes.

        :param cluster: Cluster instance
        :type cluster: Cluster
        :return: Generator for all nodes
        :rtype: generator
        """
    info = cluster.es.nodes.info(metric='settings')
    for node_id, node in info['nodes'].items():
        yield cls(cluster, node_id)
