X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fiotlab%2Fiotlabdriver.py;h=855dc350cc81d103eded751769d1de933fb8b130;hb=acd13fb68264ecdc1996954f3f464537806f7380;hp=1da81c5933ba9ab55f35a234957981fd4a3ac581;hpb=43855b90a8db17c18a0903ef8f42d735f001d9d5;p=sfa.git diff --git a/sfa/iotlab/iotlabdriver.py b/sfa/iotlab/iotlabdriver.py index 1da81c59..855dc350 100644 --- a/sfa/iotlab/iotlabdriver.py +++ b/sfa/iotlab/iotlabdriver.py @@ -153,13 +153,13 @@ class IotlabDriver(Driver): ret = self.testbed_shell.ldap.LdapAddUser(record) if ret['bool'] is True: - record['hrn'] = self.testbed_shell.root_auth + '.' + ret['uid'] + #record['hrn'] = self.testbed_shell.root_auth + '.' + ret['uid'] logger.debug("IOTLAB_API AddPerson return code %s record %s " % (ret, record)) - self.__add_person_to_db(record) + #self.__add_person_to_db(record) return ret - def __add_person_to_db(self, user_dict): + def add_person_to_db(self, user_dict): """ Add a federated user straight to db when the user issues a lease request with iotlab nodes and that he has not registered with iotlab @@ -191,8 +191,9 @@ class IotlabDriver(Driver): if pubkey is not None and pkey is not None : hierarchy = Hierarchy() + # We fake the parent in order to be able to create a valid GID person_gid = hierarchy.create_gid(person_urn, create_uuid(), \ - pkey) + pkey, force_parent='iotlab') if user_dict['email']: logger.debug("__add_person_to_db \r\n \r\n \ IOTLAB IMPORTER PERSON EMAIL OK email %s "\