| 452 | |
| 453 | |
| 454 | def is_current_cluster(cluster_name, node_counts, workloads): |
| 455 | global CCM_CLUSTER |
| 456 | if CCM_CLUSTER and CCM_CLUSTER.name == cluster_name: |
| 457 | if [len(list(nodes)) for dc, nodes in |
| 458 | groupby(CCM_CLUSTER.nodelist(), lambda n: n.data_center)] == node_counts: |
| 459 | for node in CCM_CLUSTER.nodelist(): |
| 460 | if set(node.workloads) != set(workloads): |
| 461 | print("node workloads don't match creating new cluster") |
| 462 | return False |
| 463 | return True |
| 464 | return False |
| 465 | |
| 466 | |
| 467 | def start_cluster_wait_for_up(cluster): |