Package pywbem :: Module wbemcli
[frames] | no frames]

Module wbemcli

source code

A small utility to wrap up a PyWBEM session in a Python interactive console.

Usage:
wbemcli.py HOSTNAME [-u USERNAME -p PASSWORD] [-n namespace] [--no-ssl] [--port PORT]

The utility creates a pywbem.WBEMConnection object for the specified WBEM server location. Subsequent operatoins then use that connection.

There are two sets of aliases available for usage in the interpreter. For example, the following two commands are equivalent:

>>> EnumerateInstanceNames('SMX_ComputerSystem')
>>> ein('SMX_ComputerSystem')

Pretty-printing of results is also available using the 'pp' function. For example:

>>> cs = ei('SMX_ComputerSystem')[0]
>>> pp(cs.items())
[(u'RequestedState', 12L),
 (u'Dedicated', [1L]),
 (u'StatusDescriptions', [u'System is Functional']),
 (u'IdentifyingNumber', u'6F880AA1-F4F5-11D5-8C45-C0116FBAE02A'),
...