linux_load_execution
[]
Overview
linux_load_execution 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 linux_load_execution
config JSON format
config.json
{
"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 linux-load-execution 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 | |
|---|---|---|---|
| linux_load_execution-0.0.1.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| linux_load_execution-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / linux_load_execution-0.0.1.tar.gz
| Download URL | linux_load_execution-0.0.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f11c82f1104fc340207930ff8b97d38ee6d6e4c81f9894f2ef016d0a4140962
|
|
BLAKE2b-256 checksum How to use checksums |
7383de6b71f35330196127bc8ca8e8caa239a09fa1a276a4ed4afe1a0e5ad6bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / linux_load_execution-0.0.1-py3-none-any.whl
| Download URL | linux_load_execution-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d9be0a961bbc94d70f2217ec19b7e30dfe32779245653ecca602553e810b132
|
|
BLAKE2b-256 checksum How to use checksums |
ed5172d9cc1352f01fe8ff40deed8cb93aa52cce06749b759b913d6dcfcf2b87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|