Skip to content

Commit c3bde30

Browse files
ilaifMidnighter
andcommitted
feat: add hydrate method
Co-authored-by: Midnighter <[email protected]>
1 parent cde5fca commit c3bde30

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/structurizr/model/deployment_node.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,13 @@ def __init__(
6262
self.instances = instances
6363
self.children = set(children)
6464
self.container_instances = set(container_instances)
65+
66+
@classmethod
67+
def hydrate(cls, deployment_node_io: DeploymentNodeIO) -> "DeploymentNode":
68+
""""""
69+
# TODO (midnighter): Initialization requires `parent`.
70+
return cls(
71+
# parent=deployment_node_io.parent,
72+
name=deployment_node_io.name,
73+
description=deployment_node_io.description,
74+
)

0 commit comments

Comments
 (0)