cdist/cdist
Darko Poljak d17f75a010 Support user defined processes
User defined processes are defined by new cdist beta command 'process'.

Processes can be defined in `process` subdirectory in `$HOME/.cdist` or
in custom directories specified through CDIST_PROCESS_PATH environment
variable.

`<path>/process` processes are defined in subdirectories, where a
directory must contain `__init__.py` file to be recognized as a process,
and it is then imported as a module.

Since scanning and registering processes happens before cdist arguments
are parsed, then standard cdist logging cannot be used in this stage.
This is why CDIST_PROCESS_DEBUG environemnt variable turns on debug
messages.

Dummy example (`~/.cdist/process/homeprocess/__init__.py`):

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-

    import logging
    import subprocess

    log = logging.getLogger(__name__)

    def register(parent_parser):
        parser = parent_parser.add_parser('cdist-help')
        parser.set_defaults(func=cdist_help)

    def cdist_help(args):
        cmd = [ "cdist", "-h", ]
        log.info("Running my process cdist help")
        subprocess.check_call(cmd)
2020-01-12 15:00:24 +01:00
..
conf __acl: rename --acl to --entry for the sake of consistency, add compatibility 2020-01-04 17:43:57 +02:00
core Redefine/reimplement CDIST_ORDER_DEPENDENCY 2019-11-27 15:04:47 +01:00
exec Info command: support tilde expansion 2020-01-11 15:26:46 +01:00
preos/debootstrap Release preos, i.e. make it non-beta 2019-09-20 19:56:17 +02:00
sphinxext Return translator_class for older sphinx versions. 2018-03-15 13:49:22 +01:00
test Redefine/reimplement CDIST_ORDER_DEPENDENCY 2019-11-27 15:04:47 +01:00
util Fix DirectoryDict getitem. 2018-10-12 19:08:36 +02:00
__init__.py Report explorer error better 2019-04-20 14:30:28 +02:00
argparse.py Support user defined processes 2020-01-12 15:00:24 +01:00
autil.py Add archiving support. 2017-08-09 16:56:02 +02:00
banner.py Some pylint cleaning. 2017-08-22 10:58:30 +02:00
config.py Redefine/reimplement CDIST_ORDER_DEPENDENCY 2019-11-27 15:04:47 +01:00
configuration.py Add timestamping log option to config file. 2018-09-27 18:55:33 +02:00
emulator.py Redefine/reimplement CDIST_ORDER_DEPENDENCY 2019-11-27 15:04:47 +01:00
flock.py Add file locking for -j parallel execution. 2017-08-13 12:26:20 +02:00
hostsource.py Merge custom cache path pattern from beta branch. 2017-07-01 23:59:51 +02:00
info.py Info command: support tilde expansion 2020-01-11 15:26:46 +01:00
install.py Add missing param. 2016-11-01 08:11:37 +01:00
integration.py Change path removal suitable for integration and normal run. 2017-09-14 09:53:16 +02:00
inventory.py Fix pycodestyle 2019-05-17 13:03:54 +02:00
log.py Add timestamp to log messages. 2018-09-23 20:36:57 +02:00
message.py Some pylint cleaning. 2017-08-22 10:58:30 +02:00
mputil.py Further improve parallel execution. 2017-07-26 17:39:07 +02:00
preos.py Fix typo 2020-01-12 12:19:49 +01:00
process.py Support user defined processes 2020-01-12 15:00:24 +01:00
shell.py Save output streams. 2018-01-09 09:31:40 +01:00