Ejemplo n.º 1
0
    def setup_positions(self, subclusters):
        """ Return new cluster with nodes form main_cluster and with
            subclusters defined as in subcluster argument. """

        positions = [{k: v
                      for k, v in self.test_cluster.items() if k in sub}
                     for sub in subclusters]
        return Positions(positions)