#NEWLINE# def set_tracked_resource( self , resource_name , model_class , override = False ) : #NEWLINE# #INDENT# if ( not cfg . CONF . QUOTAS . track_quota_usage ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# current_model_class = self . _tracked_resource_mappings . setdefault ( resource_name , model_class ) #NEWLINE# if ( current_model_class != model_class ) : #NEWLINE# #INDENT# LOG . debug ( 'A model class is already defined for %(resource)s: %(current_model_class)s. Override:%(override)s' , { #NEWLINE# #INDENT# 'resource' : resource_name , #NEWLINE# 'current_model_class' : current_model_class , #NEWLINE# 'override' : override , #NEWLINE# #UNINDENT# } ) #NEWLINE# if override : #NEWLINE# #INDENT# self . _tracked_resource_mappings [ resource_name ] = model_class #NEWLINE# #UNINDENT# #UNINDENT# LOG . debug ( 'Tracking information for resource: %s configured' , resource_name )