deckhand/deckhand
Felipe Monteiro c9d71a6509 substitution: Recursive pattern replacement
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
2018-09-12 09:24:46 -06:00
..
barbican Implement Barbican cache for quick secret payload/ref data 2018-08-22 16:16:26 +01:00
client style(pep8): remove identation ignores 2018-06-01 22:08:42 +00:00
common substitution: Recursive pattern replacement 2018-09-12 09:24:46 -06:00
conf Implement Barbican cache for quick secret payload/ref data 2018-08-22 16:16:26 +01:00
control Merge "Implement Barbican cache for quick secret payload/ref data" 2018-09-06 19:33:00 +00:00
db Merge "Support rolling back to revision 0" 2018-08-24 17:31:31 +00:00
engine substitution: Recursive pattern replacement 2018-09-12 09:24:46 -06:00
policies Rename Deckhand bucket endpoint to buckets for consistency 2017-10-27 19:21:03 +01:00
tests substitution: Recursive pattern replacement 2018-09-12 09:24:46 -06:00
__init__.py Oslo config integration (#1) 2017-06-26 16:57:50 -07:00
cmd.py Integrate Deckhand with keystone auth 2017-10-16 19:54:46 +01:00
context.py Integrate Deckhand with keystone auth 2017-10-16 19:54:46 +01:00
errors.py refactor: Use yaml.add_representer to reduce complexity 2018-07-10 19:23:52 +01:00
factories.py Simplify schema validation 2018-07-03 02:07:33 +00:00
policy.py DECKHAND-66: Document substitution implementation 2017-10-13 15:16:27 -04:00
service.py [feature] Endpoint for listing revision validations with details 2018-04-29 01:37:38 +00:00
types.py Simplify schema validation 2018-07-03 02:07:33 +00:00