OpenShift Python Scale Utilities
Project description
openshift-python-scale-utilities
WIP
ocp_scale_utilites.threaded
- https://docs.python.org/3/library/concurrent.futures.html
- https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor
Usage
from ocp_resources.virtual_machine import VirtualMachine
from ocp_scale_utilities.threaded.utils import (
threaded_deploy_resources,
threaded_delete_resources,
threaded_wait_deleted_resources,
)
from ocp_scale_utilities.threaded.scale import ThreadedScaleResources
# Create iterable of VirtualMachine python objects to deploy
# Be sure to use deepcopy() when passing dicts to objects to avoid collisions
vms = [VirtualMachine(..., body=deepcopy(body))]
# Option A:
def funcA():
threaded_deploy_resources(resources=vms)
yield vms
threaded_delete_resources(resources=vms)
threaded_wait_deleted_resources(resources=vms)
# Option B:
def funcB():
with ThreadedScaleResources(resources=vms, wait_for_status=VirtualMachine.Status.RUNNING):
yield vms
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 openshift_python_scale_utilities-0.1.1.1-py3-none-any.whl.
File metadata
- Download URL: openshift_python_scale_utilities-0.1.1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 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 |
f2bc840048a98485364f0ee67a3edc3334c9b02e64f118f168ac982c792851cc
|
|
| MD5 |
c4f445d9e5ad71a353f5f6faf48580e2
|
|
| BLAKE2b-256 |
13ea24be11a2b039ccfc74cf6b6fbc325f341bbaf0643af91f8dd5ee16043156
|