deckhand.engine.layering module¶
-
class
deckhand.engine.layering.
DocumentLayering
(documents, validate=True, fail_on_missing_sub_src=True, encryption_sources=None, cleartext_secrets=False)[source]¶ Bases:
object
Class responsible for handling document layering.
Layering is controlled in two places:
- The
LayeringPolicy
control document, which defines the valid layers and their order of precedence. - In the
metadata.layeringDefinition
section of normal (metadata.schema=metadata/Document/v1.0
) documents.
Note
Only documents with the same
schema
are allowed to be layered together into a fully rendered document.-
documents
¶
-
render
()[source]¶ Perform layering on the list of documents passed to
__init__
.Each concrete document will undergo layering according to the actions defined by its
metadata.layeringDefinition
. Documents are layered with their parents. A parent document’sschema
must match that of the child, and itsmetadata.labels
must much the child’smetadata.layeringDefinition.parentSelector
.Returns: The list of concrete rendered documents.
Return type: List[dict]
Raises: - UnsupportedActionMethod – If the layering action isn’t found
among
self.SUPPORTED_METHODS
. - MissingDocumentKey – If a layering action path isn’t found in both the parent and child documents being layered together.
- UnsupportedActionMethod – If the layering action isn’t found
among
-
secrets_substitution
¶
- The