Created: 2024-01-15 | Updated: 2024-09-21
Git Repository
New (v0.3.22)
Table of contents
Node Type: git_repository
Rendering:
Code Snippet:
# given
mcd = MultiCloudDiagrams()
# when
arn = 'arn:aws:code:eu-west-1:123456789012:repo/123'
metadata = {
'name': 'my-repo',
'image': '123456789012.dkr.ecr.eu-west-1.amazonaws.com/cluster/myapp:v2-22-00',
'imageDigest': 'sha256:5562sfsf60a6d1aaed5c2bb227d3d4ec14c755bdb446349b',
}
mcd.add_vertex(node_id=arn, node_name='git_repository', node_type='git_repository', metadata=metadata)
drawio git_repository vertex:
<mxCell id="vertex:git_repository:arn:aws:code:eu-west-1:123456789012:repo/123" parent="1" vertex="1">
<mxGeometry width="50" height="50" as="geometry"/>
</mxCell>
Advanced for Geeks:
Style:
style="verticalLabelPosition=bottom;html=1;verticalAlign=top;align=left;strokeColor=none;fillColor=#00BEF2;shape=mxgraph.azure.git_repository;"
attribute | value |
---|---|
align | left |
fillColor | #00BEF2 |
html | 1 |
shape | mxgraph.azure.git_repository |
strokeColor | none |
verticalAlign | top |
verticalLabelPosition | bottom |
Vertex size:
attribute | value |
---|---|
width | 50 |
height | 50 |
Full XML dump:
<mxfile host="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud">
<diagram id="diagram_1" name="AWS components">
<mxGraphModel dx="1015" dy="661" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="vertex:git_repository:arn:aws:code:eu-west-1:123456789012:repo/123" value="<b>Name</b>: git_repository<BR><b>ID</b>: arn:aws:code:eu-west-1:123456789012:repo/123<BR>-----------<BR><b>name</b>: my-repo<BR><b>image</b>: 123456789012.dkr.ecr.eu-west-1.amazonaws.com/cluster/myapp:v2-22-00<BR><b>imageDigest</b>: sha256:5562sfsf60a6d1aaed5c2bb227d3d4ec14c755bdb446349b" style="verticalLabelPosition=bottom;html=1;verticalAlign=top;align=left;strokeColor=none;fillColor=#00BEF2;shape=mxgraph.azure.git_repository;" parent="1" vertex="1">
<mxGeometry width="50" height="50" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
drawio file:
Download generated git_repository.drawio
: