# python-otopi-mdp
otopi Machine Dialog Parser for python
This module allows you automate installation process based on
[otopi](https://github.com/oVirt/otopi) installator.
# Requirements
```
otopi
```
# Usage
1. Set otopi environment to enable machine dialect
DIALOG/dialect=str:machine
2. Spawn desired installer and pass stdin and stdout to parser
3. Process all otopi events in the loop
## Example for oVirt Hosted Engine
```python
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)
```
[githubissues]: https://github.com/rhevm-qe-automation/python-otopi-mdp/issues
[travisimg]: https://travis-ci.org/rhevm-qe-automation/python-otopi-mdp.svg?branch=master
[travis]: https://travis-ci.org/rhevm-qe-automation/python-otopi-mdp
Metadata
Release files for python-otopi-mdp 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| python-otopi-mdp-0.1.1.zip | 20.4 kB | Without provenance | Details for python-otopi-mdp-0.1.1.zip |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_otopi_mdp-0.1.1-py2.7.egg | Legacy Egg format | - | - | Details for python_otopi_mdp-0.1.1-py2.7.egg |
| python-otopi-mdp-0.1.1-1.src.rpm | Details for python-otopi-mdp-0.1.1-1.src.rpm |
Total release size: 53.6 kB
Release files / python-otopi-mdp-0.1.1.zip
| Download URL | python-otopi-mdp-0.1.1.zip |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a11d9b518256bcc16de3439bbac79f3f5b0b3c3edfb0812696b78bbaada2611f
|
|
BLAKE2b-256 checksum How to use checksums |
0a97e90780f2899198420c3adedfd4200601b5d1dc5052294c12bf591e4c51fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python_otopi_mdp-0.1.1-py2.7.egg
| Download URL | python_otopi_mdp-0.1.1-py2.7.egg |
|---|---|
| Size | 9.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
0b3b5e0d3245a84a9fe0bacf0ea3ce8f8fec15bf26d65bd75de5fb8f7e5ab0c6
|
|
BLAKE2b-256 checksum How to use checksums |
fe34826827eb950528dd4b89073e5cefefbca7f211ba7fd043f6cbfbeffcb889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python-otopi-mdp-0.1.1-1.src.rpm
| Download URL | python-otopi-mdp-0.1.1-1.src.rpm |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12095846e6be1222646aa4013cb2e29b1419a01910f179eb7a68bc29777b3396
|
|
BLAKE2b-256 checksum How to use checksums |
e13958823d49c4f337f7a55ede472e168e2d7a190e5eec9b6fd9a07f4f7447b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for python-otopi-mdp 0.1.1
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.