genvid.toolbox.ConsulTemplateLegacyTool

警告

この class は廃止されました。代わりに ConsulTemplateTool を使用してください。

class genvid.toolbox.ConsulTemplateLegacyTool(**kwargs)

ベースクラス: genvid.toolbox.vault.VaultTool

Consul、Vault、またはシステムで設定された変数からファイルを生成する consul-template のラッパー。

警告

この class は、監視ジョブの開始のみに使用します。他の目的では使用しないことを推奨します。このクラスは非推奨で、オリジナルバージョンの ConsulTemplateTool クラスのユーザーをサポートするために提供されています。

バージョン 1.22.1 で追加.

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

consul-template バイナリの場所

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

consul-template を使用してテンプレートから新しいファイルを作成する。

Args:

template: テンプレートファイルのパス。

dest: デスティネーション。none の場合は、ドライランを行う。

consul_addr: 使用する Consul IP。None の場合、ポート 8500 で get_consul_ip() を使用する。

log_level: consul-template のログレベル。有効な値は、』debug』、』info』、』warn』、』err』。

timeout: consul-template の終了までのタイムアウト値 (秒)。必要なキーが存在しない場合、Consul-template はブロック状態になります。子プロセスが時間内に終了しない場合、子プロセスは破棄され、 subprocess.TimeoutExpired が発生します。タイムアウトを無効にするには、None を指定します。

need_vault: consul template に実行する vault が必要かどうかを指定する。

バージョン 1.14.0 で追加.

kwargs: run() に渡されるその他のキーワード引数。

注意:

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

genvid.toolbox.ConsulTemplateLegacyTool の実装