I'm trying to use the collecter (instead of my numerous perl scripts) to extend the ldap-collector. Now, I'm in a situation where I need some data already in iTop to establish correct links between Users and Teams.
That's the whole point of the LookupTable class. But (there's ever a but...). In my case, I wish to realize a transformation in a list (so, in a kind of 'subarray', in a sense). I believe this is not possible with the 'Lookup' function ?
If not, can I just call the constructor, and then dig in the object that the constructor build ? And if yes, how should I call the constructor to be sure to have this object before the run of the 'Prepare' function ?
Thanks,
Pascal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, wanted to reach my goal another way, but I'm stuck (a little further :))
So, I started to use a basically unchanged version of ldap-collector to gather the Person.
Then, I added a new subbclass to this collector, named 'iTopTeamLDAPCollector' who gather all groups with an email address and create Team in iTop.
I also added a field named 'DN' in iTop, so, for each Person or Team, I also have the DN.
Now, I would create another subclass for create link between Person and Team. This could be easier than trying to add the link in the 'persons_list' field of the team (and probably safer, because some of our lists are huge, and I think that the persons_list field would be too small)
But, to build this subclass, I don't need a general LDAP search. Instead, I have built (more exactly, ChatGPT built for me :)) a nice function who returns for each group DN the appropriate list of group member.
That's something I'm used to use in my own sync, but I don't really see how to do that with the Combodo collector ?
What I exactly need is that :
Query the list of Teams in iTop with a DN ==> LookupTable
For each DN, start my chatgpt function with the DN of the Team (this function does LDAP query, so I need to connect to the LDAP server)
Build my list of link between Person and Team
Sync this list with iTop
It should be easy, but I'm lost.
Thanks,
Pascal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In between, I was able to solve "my" LDAP collector :) So this query can now be closed.
Basically, I added a third collector, and this one build the link between Teams and Persons. My only drawback is that, in this collector, I have to do the same two LDAP queries (To Ldap user and Ldap group), but, seeing the number of further queries I have to do to be able to "flatten" the 'group in group in group" thing, I do think that these few initial queries are harmless.
Thanks,
Pascal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I hope some 'collector expert' is in this area...
I'm trying to use the collecter (instead of my numerous perl scripts) to extend the ldap-collector. Now, I'm in a situation where I need some data already in iTop to establish correct links between Users and Teams.
That's the whole point of the LookupTable class. But (there's ever a but...). In my case, I wish to realize a transformation in a list (so, in a kind of 'subarray', in a sense). I believe this is not possible with the 'Lookup' function ?
If not, can I just call the constructor, and then dig in the object that the constructor build ? And if yes, how should I call the constructor to be sure to have this object before the run of the 'Prepare' function ?
Thanks,
Pascal
Well, wanted to reach my goal another way, but I'm stuck (a little further :))
So, I started to use a basically unchanged version of ldap-collector to gather the Person.
Then, I added a new subbclass to this collector, named 'iTopTeamLDAPCollector' who gather all groups with an email address and create Team in iTop.
I also added a field named 'DN' in iTop, so, for each Person or Team, I also have the DN.
Now, I would create another subclass for create link between Person and Team. This could be easier than trying to add the link in the 'persons_list' field of the team (and probably safer, because some of our lists are huge, and I think that the persons_list field would be too small)
But, to build this subclass, I don't need a general LDAP search. Instead, I have built (more exactly, ChatGPT built for me :)) a nice function who returns for each group DN the appropriate list of group member.
That's something I'm used to use in my own sync, but I don't really see how to do that with the Combodo collector ?
What I exactly need is that :
It should be easy, but I'm lost.
Thanks,
Pascal
Hello Pascal,
I'm not very familiar with the collectors, but maybe @xtophe38 has an idea.
Cheers,
Guillaume
Hi Guillaume and all,
In between, I was able to solve "my" LDAP collector :) So this query can now be closed.
Basically, I added a third collector, and this one build the link between Teams and Persons. My only drawback is that, in this collector, I have to do the same two LDAP queries (To Ldap user and Ldap group), but, seeing the number of further queries I have to do to be able to "flatten" the 'group in group in group" thing, I do think that these few initial queries are harmless.
Thanks,
Pascal
Thanks for the feedback Pascal! Glad to see that you found a way to make it work :)
Guillaume