A pure Python client library for the z Systems HMC Web Services API.
Project description
zhmcclient - A pure Python client library for the z Systems HMC Web Services API
Overview
The zhmcclient package (also known as python-zhmcclient) is a client library written in pure Python that interacts with the Web Services API of the Hardware Management Console (HMC) of z Systems or LinuxONE machines. The goal of this package is to make the HMC Web Services API easily consumable for Python programmers.
The HMC Web Services API is the access point for any external tools to manage the z Systems or LinuxONE platform. It supports management of the lifecycle and configuration of various platform resources, such as partitions, CPU, memory, virtual switches, I/O adapters, and more.
The zhmcclient package encapsulates both protocols supported by the HMC Web Services API:
REST over HTTPS for request/response-style operations driven by the client. Most of these operations complete synchronously, but some long-running tasks complete asynchronously.
JMS (Java Messaging Services) for notifications from the HMC to the client. This is used for notification about changes in the system, or about completion of asynchronous tasks started using REST.
Installation
The quick way:
$ pip install zhmcclient
For more details see the Installation section in the documentation.
Quickstart
#!/usr/bin/env python
import zhmcclient
import requests.packages.urllib3
# Set these variables for your environment:
zhmc = "<IP address or hostname of the HMC>"
userid = "<userid on that HMC>"
password = "<password of that HMC userid>"
requests.packages.urllib3.disable_warnings()
session = zhmcclient.Session(zhmc, userid, password)
client = zhmcclient.Client(session)
vi = client.version_info()
print("HMC API version: {}.{}".format(vi[0], vi[1]))
print("Listing CPCs ...")
cpcs = client.cpcs.list()
for cpc in cpcs:
print(cpc)
Documentation
The zhmcclient documentation is on RTD:
Development, testing, and contributing
For more details, see the Development section in the documentation.
License
python-zhmcclient is licensed under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zhmcclient-0.6.0.tar.gz
.
File metadata
- Download URL: zhmcclient-0.6.0.tar.gz
- Upload date:
- Size: 108.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1044dcd46eaae634675c5ead05e1a5a3e33c4d8592b27ea75c5e59fa4352b5d |
|
MD5 | 71cd905712d53a1dea191922f543999e |
|
BLAKE2b-256 | b5615c27ff665a291a80eda0d16fca3a8b04139fb9fdd89c34c3782682e4cbbc |
File details
Details for the file zhmcclient-0.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: zhmcclient-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 70.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8149740e0f3c36db68610f6ee9280e717f2a45abad3f3380742b8d7118b04001 |
|
MD5 | 5355850482ead21f9be30c9f3350a9c8 |
|
BLAKE2b-256 | 4bb80275be17854186d2e6fc420cc565132152079dd4ff6c3e6d57f4c750a987 |