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.5.1.dev39.tar.gz (108.1 kB view details)

Uploaded Source

Built Distribution

zhmcclient-0.5.1.dev39-py2.py3-none-any.whl (70.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file zhmcclient-0.5.1.dev39.tar.gz.

File metadata

File hashes

Hashes for zhmcclient-0.5.1.dev39.tar.gz
Algorithm Hash digest
SHA256 50bc8fe9ea14581d08f29bb79cb4e8dab1f4e8ec8efcc0fab13fa61563e4269f
MD5 1b866861a7943940fa2d070611715669
BLAKE2b-256 c091236c31c2ef7791181c0d53061daa7296dcb61090c0256f09b3b7a1ff984a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zhmcclient-0.5.1.dev39-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 81498997d498605c4cad5039944d0873b8cd58d435050acc35781ffe434016c4
MD5 ed129d7df9f6920e9832ec52c949705c
BLAKE2b-256 14f3c732cb995ff1108d337914f2fc36c4bb03ec85edeaedf8886470979487c8

See more details on using hashes here.

Supported by

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