ZLM Bundle / Device Report V 1.0

0 Likes

This script connects via secure LDAP to the ZLM server and gets all associations between bundles, folders, devices and groups. With that information it will show you a list of bundles and you have to select the one for which you would like to see the list of devices where that bundle should go.



It takes care of bundle assignments that were made through folders, groups or dierct on devices.



For the perl script to work, you need the perl environment on the server as well as the perl LDAP modules. They are all in the distribution and you can select them in YaST.



Another thing you have to configure is the name of your zlm server, as well as the password of the ZLM administrator.

Please adopt the lines 14 and 15 to meet your configuration:

$ldaps = Net::LDAPS->new("ldaps://zlmserver.domain:10636") or die "$@";

$ldaps->bind("cn=admin,o=system", password=>"linux", version=>3) or die "$@";


The password for the user "cn=admin,o=system" is the same as for the ZLM Administrator itself.



The script does not have to run on the ZLM server itself ! We use it on sles 9 and sles 10 servers.



Here is a sample output:
LX-SYSM01:~/bin # ./zlm_bundle_associations.pl
========================================================================
Devices: 41
DevicesContainer: 43
Associations: 129
========================================================================
1 20061110-oes1
2 20061220-oes1
3 SLES-9-SP-3-ZLM-i386
4 SLES10-20061009
5 SLES10-20061013
...
========================================================================
Select bundle to monitor: 2
=========================================================================
Bundle number 2 - 20061220-oes1 - deployed version 2 - was selected !
=========================================================================
This bundle is assigned to the following devices:
LX-DIST01 oes-9-i586
LX-EDIR01 oes-9-i586
LX-EDIR02 oes-9-i586
LX-EDIR03 oes-9-i586
LX-EDIR04 oes-9-i586


Not all exceptions are currently handled in that script; we are working on a cgi version that I'll post here later this month or next month.



Have fun with it and pease tell me what you are thinking about it.



Rainer

Labels:

How To-Best Practice
Collateral
Comment List
Related
Recommended