#NEWLINE# def stub_cast_to_cells( context , instance , method , * args , **kwargs ) : #NEWLINE# #INDENT# fn = getattr ( ORIG_COMPUTE_API , args ) #NEWLINE# original_instance = kwargs . pop ( 'original_instance' , None ) #NEWLINE# if original_instance : #NEWLINE# #INDENT# instance = original_instance #NEWLINE# db . instance_update ( context , instance [ 'uuid' ] , dict ( vm_state = instance [ 'vm_state' ] , task_state = instance [ 'task_state' ] ) ) #NEWLINE# #UNINDENT# saved_quotas = quota . QUOTAS #NEWLINE# quota . QUOTAS = quota . QuotaEngine ( quota_driver_class = quota . NoopQuotaDriver ( ) ) #NEWLINE# compute_api . QUOTAS = quota . QUOTAS #NEWLINE# try : #NEWLINE# #INDENT# fn ( context , instance , * args , ** kwargs ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# quota . QUOTAS = saved_quotas #NEWLINE# compute_api . QUOTAS = saved_quotas