Pywbem

Pywbem is a WBEM client and WBEM indication listener and provides related WBEM client-side functionality. It is written in pure Python and runs on Python 2 and Python 3.

WBEM is a standardized approach for systems management defined by the DMTF that is used in the industry for a wide variety of systems management tasks. See WBEM Standards for more information. An important use of this approach is the SMI-S standard defined by SNIA for managing storage.

Functionality

The major components of pywbem are shown in this diagram:

pywbem

The green components all have Python APIs for use by user applications. The yellow components are command line utilities. The blue components are not part of the pywbem or pywbemtools packages.

The pywbem components all run on the client side and communicate with a remote WBEM server using the standard CIM operations over HTTP (CIM-XML) protocol defined by the DMTF.

Pywbem provides the following Python APIs:

  • WBEM Client Library - An API that supports issuing WBEM operations to a WBEM server, using the CIM operations over HTTP (CIM-XML) protocol defined by the DMTF.
  • WBEM Server Library - An API that encapsulates selected functionality of a WBEM server for use by a WBEM client application, such as determining the Interop namespace and other basic information about the server, or the management profiles advertised by the server.
  • WBEM Indication Listener - An API for creating and managing a thread-based WBEM listener that waits for indications (i.e. event notifications) emitted by a WBEM server using the CIM-XML protocol. The API supports registering callback functions that get called when indications are received by the listener.
  • WBEM Subscription Manager - An API for viewing and managing subscriptions for indications on a WBEM server.
  • MOF Compiler - An API for compiling MOF files or strings into a CIM repository (e.g. on a WBEM server), or for test-compiling MOF.
  • Mock WBEM server - An API for setting up a mocked WBEM server that is used instead of a real WBEM server. This allows setting up well-defined WBEM servers locally that can be used for example for prototyping or testing user applications.

Pywbem provides this command line utility:

  • mof_compiler - A MOF compiler that takes MOF files as input and compiles them into a CIM repository (e.g. on a WBEM server).

The related pywbemtools project provides this command line utility:

  • pywbemcli - A client-side command line interface for a WBEM server, supporting a command line mode and an interactive (repl) mode.

Installation

To install the latest released version of pywbem into your active Python environment:

$ pip install pywbem

This will also install any prerequisite Python packages.

Starting with version 1.0.0, pywbem has no OS-level prerequisite packages.

For more details and alternative ways to install, see the Installation section in the pywbem documentation.

Documentation

  • Documentation - Concepts, tutorials, Python API, command line tools, and developer documentation.

  • Tutorial - The tutorials in the documentation are provided as Jupyter notebooks and provide working examples of pywbem API usage.

  • Change log - Detailed change history in the documentation.

  • Presentations - status, concepts, and implementation of pywbem.

Quick Start

The following simple example script lists the namespaces and the Interop namespace in a particular WBEM server:

#!/usr/bin/env python

import pywbem

server_url = 'http://localhost'
user = 'fred'
password = 'blah'

conn = pywbem.WBEMConnection(server_url, (user, password))

server = pywbem.WBEMServer(conn)

print("Interop namespace:\n  %s" % server.interop_ns)

print("All namespaces:")
for ns in server.namespaces:
    print("  %s" % ns)

Project Planning

For each upcoming release, the bugs and feature requests that are planned to be addressed in that release are listed in the issue tracker with an according milestone set that identifies the target release. The due date on the milestone definition is the planned release date. There is usually also an issue that sets out the major goals for an upcoming release.

GitHub

https://github.com/pywbem/pywbem