def list_keyspaces(contact_points=None, port=None, cql_user=None, cql_pass=None):
 query = 'select keyspace_name\n                 from system.schema_keyspaces;'
 ret = {}
 try:
  ret = cql_query(query, contact_points, port, cql_user, cql_pass)
 except CommandExecutionError:
  log.critical('Could not list keyspaces.')
  raise
 except BaseException as e:
  log.critical('Unexpected error while listing keyspaces: {0}'.format(str(e)))
  raise
 return ret

def list_keyspaces ( contact_points = None , port = None , cql_user = None , cql_pass = None ) : query = 'select keyspace_name\n                 from system.schema_keyspaces;' ret = { } try : ret = cql_query ( query , contact_points , port , cql_user , cql_pass ) except CommandExecutionError : log . critical ( 'Could not list keyspaces.' ) raise except BaseException as e : log . critical ( 'Unexpected error while listing keyspaces: {0}' . format ( str ( e ) ) ) raise return ret
list keyspaces in a cassandra cluster .