Lider Ahenk example registration bundle
Just run mvn clean install -DskipTests
Make sure you have Lider running. See these documentation: [1]
- Type
bundle:install mvn:tr.org.liderahenk/example-registration/1.0.0-SNAPSHOT
on Karaf shell. This will add bundle to the Karaf instance. - Again on Karaf shell, run
bundle:start <BUNDLE_ID>
to run plugin bundle. - Finally, restart XMPP Client bundle via
bundle:restart <BUNDLE_ID>
.
Example Registration bundle implemented for Ahenk registration according to mac address with specific ou values. Thus entries of registered Ahenk are more meaningful listed in ldap tree.
1- Be sure about there is a configuration file, which name is tr.org.liderahenk.example.registration.cfg, under Lider etc file.
2- tr.org.liderahenk.example.registration.cfg has two attributes;
file.protocol: Possible values are http(read remote csv file via http), local(read csv file which is on Lider machine), inner(read csv file which is embedded in bundle)
file.path : If protocol was defined as http, path value must be valid url. If protocol is local, path value must be folder path whic contains csv files. ( This folder can be host inner folders. Bundle looks folders recursively)
3-Example csv file:
<mac_address>,<cn>,<ou>,<ou>,<ou>,<ou>,... 08:00:27:f0:13:13,Ahenk_1,Ankara,Cankaya,Bilkent,Cyberpark,Floor_4 08:00:27:f0:15:15,Ahenk_2,Ankara,Cankaya,Bilkent,Cyberpark,Floor_5 08:00:27:f0:15:15,Ahenk_3,Ankara,Cankaya,Bilkent,Tepe,Level_2 08:00:27:f0:14:14,Ahenk_4,Ankara,Cankaya,Hacettepe,CS,Floor_1
Be careful about cn values must be uniqe and ou values are ordered
You don't have to create file with csv extension but file must has this format
There will be ldap tree after registration according to example csv file:
|_Ankara
-----|__Cankaya
-----------|___Bilkent
--------------------|___Cyberpark
-----------------------------|____Floor_4
--------------------------------------|Ahenk_1
-----------------------------|____Floor_5
--------------------------------------|Ahenk_2
--------------------|___Tepe
-----------------------------|____Level_2
--------------------------------------|Ahenk_3
------------|___Hacettepe
--------------------|___CS
-----------------------------|____Floor_1
--------------------------------------|Ahenk_4
For local protocol you can use multiple folder which contains csv files
records
------|__Department1
--------------|__Level1.csv
--------------|__Level2.csv
------|__Department2
--------------|__Level1.csv
tr.org.liderahenk.example.registration.cfg:
file.protocol:local
file.path:/home/lider/records