3. Tutorial

This section contains a few short tutorials about using pywbem. It is intended to be enough to get people up and going who already know a bit about WBEM and CIM.

The tutorials in this section are Jupyter Notebooks, and are shown using the online Jupyter Notebook Viewer. This allows viewing the tutorials without having Jupyter Notebook installed locally.

In order to view a tutorial, just click on a link in this table:

Tutorial Short description
connections.ipynb Making connections to a WBEM server
datamodel.ipynb Representation of CIM objects in Python
enuminsts.ipynb EnumerateInstances
enuminstnames.ipynb EnumerateInstanceNames
getinstance.ipynb GetInstance
createdeleteinst.ipynb CreateInstance + DeleteInstance
modifyinstance.ipynb ModifyInstance
invokemethod.ipynb InvokeMethod
pulloperations.ipynb The Pull Operations
iterablecimoperations.ipynb The Iterable Operation Extensions
wbemserverclass.ipynb Pywbem WBEMServer Class
subscriptionmanager.ipynb Subscription Manager

For the following topics, tutorials are not yet available:

  • ExecQuery
  • Association Operations
  • Class Operations
  • Qualifier Operations
  • WBEMListener
  • Iter* Operations

3.1. Executing code in the tutorials

You cannot directly modify or execute the code in the tutorials using the Jupyter Notebook Viewer, though. In order to do that, the Jupyter Notebook Viewer provides a download button at the top right corner of the page.

You must have Jupyter Notebook installed, preferrably in a virtual Python environment, and you must have pywbem installed.

To see a list of your downloaded notebook files, start Jupyter Notebook as follows:

jupyter notebook --notebook-dir={your-notebook-dir}