def delete_execution(self, execution, query_string=''): """Deletes an execution. """ check_resource_type(execution, EXECUTION_PATH, message="An execution id is needed.") execution_id = get_execution_id(execution) if execution_id: return self._delete("%s%s" % (self.url, execution_id), query_string=query_string)
def update_execution(self, execution, changes): """Updates an execution. """ check_resource_type(execution, EXECUTION_PATH, message="An execution id is needed.") execution_id = get_execution_id(execution) if execution_id: body = json.dumps(changes) return self._update("%s%s" % (self.url, execution_id), body)
def delete_execution(self, execution): """Deletes an execution. """ check_resource_type(execution, EXECUTION_PATH, message="An execution id is needed.") execution_id = get_execution_id(execution) if execution_id: return self._delete("%s%s" % (self.url, execution_id))
def get_execution(self, execution, query_string=''): """Retrieves an execution. The execution parameter should be a string containing the execution id or the dict returned by create_execution. As execution is an evolving object that is processed until it reaches the FINISHED or FAULTY state, the function will return a dict that encloses the execution contents and state info available at the time it is called. """ check_resource_type(execution, EXECUTION_PATH, message="An execution id is needed.") execution_id = get_execution_id(execution) if execution_id: return self._get("%s%s" % (self.url, execution_id), query_string=query_string)