openstackdocstheme is only for Official OpenStack projects, see
https://docs.openstack.org/openstackdocstheme/latest/
this repo is not an official project under governance.
This reverts commit 66d45fc53d.
Fix build problems:
* Fix wrong include path
* Disable sphinxmark
Change-Id: I83e91d12e82a8cf703f4b09c7d315edbb9878bd9
1.1 KiB
1.1 KiB
Developer guide
One of the design goals of monitorstack is to make it easy to develop new monitoring plugins.
Writing plugins
Start by adding a new python script in the plugins
directory. The plugin will inherit the same name as the file. For
example, creating a plugin file called my_plugin.py will
create a new plugin called my_plugin.
Use the uptime plugin as a guide for developing new
plugins:
../../monitorstack/plugins/uptime.py
Every plugin will have a cli() method that is the
equivalent of ___main___ in other Python scripts.
Testing plugins
Add tests in the tests directory and follow the
uptime example. Here are the contents of
tests/int/test_plugin_uptime.py as an example:
../../tests/int/test_plugin_uptime.py
Running tests
There are two main sets of tests: pep8/flake8 tests and unit tests:
# PEP8 and flake8 checks
tox -e linters
# Unit tests
tox -e functional