Created: 2024-01-15 | Updated: 2024-09-21

Git Repository

New (v0.3.22)

Table of contents

  1. Node Type: git_repository
  2. Rendering:
  3. Code Snippet:
  4. drawio git_repository vertex:
  5. Advanced for Geeks:
    1. Style:
    2. Vertex size:
    3. Full XML dump:
    4. drawio file:

Node Type: git_repository

Rendering:

lambda

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;"
attributevalue
alignleft
fillColor#00BEF2
html1
shapemxgraph.azure.git_repository
strokeColornone
verticalAligntop
verticalLabelPositionbottom

Vertex size:

attributevalue
width50
height50

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="&lt;b&gt;Name&lt;/b&gt;: git_repository&lt;BR&gt;&lt;b&gt;ID&lt;/b&gt;: arn:aws:code:eu-west-1:123456789012:repo/123&lt;BR&gt;-----------&lt;BR&gt;&lt;b&gt;name&lt;/b&gt;: my-repo&lt;BR&gt;&lt;b&gt;image&lt;/b&gt;: 123456789012.dkr.ecr.eu-west-1.amazonaws.com/cluster/myapp:v2-22-00&lt;BR&gt;&lt;b&gt;imageDigest&lt;/b&gt;: 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:

Download