Skip to main content

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

Version on Pypi Test status (master) Docs build status (latest) Test coverage (master)

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

zhmcclient-0.8.0.tar.gz (125.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zhmcclient-0.8.0-py2.py3-none-any.whl (95.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file zhmcclient-0.8.0.tar.gz.

File metadata

  • Download URL: zhmcclient-0.8.0.tar.gz
  • Upload date:
  • Size: 125.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zhmcclient-0.8.0.tar.gz
Algorithm Hash digest
SHA256 b52d80837af7bdae6c4fb42f9f0f6ca9d8d4c03c43deb7df8d3e14e2bf31ddf0
MD5 3b7c56a6c435024a919ec1ff60a65260
BLAKE2b-256 066cd3044d018e3606370999374e6db5fe44b59edf198b7466535ecad4e49b78

See more details on using hashes here.

File details

Details for the file zhmcclient-0.8.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for zhmcclient-0.8.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fc6ee4a4d48bcc8ba0a225020a984782ecd92659418e0223c0bec26083da5d0b
MD5 81f6635fbba25bdbe56fa516cf7c43a0
BLAKE2b-256 cacfeaf7593e4724cd9dd5ed27be63c60bb33326a95bd682bb8198c08da78e68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page