python-otopi-mdp
otopi Machine Dialog Parser for python
This module allows you automate installation process based on otopi installator.
Requirements
six
otopi
WARNING: The otopi package is not hosted on PyPi site, so it couldn’t be included as dependency of this package. It is maintaned by oVirt community, they ship this module for several package managements.
Usage
Set otopi environment to enable machine dialect
DIALOG/dialect=str:machine
Spawn desired installer and pass stdin and stdout to parser
Process all otopi events in the loop
Example for oVirt Hosted Engine
import subprocess
import otopimdp as mdp
# 1. Set machine dialog option
with open("/etc/ovirt-hosted-engine-setup.env.d/mycustom.env") as fd:
fd.write(
'export environment="${environment} DIALOG/dialect=str:machine"\n'
)
# 2. Spawn installer
installer = subprocess.Popen(["hosted-engine", "--deploy"])
parser = mdp.MachineDialogParser(
input_=installer.stdout, output=installer.stdin
)
# 3. Process events
while True:
event = parser.next_event()
if event is None:
continue
event_type = event[mdp.TYPE_KEY]
if event_type == mdp.TERMINATE_EVENT:
break
event_name = event[mdp.ATTRIBUTES_KEY]['name']
if event_name == "OVEHOSTED_HOST_ID":
event[mdp.REPLY_KEY] = "1"
....
parser.send_response(event)
Run tests
tox
NOTE: For testing purposes, the otopi package is being run from sources.
Metadata
Release files for python-otopi-mdp 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-otopi-mdp-0.2.2.zip | 25.9 kB | Without provenance | Details for python-otopi-mdp-0.2.2.zip |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_otopi_mdp-0.2.2-py2.7.egg | Legacy Egg format | - | - | Details for python_otopi_mdp-0.2.2-py2.7.egg |
| python-otopi-mdp-0.2.2-1.src.rpm | Details for python-otopi-mdp-0.2.2-1.src.rpm | |||
| python-otopi-mdp-0.2.2-1.noarch.rpm | Details for python-otopi-mdp-0.2.2-1.noarch.rpm |
Total release size: 90.8 kB
Release files / python-otopi-mdp-0.2.2.zip
| Download URL | python-otopi-mdp-0.2.2.zip |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91d785fd8a69e2841fc7d2b13fd9fd63ad6bd41717ed6d8f039450eb36c5755e
|
|
BLAKE2b-256 checksum How to use checksums |
fcd8b22474ba35f26a9b6847f3ea90959d20c9b42dc8bf1caf8592689befdb43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python_otopi_mdp-0.2.2-py2.7.egg
| Download URL | python_otopi_mdp-0.2.2-py2.7.egg |
|---|---|
| Size | 16.0 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
922a7476e489c58f91efa81b2d13b55c0b972780ac7874e2042003e59ccd20c4
|
|
BLAKE2b-256 checksum How to use checksums |
7b252339c0cc9aa8b072780a9019fb880f7140bb8b1e2b636e24b51546ed82bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python-otopi-mdp-0.2.2-1.src.rpm
| Download URL | python-otopi-mdp-0.2.2-1.src.rpm |
|---|---|
| Size | 26.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08fb13bc27722d62457e0b6f624d167c1dcc9d0103a0b31aec05aafd3ddb18ce
|
|
BLAKE2b-256 checksum How to use checksums |
24139a964e6a92b3ba4fec8b362df8a5919ebb3d604fe834931d8be4feac6286
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python-otopi-mdp-0.2.2-1.noarch.rpm
| Download URL | python-otopi-mdp-0.2.2-1.noarch.rpm |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c715c885e2552967369cd84437cba9b0de089ff66939755d88091b6801a8f2f9
|
|
BLAKE2b-256 checksum How to use checksums |
22164e9e4adff80facca2742c5ce7c3d96bc386ad7663bd4e42a8474407ba046
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for python-otopi-mdp 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.