c9d71a6509
Patterns may now be replaced recursively. This can be achieved by using specifying a ``pattern`` value and ``recurse`` (with a required ``depth`` argument). Example: substitutions: - dest: path: . pattern: REGEX recurse: depth: -1 src: schema: deckhand/Passphrase/v1 name: example-password path: . NOTE: Recursive selection of patterns will only consider matching patterns. Non-matching patterns will be ignored. Thus, even if recursion can "pass over" non-matching patterns, they will be silently ignored. This is useful for reducing the number of substitution stanzas that are required for the purposes of performing all the string pattern replacements that are required. Best practice is to limit the scope of the recursion as much as possible: e.g. avoid passing in "$" as the ``jsonpath``, but rather a JSON path that lives closer to the nested strings in question. Included in this patch set: * recursive implementation for pattern replacement * unit tests for most scenarios and edge cases * docstring updates * documentation updates * schema updates for validation Change-Id: I85048349097ed696667fae80f1180808d264bbcf |
||
---|---|---|
.. | ||
barbican | ||
client | ||
common | ||
conf | ||
control | ||
db | ||
engine | ||
policies | ||
tests | ||
__init__.py | ||
cmd.py | ||
context.py | ||
errors.py | ||
factories.py | ||
policy.py | ||
service.py | ||
types.py |