def configured_cluster_for_nodes(reactor, certificates, nodes, dataset_backend, dataset_backend_configuration, dataset_backend_config_file, provider=None, logging_config=None):
 default_volume_size = get_default_volume_size(dataset_backend_configuration)
 cluster = Cluster(all_nodes=pvector(nodes), control_node=nodes[0], agent_nodes=nodes, dataset_backend=dataset_backend, default_volume_size=default_volume_size, certificates=certificates, dataset_backend_config_file=dataset_backend_config_file)
 configuring = perform(make_dispatcher(reactor), configure_cluster(cluster, dataset_backend_configuration, provider, logging_config))
 configuring.addCallback((lambda ignored: cluster))
 return configuring

def configured_cluster_for_nodes ( reactor , certificates , nodes , dataset_backend , dataset_backend_configuration , dataset_backend_config_file , provider = None , logging_config = None ) : default_volume_size = get_default_volume_size ( dataset_backend_configuration ) cluster = Cluster ( all_nodes = pvector ( nodes ) , control_node = nodes [ 0 ] , agent_nodes = nodes , dataset_backend = dataset_backend , default_volume_size = default_volume_size , certificates = certificates , dataset_backend_config_file = dataset_backend_config_file ) configuring = perform ( make_dispatcher ( reactor ) , configure_cluster ( cluster , dataset_backend_configuration , provider , logging_config ) ) configuring . addCallback ( ( lambda ignored : cluster ) ) return configuring
get a cluster with flocker services running on the right nodes .