#NEWLINE# def CreateClientWithVolumes( self , available = 50 ) : #NEWLINE# #INDENT# with self . ACLChecksDisabled ( ) : #NEWLINE# #INDENT# client_id = self . SetupClients ( 1 ) [ 0 ] #NEWLINE# with aff4 . FACTORY . Open ( client_id , mode = 'rw' , token = self . token ) as client_obj : #NEWLINE# #INDENT# volume = rdf_client . Volume ( total_allocation_units = 100 , actual_available_allocation_units = available ) #NEWLINE# client_obj . Set ( client_obj . Schema . VOLUMES ( [ volume ] ) ) #NEWLINE# #UNINDENT# self . RequestAndGrantClientApproval ( client_id ) #NEWLINE# #UNINDENT# client_obj = aff4 . FACTORY . Open ( client_id , token = self . token ) #NEWLINE# return client_id