parameters: (master, config, query=None)
return_statement: return data[key]
docstring: Get the tasks in a Mesos cluster.
docstring_summary: Get the tasks in a Mesos cluster.
docstring_tokens: Get the tasks in a Mesos cluster .
function: def get_tasks(master, config, query=None):
      """
      Get the tasks in a Mesos cluster.
      """
      endpoint = "tasks"
      key = "tasks"
  
      if query is None:
          query = {'order':'asc', 'limit':'-1'}
  
      try:
          data = http.get_json(master, endpoint, config, query=query)
      except Exception as exception:
          raise CLIException(
              "Could not open '/{endpoint}' with query parameters: {query}"
              "on master: {error}"
              .format(endpoint=endpoint, query=query, error=exception))
  
      if not key in data:
          raise CLIException(
              "Missing '{key}' key in data retrieved"
              " from master on '/{endpoint}' with query parameters: {query}"
              .format(key=key, endpoint=endpoint, query=query))
  
      return data[key]
function_tokens: def get_tasks ( master , config , query = None ) : endpoint = "tasks" key = "tasks" if query is None : query = { 'order' : 'asc' , 'limit' : '-1' } try : data = http . get_json ( master , endpoint , config , query = query ) except Exception as exception : raise CLIException ( "Could not open '/{endpoint}' with query parameters: {query}" "on master: {error}" . format ( endpoint = endpoint , query = query , error = exception ) ) if not key in data : raise CLIException ( "Missing '{key}' key in data retrieved" " from master on '/{endpoint}' with query parameters: {query}" . format ( key = key , endpoint = endpoint , query = query ) ) return data [ key ]