Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Implements parser for otopi machine dialog.

Project description

Build Status Code Coverage Code Health


otopi Machine Dialog Parser for python

This module allows you automate installation process based on otopi installator.



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.


  1. Set otopi environment to enable machine dialect
  1. Spawn desired installer and pass stdin and stdout to parser
  2. 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:
        '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:
    event_type = event[mdp.TYPE_KEY]
    if event_type == mdp.TERMINATE_EVENT:

    event_name = event[mdp.ATTRIBUTES_KEY]['name']
    if event_name == "OVEHOSTED_HOST_ID":
        event[mdp.REPLY_KEY] = "1"

Run tests


NOTE: For testing purposes, the otopi package is being run from sources.

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
python-otopi-mdp-0.2.2-1.noarch.rpm (22.0 kB) Copy SHA256 hash SHA256 RPM any Oct 2, 2017
python-otopi-mdp-0.2.2-1.src.rpm (26.8 kB) Copy SHA256 hash SHA256 RPM any Oct 2, 2017
python_otopi_mdp-0.2.2-py2.7.egg (16.0 kB) Copy SHA256 hash SHA256 Egg 2.7 Oct 2, 2017 (25.9 kB) Copy SHA256 hash SHA256 Source None Oct 2, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page