#NEWLINE# def limit_check( self , context , tenant_id , resources , values ) : #NEWLINE# #INDENT# 'Check simple quota limits.\n\n        For limits--those quotas for which there is no usage\n        synchronization function--this method checks that a set of\n        proposed values are permitted by the limit restriction.\n\n        If any of the proposed values is over the defined quota, an\n        OverQuota exception will be raised with the sorted list of the\n        resources which are too high.  Otherwise, the method returns\n        nothing.\n\n        :param context: The request context, for access checks.\n        :param tenant_id: The tenant_id to check the quota.\n        :param resources: A dictionary of the registered resources.\n        :param values: A dictionary of the values to check against the\n                       quota.\n        ' #NEWLINE# unders = [ key for ( key , val ) in values . items ( ) if ( val < 0 ) ] #NEWLINE# if unders : #NEWLINE# #INDENT# raise n_exc . InvalidQuotaValue ( unders = sorted ( unders ) ) #NEWLINE# #UNINDENT# quotas = self . _get_quotas ( context , tenant_id , resources ) #NEWLINE# overs = [ key for ( key , val ) in values . items ( ) if ( 0 <= quotas [ key ] < val ) ] #NEWLINE# if overs : #NEWLINE# #INDENT# raise exceptions . OverQuota ( overs = sorted ( overs ) )