def __init__(self, app, debug=False):
self.app = app<EOL>self.debug = debug<EOL>self._id = None<EOL>self._queue = []<EOL>self.functiondict = {<EOL>'<STR_LIT>' : self.delay_requests,<EOL>'<STR_LIT>' : self.delay_responses,<EOL>'<STR_LIT>' : self.abort_requests,<EOL>'<STR_LIT>' : self.abort_responses,<EOL>'<STR_LIT>' : self.partition_services,<EOL>'<STR_LIT>' : self.crash_service,<EOL>'<STR_LIT>' : self.overload_service<EOL>}<EOL>if debug:<EOL><INDENT>http.client.HTTPConnection.debuglevel = <NUM_LIT:1><EOL>logging.getLogger().setLevel(logging.DEBUG)<EOL>requests_log.setLevel(logging.DEBUG)<EOL>requests_log.propagate = True<EOL><DEDENT>
Create a new failure generator
@param app ApplicationGraph: instance of ApplicationGraph object