def check_cluster_connectivity(cluster):
 try:
  resp = do_single_request(HTTP_GET, '/ws.v1/control-cluster', cluster=cluster)
 except Exception as e:
  msg = ('Failed to connect to cluster %s: %s' % (cluster, str(e)))
  raise Exception(msg)
 return json.loads(resp)

def check_cluster_connectivity ( cluster ) : try : resp = do_single_request ( HTTP_GET , '/ws.v1/control-cluster' , cluster = cluster ) except Exception as e : msg = ( 'Failed to connect to cluster %s: %s' % ( cluster , str ( e ) ) ) raise Exception ( msg ) return json . loads ( resp )
make sure that we can issue a request to each of the cluster nodes .