From: Sandrine Avakian Date: Tue, 15 Nov 2011 10:29:03 +0000 (+0100) Subject: Fixed inheritance problems in slabdriver. X-Git-Tag: sfa-2.1-24~3^2~305 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=2d8023dbc042230940b802803fcfa1688fbb48c6 Fixed inheritance problems in slabdriver. --- diff --git a/sfa/senslab/slabdriver.py b/sfa/senslab/slabdriver.py index 4e83c5a5..9d860638 100644 --- a/sfa/senslab/slabdriver.py +++ b/sfa/senslab/slabdriver.py @@ -28,9 +28,9 @@ def list_to_dict(recs, key): # this inheritance scheme is so that the driver object can receive # GetNodes or GetSites sorts of calls directly # and thus minimize the differences in the managers with the pl version -class SlabDriver (OARapi, LDAPapi): +class SlabDriver (): - def __init__(self,config): + def __init__(self, config): self.config=config self.hrn = config.SFA_INTERFACE_HRN @@ -42,22 +42,22 @@ class SlabDriver (OARapi, LDAPapi): # thierry - just to not break the rest of this code #self.oar = OARapi() #self.users = SenslabImportUsers() - self.oar = self - self.ldap = self + self.oar = OARapi() + self.ldap = LDAPapi() self.time_format = "%Y-%m-%d %H:%M:%S" #self.logger=sfa_logger() def GetPersons(self, person_filter=None, return_fields=None): - person_list = self.ldapFind({'authority': self.root_auth }) + person_list = self.ldap.ldapFind({'authority': self.root_auth }) return_person_list = parse_filter(person_list,person_filter ,'persons', return_fields) return return_person_list def GetNodes(self,node_filter= None, return_fields=None): - self.parser.SendRequest("GET_resources_full") - node_dict = self.parser.GetNodesFromOARParse() + self.oar.parser.SendRequest("GET_resources_full") + node_dict = self.oar.parser.GetNodesFromOARParse() return_node_list = [] print>>sys.stderr, " \r\n GetNodes node_dict %s" %(node_dict) if not (node_filter or return_fields):