genvid.toolbox.ConsulTemplateLegacyTool

Warning

This class has been deprecated. Please use ConsulTemplateTool instead.

class genvid.toolbox.ConsulTemplateLegacyTool(**kwargs)

Bases: genvid.toolbox.vault.VaultTool

A wrapper over consul-template that generates files from variables set in Consul, Vault, or from the environment.

Warning

This class is only used for starting the supervisor jobs. We do not recommend using it for any other purpose. This class is deprecated and provided to support user of the original version of ConsulTemplateTool class.

New in version 1.22.1.

consul_template_filter = '(?m)^.*((\\[DEBUG\\] \\(runner\\) (final|checking|running|missing|diffing|was|watching|rendering|stopping))|(\\[INFO\\])).*(\\r\\n|\\n)'
CONSUL_TEMPLATE

The consul-template binary location

consul_template(template, dest=None, *, consul_addr=None, log_level='warn', need_vault: bool = False, timeout=30, **kwargs)

Build a new file from a template using consul-template.

Args:

template: The path of the template file.

dest: The destination. If none, do a dry run instead.

consul_addr: The Consul IP to use. If None, it will use get_consul_ip() on port 8500.

log_level: The log level of consul-template. Valid values are ‘debug’, ‘info’, ‘warn’ and ‘err’.

timeout: A timeout value (in seconds) for consul-template to finish. Consul-template is blocking if a key is required but not present. This will kill the child process and raise a subprocess.TimeoutExpired if the child process doesn’t terminate in time. Set to None to wait indefinitely.

need_vault: If consul template require vault to run.

New in version 1.14.0.

kwargs: Any other keyword arguments pass to run().

Note:

Since absolute paths aren't well supported with
consul-template on Windows, you must pass paths relative
to the current working directory (:attr:`ROOTDIR` by
default).

A dry run always outputs a first line containing '> '.
class consul_template_legacy.ConsulTemplateLegacyTool

Implementation of genvid.toolbox.ConsulTemplateLegacyTool