This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

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

  1. Set otopi environment to enable machine dialect
DIALOG/dialect=str:machine
  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:
    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.

Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python_otopi_mdp-0.2.1-py2.7.egg (16.0 kB) Copy SHA256 Checksum SHA256 2.7 Egg Nov 1, 2016
python-otopi-mdp-0.2.1.tar.gz (16.9 kB) Copy SHA256 Checksum SHA256 Source Nov 1, 2016
python-otopi-mdp-0.2.1.zip (25.9 kB) Copy SHA256 Checksum SHA256 Source Nov 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting