Skip to main content

linux_workload_execution

[PyPI version]

Overview

linux_workload_execution 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 linux-workload-execution

config JSON format

config.json

{
    "hmc_host_name": "ip address of host",
    "hmc_userid": "hmc user id",
    "hmc_user_pwd": "hmc user password",    
    "cpc": "cpc details",
    "lpar": "lpar details",
    "linux_system_ip": "ip address of host system",
    "linux_user_name": "user name",
    "linux_pwd": "password",
    "script_details": {
        "token": "",
        "name": "example.sh",
        "url": "path to script file",
        "exec_path": "path to script execution",
        "local_path": "./"
    }
}

Usage example

main.py
*******
import os
import sys
from linux_workload_execution.activation import Activation

if __name__ == "__main__":
    
    if (len(sys.argv) == 2 and os.path.exists(sys.argv[1])):
        activation_obj = Activation(sys.argv[1])
        if activation_obj.entry_point():
            print("***********Successfully completed***********")
        else:
            print("***********not successfully completed***********")
    else:
        print("***********JSON file not provided***********")
        print("***********Please provide JSON file***********")

Running the Python code

python main.py config.json

Python package creation

REFERENCE

Metadata

Release files for linux-workload-execution 1.0.11

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

Source distribution (sdist)

Source distribution for linux-workload-execution 1.0.11
File Size Uploaded
linux_workload_execution-1.0.11.tar.gz 6.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for linux-workload-execution 1.0.11
File Interpreter ABI Platform
linux_workload_execution-1.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 MB

Release files / linux_workload_execution-1.0.11.tar.gz

Download URL linux_workload_execution-1.0.11.tar.gz
Size 6.7 MB
Tags Source
SHA-256 checksum
How to use checksums
74cc1907ef40784ef96e82def1db79b6c05e8e8002c3b9bf43beff24c986389f
BLAKE2b-256 checksum
How to use checksums
facd0176dc02078dd637d09612640b13b6932306d1e2e3766486c95355133d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / linux_workload_execution-1.0.11-py3-none-any.whl

Download URL linux_workload_execution-1.0.11-py3-none-any.whl
Size 8.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
da60777ab56942742dc93b09718523c72ce8b11e12c61687dcac1dfdb6c7d864
BLAKE2b-256 checksum
How to use checksums
129af2f89f867e57933524440f132dc4b2c878ea9ccf936727adaf79e7148895
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

1.0.11 This release

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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