@@ -269,43 +269,7 @@ def handle(self, *args, **options):
269269 start_date = datetime .datetime .now ()
270270 end_date = datetime .datetime .now () + relativedelta (days = 365 )
271271
272- # Add PI cluster
273- allocation_obj , _ = Allocation .objects .get_or_create (
274- project = project_obj ,
275- status = AllocationStatusChoice .objects .get (name = "Active" ),
276- start_date = start_date ,
277- end_date = end_date ,
278- is_changeable = True ,
279- justification = "I need access to my nodes." ,
280- )
281-
282- allocation_obj .resources .add (Resource .objects .get (name = "Tandon" ))
283- allocation_obj .save ()
284-
285- allocation_attribute_type_obj = AllocationAttributeType .objects .get (
286- name = "slurm_account_name"
287- )
288- AllocationAttribute .objects .get_or_create (
289- allocation_attribute_type = allocation_attribute_type_obj ,
290- allocation = allocation_obj ,
291- value = f"torch_pr_{ allocation_obj .project .pk } _Tandon" ,
292- )
293-
294- allocation_attribute_type_obj = AllocationAttributeType .objects .get (
295- name = "slurm_user_specs"
296- )
297- AllocationAttribute .objects .get_or_create (
298- allocation_attribute_type = allocation_attribute_type_obj ,
299- allocation = allocation_obj ,
300- value = "Fairshare=parent" ,
301- )
302-
303- allocation_user_obj = AllocationUser .objects .create (
304- allocation = allocation_obj ,
305- user = pi1 ,
306- status = AllocationUserStatusChoice .objects .get (name = "Active" ),
307- )
308- # Add university cluster
272+ # Add university allocation
309273 allocation_obj , _ = Allocation .objects .get_or_create (
310274 project = project_obj ,
311275 status = AllocationStatusChoice .objects .get (name = "Active" ),
@@ -363,41 +327,13 @@ def handle(self, *args, **options):
363327 value = "2022-01-01" ,
364328 )
365329
366- allocation_user_obj = AllocationUser .objects .create (
367- allocation = allocation_obj ,
368- user = pi1 ,
369- status = AllocationUserStatusChoice .objects .get (name = "Active" ),
370- )
371- # Add project storage
372- allocation_obj , _ = Allocation .objects .get_or_create (
373- project = project_obj ,
374- status = AllocationStatusChoice .objects .get (name = "Active" ),
375- start_date = start_date ,
376- end_date = end_date ,
377- quantity = 10 ,
378- is_changeable = True ,
379- justification = "I need extra storage." ,
380- )
381-
382- allocation_obj .resources .add (Resource .objects .get (name = "Tandon" ))
383- allocation_obj .save ()
384-
385- allocation_attribute_type_obj = AllocationAttributeType .objects .get (
386- name = "slurm_account_name"
387- )
388- AllocationAttribute .objects .get_or_create (
389- allocation_attribute_type = allocation_attribute_type_obj ,
390- allocation = allocation_obj ,
391- value = f"torch_pr_{ allocation_obj .project .pk } _Tandon" ,
392- )
393-
394330 allocation_user_obj = AllocationUser .objects .create (
395331 allocation = allocation_obj ,
396332 user = pi1 ,
397333 status = AllocationUserStatusChoice .objects .get (name = "Active" ),
398334 )
399335
400- # Add metered allocation
336+ # Add Tandon allocation
401337 allocation_obj , _ = Allocation .objects .get_or_create (
402338 project = project_obj ,
403339 status = AllocationStatusChoice .objects .get (name = "Active" ),
0 commit comments