#NEWLINE# def task_log_get_all( self , ctxt , task_name , period_beginning , period_ending , host = None , state = None ) : #NEWLINE# #INDENT# "Get task logs from the DB from all cells or a particular\n        cell.\n\n        If 'host' is not None, host will be of the format 'cell!name@host',\n        with '@host' being optional.  The query will be directed to the\n        appropriate cell and return all task logs, or task logs matching\n        the host if specified.\n\n        'state' also may be None.  If it's not, filter by the state as well.\n        " #NEWLINE# if ( host is None ) : #NEWLINE# #INDENT# cell_name = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( cell_name , host ) = cells_utils . split_cell_and_item ( host ) #NEWLINE# if ( cell_name is None ) : #NEWLINE# #INDENT# ( cell_name , host ) = ( host , cell_name ) #NEWLINE# #UNINDENT# #UNINDENT# responses = self . msg_runner . task_log_get_all ( ctxt , cell_name , task_name , period_beginning , period_ending , host = host , state = state ) #NEWLINE# ret_task_logs = [ ] #NEWLINE# for response in responses : #NEWLINE# #INDENT# task_logs = response . value_or_raise ( ) #NEWLINE# for task_log in task_logs : #NEWLINE# #INDENT# cells_utils . add_cell_to_task_log ( task_log , response . cell_name ) #NEWLINE# ret_task_logs . append ( task_log ) #NEWLINE# #UNINDENT# #UNINDENT# return period_beginning