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:
objectClass responsible for handling document layering.
Layering is controlled in two places:
- The
LayeringPolicycontrol document, which defines the valid layers and their order of precedence. - In the
metadata.layeringDefinitionsection of normal (metadata.schema=metadata/Document/v1.0) documents.
Note
Only documents with the same
schemaare 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’sschemamust match that of the child, and itsmetadata.labelsmust 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