#NEWLINE# def do( self , workflow_dict ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# database = workflow_dict [ 'database' ] #NEWLINE# instances_detail = [ ] #NEWLINE# for instance in database . databaseinfra . instances . filter ( instance_type = Instance . REDIS ) : #NEWLINE# #INDENT# instances_detail . append ( { #NEWLINE# #INDENT# 'instance' : instance , #NEWLINE# 'offering_changed' : False , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# workflow_dict [ 'instances_detail' ] = instances_detail #NEWLINE# context_dict = { #NEWLINE# #INDENT# 'IS_HA' : False , #NEWLINE# 'DBPASSWORD' : database . databaseinfra . password , #NEWLINE# 'DATABASENAME' : database . name , #NEWLINE# #UNINDENT# } #NEWLINE# workflow_dict [ 'initial_context_dict' ] = instance #NEWLINE# return True #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# traceback = full_stack ( ) #NEWLINE# workflow_dict [ 'exceptions' ] [ 'error_codes' ] . append ( DBAAS_0015 ) #NEWLINE# workflow_dict [ 'exceptions' ] [ 'traceback' ] . append ( traceback ) #NEWLINE# return False