Add a call to stop engine, this function just sets the enabled field
to false, and psutil terminates the process (equivalent to what we
do now). Also add psutil to requirements
Change-Id: Idc3edb2bf1c9ed55d7d77973c59e3d3562e2ad8b
There were some bugs in the commit to create queues dynamically. The
engine now creates queues that are needed, and passes to react scripts.
Also made some fixes to example code, added some config files. They
contain usernames, but should be simple enough to modify and test
Change-Id: Ife1977b3f8d669024fd853b6691300b5dd4fd73f
Watch cfg files for changes, if so, call right callback.
Move audit.cfg and repair.cfg into cfg/ for easier
monitoring using watchdog.
Change-Id: Iace75f36f0bfb5b83fe53c7d63b110f10534808f
Load modules dynamically, allowing better control over audit/react scripts
Change code structure a bit (put audit scripts in audit/ dir, react scripts
in repair/ dir)
Enable stevedore, for audit/react scripts installed with the package
Remove all homedir references
Change-Id: I7351d6b7cd9ca5ba9cfa9526dfbefbfecacc3dc8
As described in https://pypi.python.org/pypi/pause ,
the pause library has higher precision than the sleep lib,
and uses machine timestamp instead of counters.
Change-Id: I0f1135757ef8d1ed6e4eb203b84632ef5ec91977
Move entropy.py -> __main__.py so that it can just
be used by running $ python entropy (inside the
entropy root folder).
Also use yaml loading instead of json loading since
yaml allows for comments inside the file (yaml is
a superset of json).
Removed import json from __main__.py to keep pep8 happy
Also changed react.py to use a per module logger instead
of root logger
Change-Id: I5eb24319dee4f04891878c6e61cc4d7835b14d34
Added kombu, an interface to AMQP
Added react.py, sample reaction script with a kombu consumer.
Should be run separately. Just loops forever listening for
messages on the PASS_EVENTS queue/
Added queues.py, define an exchange and two queues to use
for the message queue
Replaced runthis.sh with audit.py, changed runthis.json to
audit.json. audit.py has send_message(), which sends a message
to the PASS_EVENTS queue
Configuration data for audit.py and react.py should be picked up
from audit.json and react.json.
Added H304, H302 to pep8 ignores
Change-Id: I32d5c007d3b00ee2ec33635bca1567da4447124c
Because upstream wasn't mentioned when project was created, merge
existing upstream code manually. Current upstream is
https://github.com/pran1990/entropy
Add first draft of script in entropy/entropy.py. Utils used by the package are in entropy/utils.py
Added licenses to py scripts and LICENCE file
Added tox.ini, requirements.txt, and test-requirements.txt to setup
environments for gerrit's jenkins tests
Added sphinx docs in docs/. Instructions to build docs are in docs/README.rst
Change-Id: Ifff7cff38989e8c5509d3ecf4b34485893bfcfdb