Pywbem - A WBEM client and related utilities, written in pure Python.
Python Other
Clone or download
andy-maier Fixed issue with updating pywbem config variables. (#1308)
Details:

So far, the pywbem config variables were defined in the pywbem.config
namespace and then imported by pywbem into the pywbem namespace.
Pywbem documented that these config variables should be accessed (read
and written) through the pywbem namespace. However, pywbem code
read them in nearly all cases from the pywbem.config namespace.
This caused an update that is done by a pywbem user through the pywbem
namespace, not to be visible in the pywbem.config namespace, so pywbem
did not react to the user's change.

The root cause of this is that in Python, variables are not containers
for values, but names that are bound to objects. Assigning a new value
into the config variable causes that name to be bound to the object
representing the new value.
The variable name in the pywbem namespace is a different name than the
name in the pywbem.config namespace, so binding one of them to a new
object does not change the name binding of the other one.

This change fixes that by only using the pywbem.config namespace
for config variables. They are no longer imported into the
pywbem namespace.

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
Latest commit cc763b4 Jul 17, 2018
Permalink
Failed to load latest commit information.
attic Added WBEM listener and server APIs. May 11, 2016
dist Reintegrated 0.8.3 and 0.8.4 with 0.9.0. Sep 6, 2016
docs Fixed issue with updating pywbem config variables. (#1308) Jul 17, 2018
examples Remove a number of pylint messages Jan 10, 2017
images Fix diagram again Apr 26, 2017
packaging Make /usr/bin symlinks relative to conform with Fedora packaging policy. Oct 7, 2015
pywbem Fixed issue with updating pywbem config variables. (#1308) Jul 17, 2018
pywbem_mock fixes #1276 mock repository_display() unicode issue (#1277) Jun 7, 2018
testsuite Fixed issue with updating pywbem config variables. (#1308) Jul 17, 2018
tools fixes issue #682 Update pull notebook by adding new ipython May 3, 2017
try Added some internal tools for checking public symbols. Dec 13, 2017
.flake8 Resolved all flake8 issues and fixed a string formatting error in add… Oct 21, 2016
.gitignore Add capability to pywbem_mock to install DMTF schema (#1220) Apr 24, 2018
.travis.yml Fixed determination of package version for Linux. Jun 21, 2018
DEVELOP.md Fixed incorrect package version in make after adding a git tag Jun 9, 2018
INSTALL.md Improved installation and its description for Swig failures. May 5, 2016
LICENSE.txt Added pywbem_mock package; moved LICENSE.rst from pywbem to main dire… Jan 25, 2018
MANIFEST.in Added pywbem_mock package; moved LICENSE.rst from pywbem to main dire… Jan 25, 2018
PKG-INFO Fixes #1298 null value keybindings (#1301) Jun 29, 2018
PLYPROBLEM.md Fixed prerequisite issues for LEX/YACC table build for MOF compiler. Mar 26, 2016
README.rst Increased M2Crypto to 0.30.1; Used M2Crypto on Windows (#1248) Jun 7, 2018
README_PYPI.rst Added a README file for Pypi Apr 11, 2018
TODO.md Moved src/* one level up, to have a more standard structure. Jan 25, 2016
appveyor.yml adjusted appveyor.yml to new choco req to have pkg checksums Jun 20, 2018
build_moftab.py Disabled Debug messages in build_moftab.py again. Apr 15, 2016
coveragerc Minor improvements in coverage reporting. Oct 5, 2017
dev-requirements.txt Improved test_function decorator to simplified_test_function May 7, 2018
ez_setup.py Changed some file permissions. Feb 9, 2016
listener_design.rst Fixed file permissions. Oct 5, 2017
makefile Improved makefile in some areas Jun 21, 2018
minimum-constraints.txt Increased M2Crypto to 0.30.1; Used M2Crypto on Windows (#1248) Jun 7, 2018
mof_compiler Fixes and improvements in mof_compiler script (#1163) Apr 3, 2018
mof_compiler.bat Fixed exit code of mof_compiler.bat file Apr 3, 2018
pylintrc Addressed more Pylint issues in testsuite sources Feb 23, 2018
pywbem_os_setup.bat Increased M2Crypto to 0.30.1; Used M2Crypto on Windows (#1248) Jun 7, 2018
pywbem_os_setup.sh Increased M2Crypto to 0.30.1; Used M2Crypto on Windows (#1248) Jun 7, 2018
remove_duplicate_setuptools.py Use pbr+req files; Add min/max pkg levels; Fix OS-X runs; Other impro… Dec 13, 2017
requirements.txt Increased M2Crypto to 0.30.1; Used M2Crypto on Windows (#1248) Jun 7, 2018
rtd-requirements.txt Increased M2Crypto to 0.30.1; Used M2Crypto on Windows (#1248) Jun 7, 2018
setup.cfg Added a README file for Pypi Apr 11, 2018
setup.py Use pbr+req files; Add min/max pkg levels; Fix OS-X runs; Other impro… Dec 13, 2017
tox.ini Use pbr+req files; Add min/max pkg levels; Fix OS-X runs; Other impro… Dec 13, 2017
wbemcli Added wbemcli global functions to docu. (#608) Dec 11, 2016
wbemcli.bat Extend wbemcli.bat to exit with exit level. Jul 26, 2017
wbemcli.py Fixes #1268 Add input parameter to wbemcli to allow mocking a server ( May 31, 2018

README.rst

Pywbem - A WBEM client and related utilities, written in pure Python

Version on Pypi Travis test status (master) Appveyor test status (master) Docs build status (master) Test coverage (master)

Overview

Pywbem is a WBEM client and WBEM indication listener, written in pure Python. It runs on Python 2 and Python 3.

The latest released version of pywbem is 0.12.0.

The major components of pywbem are shown in this diagram:

alternate text

A WBEM client allows issuing operations to a WBEM server, using the CIM operations over HTTP (CIM-XML) protocol defined in the DMTF standards DSP0200 and DSP0201. The CIM/WBEM infrastructure is used for a wide variety of systems management tasks supported by systems running WBEM servers. See WBEM Standards for more information about WBEM and these standards.

A WBEM indication listener allows receiving indications generated by a WBEM server.

Pywbem also includes higher level classes to support typical WBEM client activities:

  • WBEMServer - provides APIs for managing basic characteristics of a WBEM server including:
    • finding CIM namespaces and the Interop namespace,
    • finding WBEM management profiles,
    • finding basic information about the WBEM server.

Installation

To install the latest released version of pywbem on Linux:

  • Install the prerequisite OS-level packages:

  • With your target Python environment active, install pywbem:

    $ pip install pywbem

    This will also install any prerequisite Python packages.

For more details, installation on other operating systems, and alternative ways to install, see the Installation section in the pywbem documentation.

Documentation

The latest pywbem documentation is available on ReadTheDocs:

The documentation includes API documentation, user documentation, tutorial documentation, developer documentation.

This includes a number of Jupyter notebooks that act as a Tutorial and provide working examples of pywbem API usage.

There are also a number of Presentations on the status, concepts, and implementation of pywbem available.

The detailed change history for the latest released version in the Change log section.

Command line tools

Pywbem includes two command line tools:

  • wbemcli - An interactive shell for issuing WBEM operations against a WBEM server. In addition to executing the WBEM operations directly, simple scripts can be created to be executed within wbemcli.
  • mof_compiler - A MOF compiler to compile MOF into repositories (e.g. WBEM servers) or to test compile MOF.

QuickStart

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

#!/usr/bin/env python

import pywbem

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

conn = pywbem.WBEMConnection(server_uri, (user, password),
                             default_namespace=namespace)

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.

Planned Next Release

Pywbem 0.13.0 is in development.

Pywbem issue 1170 defines the basic direction for version 0.13.0.

Contributing

For information on how to contribute to pywbem, see the Contributing section in the pywbem documentation.

License

Pywbem is provided under the GNU Lesser General Public License (LGPL) version 2.1, or (at your option) any later version.