Skip to main content

lpar-activation-work

[PyPI version]

Overview

lpar-activation-work is a Python package designed to: Takes details like, lpar, ipaddress, script directory and script command as the input, and perform below activities

  1. To call the zhmclient to activate the lpar, Sleep for 10 minutes
  2. ssh to the ipaddress (Linux guest ip address)
  3. download the script file to, local machine, from given source path
  4. upload the dowloaded script file to the dir(/ffdc/u/eATS_automation) on the ssh session
  5. invoke the script command (ex: sh make_loop.sh) on the ssh session
  6. collect the output printed on the ssh session and print it

Installation

You can install the package using pip:

pip install lpar-activation-work

config JSON format

{
    "host_name": "ip address of host",
    "hmcm_user_name": "user name of HMC",
    "hmcm_pwd": "password of HMC",
    "cpc": "cpc details",
    "lpar": "lpar details",
    "system_host": "ip address of host system",
    "userid": "user id",
    "user_pwd": "user password",
    "ssh_key_path": "SSH_KEY_PATH",
    "script_details": {
        "token": "",
        "name": "example.sh",
        "url": "path to script file",
        "exec_path": "path to execution",
        "local_path": "./"
    }
}

Usage example

main.py
*******
from activation import Activation


activation_obj = Activation(sys.argv[1])
activation_obj.entry_point()

Running the Python code

python main.py config.json

Python package creation

REFERENCE

Metadata

Release files for lpar-activation-work 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lpar-activation-work 0.0.1
File Size Uploaded
lpar_activation_work-0.0.1.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lpar-activation-work 0.0.1
File Interpreter ABI Platform
lpar_activation_work-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / lpar_activation_work-0.0.1.tar.gz

Download URL lpar_activation_work-0.0.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
77ccc5b97f81ef0a4f4abbc61e39c63172a56bbafd4f4cd3e61bec15478edfaf
BLAKE2b-256 checksum
How to use checksums
54a727756efdf841aaab8ff3cd74f9ae9ab66734834d95da34a4662b81f92026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / lpar_activation_work-0.0.1-py3-none-any.whl

Download URL lpar_activation_work-0.0.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fa861e35bd9413c2800a1c6eac517bade3c067a9a77e4d02acc6aaf224ec7ff
BLAKE2b-256 checksum
How to use checksums
cc7a5027539d5d1d3ff5d0ef143d3336e1a8014ba4bbaa0a920360c98d3fd5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page