Fixing the delete slice and lease feature.
authorSandrine Avakian <sandrine.avakian@inria.fr>
Tue, 4 Jun 2013 13:32:39 +0000 (15:32 +0200)
committerMohamed Larabi <mohamed.larabi@inria.fr>
Tue, 4 Jun 2013 15:56:06 +0000 (17:56 +0200)
sfa/senslab/slabapi.py
sfa/senslab/slabdriver.py

index ca1aa3b..d028541 100644 (file)
@@ -1232,8 +1232,8 @@ class SlabTestbedAPI():
             #Now we have the slice record fixed_slicerec_dict, get the 
             #jobs associated to this slice
             leases_list = []
-            if login is not None:
-                leases_list = self.GetLeases(login = login)
+           
+            leases_list = self.GetLeases(login = login)
             #If no job is running or no job scheduled 
             #return only the slice record           
             if leases_list == [] and fixed_slicerec_dict:
index 11d0ca1..8ab31d7 100644 (file)
@@ -366,7 +366,7 @@ class SlabDriver(Driver):
                     #the lease to the requested leases list
                     duration_in_seconds = \
                             int(single_requested_lease['duration'])*60
-                    if duration_in_seconds > GetMinExperimentDurationInSec() :
+                    if duration_in_seconds > self.slab_api.GetMinExperimentDurationInSec() :
                         requested_lease_list.append(single_requested_lease)
                         
         return requested_lease_list