Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lpar_activation_work-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

lpar_activation_work-0.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file lpar_activation_work-0.0.1.tar.gz.

File metadata

  • Download URL: lpar_activation_work-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for lpar_activation_work-0.0.1.tar.gz
Algorithm Hash digest
SHA256 77ccc5b97f81ef0a4f4abbc61e39c63172a56bbafd4f4cd3e61bec15478edfaf
MD5 db1250b49c72c64389767d259a1796bb
BLAKE2b-256 54a727756efdf841aaab8ff3cd74f9ae9ab66734834d95da34a4662b81f92026

See more details on using hashes here.

File details

Details for the file lpar_activation_work-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lpar_activation_work-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4fa861e35bd9413c2800a1c6eac517bade3c067a9a77e4d02acc6aaf224ec7ff
MD5 3d8d0d9874c3b6ba2231674e79eadc0f
BLAKE2b-256 cc7a5027539d5d1d3ff5d0ef143d3336e1a8014ba4bbaa0a920360c98d3fd5c8

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