linux_workload_execution 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
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linux_workload_execution-0.0.1.tar.gz.
File metadata
- Download URL: linux_workload_execution-0.0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad5ba37abf0b9aa880df3b6e5962b44ec047658e9057c19216ba030307dd6d9
|
|
| MD5 |
61c05ea3462ba4f4853b480ad735ba96
|
|
| BLAKE2b-256 |
2d1be129a5026de4ba47eba2e0935a0c3a69ef0ccf00ff40f06bdf27ffe5fc6b
|
File details
Details for the file linux_workload_execution-0.0.1-py3-none-any.whl.
File metadata
- Download URL: linux_workload_execution-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c24cb129cba0a9697431824a0c4ac1c6655a553f5aa2f4bac2d3652d894a24d8
|
|
| MD5 |
827e6dcb54acea2db26d61a524d966d9
|
|
| BLAKE2b-256 |
6e8d5c11ab596a7caf91952b071d378ca7d1eee835c3edf11aa7393595ce9187
|