MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / is_current_cluster

Function is_current_cluster

tests/integration/__init__.py:454–464  ·  view source on GitHub ↗
(cluster_name, node_counts, workloads)

Source from the content-addressed store, hash-verified

452
453
454def 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
467def start_cluster_wait_for_up(cluster):

Callers 1

use_clusterFunction · 0.85

Calls 1

setFunction · 0.85

Tested by

no test coverage detected