SlideShare a Scribd company logo
1 of 18
PyWBEM
Python WBEM CIM/XML Client
Rapid Overview
k.schopmeyerwork@gmail.com
Last update 3 February 2021
PyWBEM Overview 1
Version 0.9, 1 Dec 2016
Version 1.0, 5 Dec 2016
Version 2.0 6 Aug 2018 – Update to current PyWBEM version
Version 2.0.7, Aug 2018- Minor edits
Version 3.0 Update to pywbem version 1.
Version 3.1, 3 February 2021 minor cleanup and update
What is the PyWBEM project?
PyWBEM is a GitHub multi-repository project written in Python
that includes several WBEM/CIM components to support the
DMTF WBEM/CIM and SNIA SMI-S specifications. It includes:
• pywbem – A client for the WBEM infrastructure
• pywbemtools – Client-side tools developed to utilize PyWBEM
to communicate with WBEM Servers. The core tool is
pywbemcli, a command line WBEM client
• Other WBEM support components.
PyWBEM Overview 2
PyWBEM characteristics
• Compliant with the DMTF CIM/WBEM and SNIA SMI-S
specifications
• Open source in GitHub http://pywbem/pywbem and well
documented on Read The Docs
https://pywbem.readthedocs.io/en/latest/index.html
• Available as a Python package on GitHub, PyPi, and Linux
distributions
• Supports Python 2.7 and Python 3
• Runs on windows (native, Cygwin, etc.), OS-X, Linux
• Simple installation with Python pip
PyWBEM Overview 3
What is a PyWBEM client?
Python client for WBEM
servers using the DMTF
CIM-XML protocol
PyWBEM Overview
PyWBEM Client
WBEM Server
WBEM
Client
WBEM
Listener
WBEM
Requests
Responses
WBEM
Indications
Components of the WBEM Architecture
Client Application
(ex. Python app)
PyWBEM API
WBEM Support
Tools, browsers,
etc
Client Scripts
pywbemcli
Command line
WBEM client
PyWBEM Client: Overview
• Pure Python code:
– Python versions 2.7, 3.4, 3.5 – 3.9
• Supports DMTF CIM-XML protocol
– WBEM Client library with a Pythonic API
– Python classes for all CIM model defined objects (CIMClass, CIMInstance, etc.)
– Indication listener/subscription manager
– Server class to access common objects (ex. Registered Profiles, Namespaces) in WBEM server
– Includes support for SSL
– CIM-XML protocol for communication with WBEM server
• Well tested, well documented
• Compliant with DMTF WBEM Specification and SNIA SMI-S specification
• Utilities:
– MOF compiler
– Pywbem_mock – Mock of a WBEM server that allows testing pywbem and pywbemtools with no WBEM
server
– Test tools
• Open source, LGPL 2.1 license
– Available on GitHub and Python PyPi: https://github.com/pywbem/pywbem
PyWBEM Overview 6
PyWBEM Client
PyWBEM Client Architecture
PyWBEM Overview 7
CIM/XML communication layer
(XML coding/decoding, SSL support, HTTP operations, and socket interface)
WBEMConnection
(server connection and
access methods)
CIM Objects
(CIMClass, CIMInstance,
CIMMethods, etc.)
PyWBEM
WBEM Server
Class
PyWBEM Subscription
Manager Class
WBEM Indication
Listener
Request
Calls/Responses
Future Services,
Ex. Job Control, etc.
WBEM Responses
WBEM Requests WBEM Indications
The PyWBEM Client APIs
• Construction and manipulation of Python CIM objects
– CIMClass, CIMInstance, CIMMethod, CIMProperty, etc.
• WBEMConnection API
– Define connections to WBEM server
– Execute WBEM operations against the WBEM server
• Get, create, enumerate, etc. of CIM objects on WBEM server
• Request execution of CIM Methods on WBEM server
• Higher level WBEM client functions
– Indication subscription management
• Create, delete, subscriptions for indications on WBEM server
– WBEM server discovery
• Discover basic characteristics of WBEM Servers
– CIM Namespaces, basic server information, Registered Profiles, etc.
• Indication Listener API
– Listen for indications from the WBEM indication exporter (i.e. WBEM server that sends
indications) PyWBEM Overview 8
WBEMConnection, Client API
• Defines connection and request/response operations on CIM Objects
• CIMObjects are:
– CIMClasses
– CIMInstances
– CIMQualifierDeclarations
– CIMMethods
• Operations:
– Get, enumerate, create, delete, modify CIMObjects in WBEM server
– Get Associations
– Invoke Methods defined in the model
– Query model resources in WBEM server
PyWBEM Overview 9
A simple PyWBEM code example
import pywbem
# Global variables used by all examples:
server = 'http://localhost'
username = 'user'
password = 'password'
namespace = 'root/cimv2'
classname = 'CIM_ComputerSystem‘
max_obj_cnt = 100
conn = pywbem.WBEMConnection(server, (username, password),
default_namespace=namespace,
no_verification=True)
try:
inst_iterator = conn.IterEnumerateInstances(classname, MaxObjectCount=max_obj_cnt)
for inst in inst_iterator:
print('path=%s' % inst.path)
print(inst.tomof())
except pywbem.Error as exc:
print('Operation failed: %s' % exc) PyWBEM Overview 10
PyWBEM Developer Aids
• MOF Compiler
– Compiles DMTF MOF into repositories as CIM objects
• Usage support
– Operation statistics
• Statistics on execution time of WBEM Server operations
– Operation Logging
• Python logging interface for operation requests/responses
– Operations recording
• Record details of operations for tests generation
• Testing Support
– PyWBEM WBEM Server mock/simulator
• Simulates a WBEM Server within the pywbem client to allow testing without a running WBEM
Server
– Pywbemcli (see the pywbemtools repository)
• Interactive REPL command line tool for accessing WBEM servers
PyWBEM Overview 11
PyWBEM Installation
• pip package installation
– Within your Python environment get from pip
• pip install pywbem
• Install complete GitHub package
– git clone https://github.com/pywbem/pywbem
– Installation instructions are part of the documentation downloaded
PyWBEM Overview
PyWBEMTools characteristics
• Command line client (pywbemcli) that provides commands to
access and modify a WBEM server
• Open source in GitHub http://pywbem/pywbemtools and well
documented on Read The Docs
https://pywbemtools.readthedocs.io/en/latest/index.html
• Available as a Python package on GitHub, PyPi.
• Supported on Python 2 and Python 3
PyWBEM Overview 13
Pywbemcli commands
• pywbemcli includes multiple commands in command groups. The groups include: class,
qualifier, instance, connection, server, profile
• Commands to enumerate/get/create/delete CIM qualifier declarations, CIM classes, and
CIM instances. These are command line implementations of the WBEM operations
• Higher level commands
– Extensions for CIM Object visualization (class trees, association trees, etc.)
– connection – Manage a persistent definition of a wbem server
– server – Inspect a wbem server
• Namespaces, and other information about a WBEM server
– profile
• Inspect WBEM server profiles
• Multiple output display formats (MOF, tables, trees to show relationships, etc.)
• Common usage support:
– Interactive mode (multiple commands within pywbemcli shell)
– Autocompletion of command syntax and some command variables
– Extensive help with all commands through – help option
Pywbem Overview 14
Command line examples
• Get the class CIM_ManagedElement
from the server
• Class Tree
Pywbem Overview 15
< Pywbemcli –s http://localhost class get
TST_Person
class TST_Person {
[Key ( true ),
Description ( "This is key prop" )]
string name;
string extraProperty = "defaultvalue";
[ValueMap { "1", "2" },
Values { "female", "male" }]
uint16 gender;
[ValueMap { "1", "2" },
Values { "books", "movies" }]
uint16 likes[];
};
< Pywbemcli -m mockassoc class tree
root
+-- TST_FamilyCollection
+-- TST_Lineage
+-- TST_MemberOfFamilyCollection
+-- TST_Person
+-- TST_Personsub
• Association Tree
< Pywbemcli –m mock assoc instance shrub TST_Person.?
Pick Instance name to process
0: root/cimv2:TST_Person.name="Gabi"
1: root/cimv2:TST_Person.name="Mike"
2: root/cimv2:TST_Person.name="Saara"
Input integer between 0 and 7 or Ctrl-C to exit selection: 0
TST_Person.name="Gabi"
+-- child(Role)
| +-- TST_Lineage(AssocClass)
| +-- parent(ResultRole)
| +-- TST_Person(ResultClass)(1 insts)
| +-- /:TST_Person.name="Mike"
+-- member(Role)
+-- TST_MemberOfFamilyCollection(AssocClass)
+-- family(ResultRole)
+-- TST_FamilyCollection(ResultClass)(1 insts)
+-- /:TST_FamilyCollection.name="family1"
Pywbemtools installation
Pywbem Overview 16
• pip package installation
– Within your Python environment get from pip
• Setup a python virtual environment (not required but helps)
• pip install pywbemtools (Installs pywbem and pywbemtools)
• Install complete GitHub package
– Setup a python virtual environment (not required but helps)
– git clone https://github.com/pywbem/pywbemtools.git
– Installation instructions are part of the documentation downloaded
Status
• Active Development
– Pywbem: release 1.1, Released 31 October 2020
– Pywbemtools: release 0.8, released 13 October 2020
– Next release ~ Q1 2021 (pywbem 1.2 and pywbemtools 0.9)
• Extensively Tested:
– Mock server implementations in continuous integration
– OpenPegasus WEB server before each release
– A variety of SMI servers as part of the SNIA SM Lab/Plugfests
PyWBEM Overview 17
Resources and more information
• PyWBEM Project – Project encompassing PyWBEM and tools
– Pywbem Project github: https://github.com/pywbem
– PyWBEM Client
• PyWBEM Client github repository : https://github.com/pywbem/pywbem
• PyWBEM Client Documentation
– https://pywbem/github.io - General documentation
– https://pywbem.readthedocs.io/en/latest/index.html - Detailed API Reference, installation, tutorial,
development information, and change log
– https://pywbem.readthedocs.io/en/latest/tutorial.html - Jupyter notebooks with examples of pywbem client
usage
– PyWBEM Tools
• Github repository: https://github.com/pywbem/pywbemtools
• Documentation: https://pywbemtools.readthedocs.io/en/latest/index.html
• Other Resources
– OpenPegasus
• https://collaboration.opengroup.org/pegasus/
– SNIA pywbem page
• https://www.snia.org/pywbem PyWBEM Overview 18
CIM/WBEM Specification References
• DMTF Specifications:
– See: https://www.dmtf.org/standards/published_documents
– Common Information Model (CIM) Schema releases
• CIM (Common Information model specifications and schemas
– Common Information Model, DSP0004
– CIM Operations over XML - DSP0200
– Representation of CIM in XML - DSP0201
– CIM Query Language Specification –DSP0202
– Filter Query Language(FQL) – DSP0212
• SMI Specifications:
– SNIA SMI-S specification
• http://www.snia.org/tech_activities/standards/curr_standards/smi
PyWBEM Overview 19

More Related Content

What's hot

Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTPBen Ramsey
 
What's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-PremisesWhat's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-PremisesGabriella Davis
 
Migrating Novell GroupWise to Linux
Migrating Novell GroupWise to LinuxMigrating Novell GroupWise to Linux
Migrating Novell GroupWise to LinuxNovell
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
Introduction to Business Processes 3.7
Introduction to Business Processes 3.7Introduction to Business Processes 3.7
Introduction to Business Processes 3.7StephenKardian
 
PyCon 2005 PyBlosxom
PyCon 2005 PyBlosxomPyCon 2005 PyBlosxom
PyCon 2005 PyBlosxomTed Leung
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsi krishna
 
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!Hostway|HOSTING
 
January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12Howard Greenberg
 
What is Node.js? (ICON UK)
What is Node.js? (ICON UK)What is Node.js? (ICON UK)
What is Node.js? (ICON UK)Tim Davis
 
Sympal - The flexible Symfony CMS
Sympal - The flexible Symfony CMSSympal - The flexible Symfony CMS
Sympal - The flexible Symfony CMSJonathan Wage
 
Best Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on PremisesBest Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on PremisesTimsterC
 
JUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESB
JUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESBJUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESB
JUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESBEdgar Silva
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsAles Lichtenberg
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 
Practical solutions for connections administrators lite
Practical solutions for connections administrators litePractical solutions for connections administrators lite
Practical solutions for connections administrators liteSharon James
 

What's hot (20)

Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTP
 
What's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-PremisesWhat's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-Premises
 
CMIS REST HTTP
CMIS REST HTTPCMIS REST HTTP
CMIS REST HTTP
 
Migrating Novell GroupWise to Linux
Migrating Novell GroupWise to LinuxMigrating Novell GroupWise to Linux
Migrating Novell GroupWise to Linux
 
Cl210
Cl210Cl210
Cl210
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
Introduction to Business Processes 3.7
Introduction to Business Processes 3.7Introduction to Business Processes 3.7
Introduction to Business Processes 3.7
 
PyCon 2005 PyBlosxom
PyCon 2005 PyBlosxomPyCon 2005 PyBlosxom
PyCon 2005 PyBlosxom
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
 
201408 - Alfresco Tech Talk Live - Maven SDK 2.0
201408  - Alfresco Tech Talk Live - Maven SDK 2.0201408  - Alfresco Tech Talk Live - Maven SDK 2.0
201408 - Alfresco Tech Talk Live - Maven SDK 2.0
 
60 Admin Tips
60 Admin Tips60 Admin Tips
60 Admin Tips
 
January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12
 
What is Node.js? (ICON UK)
What is Node.js? (ICON UK)What is Node.js? (ICON UK)
What is Node.js? (ICON UK)
 
Sympal - The flexible Symfony CMS
Sympal - The flexible Symfony CMSSympal - The flexible Symfony CMS
Sympal - The flexible Symfony CMS
 
Best Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on PremisesBest Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on Premises
 
JUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESB
JUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESBJUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESB
JUDCon 2010 - Innovative ideas for Integration Solutions through JBoss ESB
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tips
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Practical solutions for connections administrators lite
Practical solutions for connections administrators litePractical solutions for connections administrators lite
Practical solutions for connections administrators lite
 

Similar to PyWBEM Client Overview

PyWBEM Rapid Overview
PyWBEM Rapid Overview PyWBEM Rapid Overview
PyWBEM Rapid Overview SNIATutorials
 
Custom Tile Generation in PCF
Custom Tile Generation in PCFCustom Tile Generation in PCF
Custom Tile Generation in PCFVMware Tanzu
 
Containerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with KubernetesContainerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with KubernetesCodemotion Tel Aviv
 
Mete Atamel
Mete AtamelMete Atamel
Mete AtamelCodeFest
 
Going Serverless with Kubeless In Google Container Engine (GKE)
Going Serverless with Kubeless In Google Container Engine (GKE)Going Serverless with Kubeless In Google Container Engine (GKE)
Going Serverless with Kubeless In Google Container Engine (GKE)Bitnami
 
Custom Tile Generation in PCF
Custom Tile Generation in PCFCustom Tile Generation in PCF
Custom Tile Generation in PCFDustin Ruehle
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePiotr Pelczar
 
How to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutesHow to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutesDerek Edwards
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
Social Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections PinkSocial Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections PinkNico Meisenzahl
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudMatt Callanan
 
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesCloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesAtlassian
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017Codemotion
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...WASdev Community
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Amazon Web Services
 
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...VMworld
 

Similar to PyWBEM Client Overview (20)

PyWBEM Rapid Overview
PyWBEM Rapid Overview PyWBEM Rapid Overview
PyWBEM Rapid Overview
 
Custom Tile Generation in PCF
Custom Tile Generation in PCFCustom Tile Generation in PCF
Custom Tile Generation in PCF
 
Containerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with KubernetesContainerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with Kubernetes
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
 
Going Serverless with Kubeless In Google Container Engine (GKE)
Going Serverless with Kubeless In Google Container Engine (GKE)Going Serverless with Kubeless In Google Container Engine (GKE)
Going Serverless with Kubeless In Google Container Engine (GKE)
 
Custom Tile Generation in PCF
Custom Tile Generation in PCFCustom Tile Generation in PCF
Custom Tile Generation in PCF
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecture
 
How to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutesHow to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutes
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Social Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections PinkSocial Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections Pink
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesCloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket Pipelines
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
Resilient microservices with Kubernetes - Mete Atamel - Codemotion Rome 2017
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
VMworld Europe 2014: Taking Reporting and Command Line Automation to the Next...
 

Recently uploaded

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

PyWBEM Client Overview

  • 1. PyWBEM Python WBEM CIM/XML Client Rapid Overview k.schopmeyerwork@gmail.com Last update 3 February 2021 PyWBEM Overview 1 Version 0.9, 1 Dec 2016 Version 1.0, 5 Dec 2016 Version 2.0 6 Aug 2018 – Update to current PyWBEM version Version 2.0.7, Aug 2018- Minor edits Version 3.0 Update to pywbem version 1. Version 3.1, 3 February 2021 minor cleanup and update
  • 2. What is the PyWBEM project? PyWBEM is a GitHub multi-repository project written in Python that includes several WBEM/CIM components to support the DMTF WBEM/CIM and SNIA SMI-S specifications. It includes: • pywbem – A client for the WBEM infrastructure • pywbemtools – Client-side tools developed to utilize PyWBEM to communicate with WBEM Servers. The core tool is pywbemcli, a command line WBEM client • Other WBEM support components. PyWBEM Overview 2
  • 3. PyWBEM characteristics • Compliant with the DMTF CIM/WBEM and SNIA SMI-S specifications • Open source in GitHub http://pywbem/pywbem and well documented on Read The Docs https://pywbem.readthedocs.io/en/latest/index.html • Available as a Python package on GitHub, PyPi, and Linux distributions • Supports Python 2.7 and Python 3 • Runs on windows (native, Cygwin, etc.), OS-X, Linux • Simple installation with Python pip PyWBEM Overview 3
  • 4. What is a PyWBEM client? Python client for WBEM servers using the DMTF CIM-XML protocol PyWBEM Overview PyWBEM Client WBEM Server WBEM Client WBEM Listener WBEM Requests Responses WBEM Indications Components of the WBEM Architecture Client Application (ex. Python app) PyWBEM API WBEM Support Tools, browsers, etc Client Scripts pywbemcli Command line WBEM client
  • 5. PyWBEM Client: Overview • Pure Python code: – Python versions 2.7, 3.4, 3.5 – 3.9 • Supports DMTF CIM-XML protocol – WBEM Client library with a Pythonic API – Python classes for all CIM model defined objects (CIMClass, CIMInstance, etc.) – Indication listener/subscription manager – Server class to access common objects (ex. Registered Profiles, Namespaces) in WBEM server – Includes support for SSL – CIM-XML protocol for communication with WBEM server • Well tested, well documented • Compliant with DMTF WBEM Specification and SNIA SMI-S specification • Utilities: – MOF compiler – Pywbem_mock – Mock of a WBEM server that allows testing pywbem and pywbemtools with no WBEM server – Test tools • Open source, LGPL 2.1 license – Available on GitHub and Python PyPi: https://github.com/pywbem/pywbem PyWBEM Overview 6
  • 6. PyWBEM Client PyWBEM Client Architecture PyWBEM Overview 7 CIM/XML communication layer (XML coding/decoding, SSL support, HTTP operations, and socket interface) WBEMConnection (server connection and access methods) CIM Objects (CIMClass, CIMInstance, CIMMethods, etc.) PyWBEM WBEM Server Class PyWBEM Subscription Manager Class WBEM Indication Listener Request Calls/Responses Future Services, Ex. Job Control, etc. WBEM Responses WBEM Requests WBEM Indications
  • 7. The PyWBEM Client APIs • Construction and manipulation of Python CIM objects – CIMClass, CIMInstance, CIMMethod, CIMProperty, etc. • WBEMConnection API – Define connections to WBEM server – Execute WBEM operations against the WBEM server • Get, create, enumerate, etc. of CIM objects on WBEM server • Request execution of CIM Methods on WBEM server • Higher level WBEM client functions – Indication subscription management • Create, delete, subscriptions for indications on WBEM server – WBEM server discovery • Discover basic characteristics of WBEM Servers – CIM Namespaces, basic server information, Registered Profiles, etc. • Indication Listener API – Listen for indications from the WBEM indication exporter (i.e. WBEM server that sends indications) PyWBEM Overview 8
  • 8. WBEMConnection, Client API • Defines connection and request/response operations on CIM Objects • CIMObjects are: – CIMClasses – CIMInstances – CIMQualifierDeclarations – CIMMethods • Operations: – Get, enumerate, create, delete, modify CIMObjects in WBEM server – Get Associations – Invoke Methods defined in the model – Query model resources in WBEM server PyWBEM Overview 9
  • 9. A simple PyWBEM code example import pywbem # Global variables used by all examples: server = 'http://localhost' username = 'user' password = 'password' namespace = 'root/cimv2' classname = 'CIM_ComputerSystem‘ max_obj_cnt = 100 conn = pywbem.WBEMConnection(server, (username, password), default_namespace=namespace, no_verification=True) try: inst_iterator = conn.IterEnumerateInstances(classname, MaxObjectCount=max_obj_cnt) for inst in inst_iterator: print('path=%s' % inst.path) print(inst.tomof()) except pywbem.Error as exc: print('Operation failed: %s' % exc) PyWBEM Overview 10
  • 10. PyWBEM Developer Aids • MOF Compiler – Compiles DMTF MOF into repositories as CIM objects • Usage support – Operation statistics • Statistics on execution time of WBEM Server operations – Operation Logging • Python logging interface for operation requests/responses – Operations recording • Record details of operations for tests generation • Testing Support – PyWBEM WBEM Server mock/simulator • Simulates a WBEM Server within the pywbem client to allow testing without a running WBEM Server – Pywbemcli (see the pywbemtools repository) • Interactive REPL command line tool for accessing WBEM servers PyWBEM Overview 11
  • 11. PyWBEM Installation • pip package installation – Within your Python environment get from pip • pip install pywbem • Install complete GitHub package – git clone https://github.com/pywbem/pywbem – Installation instructions are part of the documentation downloaded PyWBEM Overview
  • 12. PyWBEMTools characteristics • Command line client (pywbemcli) that provides commands to access and modify a WBEM server • Open source in GitHub http://pywbem/pywbemtools and well documented on Read The Docs https://pywbemtools.readthedocs.io/en/latest/index.html • Available as a Python package on GitHub, PyPi. • Supported on Python 2 and Python 3 PyWBEM Overview 13
  • 13. Pywbemcli commands • pywbemcli includes multiple commands in command groups. The groups include: class, qualifier, instance, connection, server, profile • Commands to enumerate/get/create/delete CIM qualifier declarations, CIM classes, and CIM instances. These are command line implementations of the WBEM operations • Higher level commands – Extensions for CIM Object visualization (class trees, association trees, etc.) – connection – Manage a persistent definition of a wbem server – server – Inspect a wbem server • Namespaces, and other information about a WBEM server – profile • Inspect WBEM server profiles • Multiple output display formats (MOF, tables, trees to show relationships, etc.) • Common usage support: – Interactive mode (multiple commands within pywbemcli shell) – Autocompletion of command syntax and some command variables – Extensive help with all commands through – help option Pywbem Overview 14
  • 14. Command line examples • Get the class CIM_ManagedElement from the server • Class Tree Pywbem Overview 15 < Pywbemcli –s http://localhost class get TST_Person class TST_Person { [Key ( true ), Description ( "This is key prop" )] string name; string extraProperty = "defaultvalue"; [ValueMap { "1", "2" }, Values { "female", "male" }] uint16 gender; [ValueMap { "1", "2" }, Values { "books", "movies" }] uint16 likes[]; }; < Pywbemcli -m mockassoc class tree root +-- TST_FamilyCollection +-- TST_Lineage +-- TST_MemberOfFamilyCollection +-- TST_Person +-- TST_Personsub • Association Tree < Pywbemcli –m mock assoc instance shrub TST_Person.? Pick Instance name to process 0: root/cimv2:TST_Person.name="Gabi" 1: root/cimv2:TST_Person.name="Mike" 2: root/cimv2:TST_Person.name="Saara" Input integer between 0 and 7 or Ctrl-C to exit selection: 0 TST_Person.name="Gabi" +-- child(Role) | +-- TST_Lineage(AssocClass) | +-- parent(ResultRole) | +-- TST_Person(ResultClass)(1 insts) | +-- /:TST_Person.name="Mike" +-- member(Role) +-- TST_MemberOfFamilyCollection(AssocClass) +-- family(ResultRole) +-- TST_FamilyCollection(ResultClass)(1 insts) +-- /:TST_FamilyCollection.name="family1"
  • 15. Pywbemtools installation Pywbem Overview 16 • pip package installation – Within your Python environment get from pip • Setup a python virtual environment (not required but helps) • pip install pywbemtools (Installs pywbem and pywbemtools) • Install complete GitHub package – Setup a python virtual environment (not required but helps) – git clone https://github.com/pywbem/pywbemtools.git – Installation instructions are part of the documentation downloaded
  • 16. Status • Active Development – Pywbem: release 1.1, Released 31 October 2020 – Pywbemtools: release 0.8, released 13 October 2020 – Next release ~ Q1 2021 (pywbem 1.2 and pywbemtools 0.9) • Extensively Tested: – Mock server implementations in continuous integration – OpenPegasus WEB server before each release – A variety of SMI servers as part of the SNIA SM Lab/Plugfests PyWBEM Overview 17
  • 17. Resources and more information • PyWBEM Project – Project encompassing PyWBEM and tools – Pywbem Project github: https://github.com/pywbem – PyWBEM Client • PyWBEM Client github repository : https://github.com/pywbem/pywbem • PyWBEM Client Documentation – https://pywbem/github.io - General documentation – https://pywbem.readthedocs.io/en/latest/index.html - Detailed API Reference, installation, tutorial, development information, and change log – https://pywbem.readthedocs.io/en/latest/tutorial.html - Jupyter notebooks with examples of pywbem client usage – PyWBEM Tools • Github repository: https://github.com/pywbem/pywbemtools • Documentation: https://pywbemtools.readthedocs.io/en/latest/index.html • Other Resources – OpenPegasus • https://collaboration.opengroup.org/pegasus/ – SNIA pywbem page • https://www.snia.org/pywbem PyWBEM Overview 18
  • 18. CIM/WBEM Specification References • DMTF Specifications: – See: https://www.dmtf.org/standards/published_documents – Common Information Model (CIM) Schema releases • CIM (Common Information model specifications and schemas – Common Information Model, DSP0004 – CIM Operations over XML - DSP0200 – Representation of CIM in XML - DSP0201 – CIM Query Language Specification –DSP0202 – Filter Query Language(FQL) – DSP0212 • SMI Specifications: – SNIA SMI-S specification • http://www.snia.org/tech_activities/standards/curr_standards/smi PyWBEM Overview 19