#NEWLINE# def checkResourceRequest( self , memory , cores , disk ) : #NEWLINE# #INDENT# '\n        Check resource request is not greater than that available or allowed.\n\n        :param int memory: amount of memory being requested, in bytes\n\n        :param float cores: number of cores being requested\n\n        :param int disk: amount of disk space being requested, in bytes\n\n        :raise InsufficientSystemResources: raised when a resource is requested in an amount\n               greater than allowed\n        ' #NEWLINE# assert ( memory is not None ) #NEWLINE# assert ( disk is not None ) #NEWLINE# assert ( cores is not None ) #NEWLINE# if ( cores > self . maxCores ) : #NEWLINE# #INDENT# raise InsufficientSystemResources ( 'cores' , cores , self . maxCores ) #NEWLINE# #UNINDENT# if ( memory > self . maxMemory ) : #NEWLINE# #INDENT# raise InsufficientSystemResources ( 'memory' , memory , self . maxMemory ) #NEWLINE# #UNINDENT# if ( disk > self . maxDisk ) : #NEWLINE# #INDENT# raise InsufficientSystemResources ( 'disk' , disk , self . maxDisk )