lpar-activation-work
[]
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
- To call the zhmclient to activate the lpar, Sleep for 10 minutes
- ssh to the ipaddress (Linux guest ip address)
- download the script file to, local machine, from given source path
- upload the dowloaded script file to the dir(/ffdc/u/eATS_automation) on the ssh session
- invoke the script command (ex: sh make_loop.sh) on the ssh session
- 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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| lpar_activation_work-0.0.1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|