sobota, 13 sierpnia 2011

Enable CIM on SLES 11SP1

SLES CIM related packages can be found using the WBEM pattern

zypper pattern-info WBEM
S | Nazwa                        | Typ     | Zależność
--+------------------------------+---------+----------
i | openwsman-server             | package |          
i | cim-schema                   | package |          
i | cmpi-bindings-pywbem         | package |          
i | cmpi-provider-register       | package |          
i | openwsman-client             | package |          
i | cmpi-pywbem-base             | package |          
i | smis-providers               | package |          
i | cmpi-pywbem-power-management | package |          
i | python-pywbem                | package |          
i | sblim-sfcb                   | package |          
i | sblim-sfcc                   | package |          
i | sblim-wbemcli                | package |          

Install packages grouped in WBEM pattern
zypper in -t pattern WBEM

Edit the configuration of openwsmand
vi /etc/openwsman/openwsman.conf

Enable openwsmand and sfcb (small footprint CIM broker)
chkconfig openwsmand on
chkconfig sfcb on

Ports used to connect to the CIM interface
5989 - unsecure port (https - enabled by default)
5988 - unsecure port (http)

Query available classes using wbemcli
wbemcli -nl ec 'https://user:password@localhost:5989/root/cimv2' -noverify

The '-noverify' parameter is used to skil SSL certificate verification.

Query one of available classes
wbemcli -nl gc 'https://user:password@localhost:5989/root/cimv2:CIM_LogicalElement' -noverify

bibliography:
SFCB - http://sourceforge.net/apps/mediawiki/sblim/index.php?title=Sfcb
WBEMCLI - http://linux.die.net/man/1/wbemcli
In case of openSuse 11.4 the zypper package WBEM isn't available, but all the packages are still present in the repository and can be easily installed as follows.
zypper install openwsman-server cim-schema cmpi-bindings-pywbem cmpi-provider-register openwsman-client cmpi-pywbem-base smis-providers cmpi-pywbem-power-management python-pywbem sblim-sfcb sblim-sfcc sblim-wbemcli