this should end the move to api-related dbsession for the iotlab driver
[sfa.git] / sfa / iotlab / iotlabdriver.py
index ef920a5..5576431 100644 (file)
@@ -297,8 +297,7 @@ class IotlabDriver(Driver):
                          % (resources, res))
             return result
 
-    @staticmethod
-    def get_user_record(hrn):
+    def get_user_record(self, hrn):
         """
 
         Returns the user record based on the hrn from the SFA DB .
@@ -309,11 +308,7 @@ class IotlabDriver(Driver):
         :rtype: RegUser
 
         """
-        # xxx this method should not be static
-        from sfa.storage.alchemy import global_dbsession
-        return global_dbsession.query(RegRecord).filter_by(hrn=hrn).first()
-        # code should read instead (if this method was not static, that is)
-        #return self.api.dbsession().query(RegRecord).filter_by(hrn=hrn).first()
+        return self.api.dbsession().query(RegRecord).filter_by(hrn=hrn).first()
 
     def testbed_name(self):
         """