-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tests, documentation for ecr, github_code, git_repository n…
…odes
- Loading branch information
Showing
13 changed files
with
417 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
layout: default | ||
title: Elastic Container Registry | ||
parent: AWS Components | ||
nav_order: 3 | ||
date: 2024-01-15 | ||
--- | ||
|
||
# Elastic Container Registry | ||
{: .d-inline-block .no_toc } | ||
|
||
New (v0.3.22) | ||
{: .label .label-green } | ||
|
||
## Table of contents | ||
{: .no_toc .text-delta } | ||
|
||
1. TOC | ||
{:toc} | ||
|
||
--- | ||
|
||
|
||
## Node Type: ``ecr`` | ||
|
||
## Rendering: | ||
|
||
![lambda](output/jpg/ecr.jpg) | ||
|
||
## Code Snippet: | ||
|
||
```python | ||
{% root_include_snippet ../tests/aws/test_ecr.py %} | ||
``` | ||
|
||
## drawio ecr vertex: | ||
|
||
```xml | ||
<mxCell id="vertex:ecr:arn:i-1234567890abcdef0" parent="1" vertex="1"> | ||
<mxGeometry width="69" height="72" as="geometry"/> | ||
</mxCell> | ||
``` | ||
--- | ||
|
||
## Advanced for Geeks: | ||
|
||
### Style: | ||
```html | ||
style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.ecr;fillColor=#F58534;gradientColor=none;" | ||
``` | ||
|
||
| attribute | value | | ||
|:----------|:------| | ||
|align| left | | ||
|dashed| 0 | | ||
|fillColor| #F58534 | | ||
|gradientColor| none | | ||
|html| 1 | | ||
|outlineConnect| 0 | | ||
|shape| mxgraph.aws3.ecr | | ||
|verticalAlign| top | | ||
|verticalLabelPosition| bottom | | ||
|
||
### Vertex size: | ||
|
||
| attribute | value | | ||
|:---------|:-----------| | ||
| width | 69 | | ||
| height |72| | ||
|
||
### Full XML dump: | ||
```xml | ||
<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:ecr:arn:i-1234567890abcdef0" value="<b>Name</b>: Registry for images<BR><b>ARN</b>: arn:i-1234567890abcdef0<BR>-----------<BR><b>images</b>: 23<BR><b>ImageId</b>: ami-0abcdef1234567890<BR><b>multiarch</b>: 13" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.ecr;fillColor=#F58534;gradientColor=none;" parent="1" vertex="1"> | ||
<mxGeometry width="69" height="72" as="geometry"/> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> | ||
``` | ||
|
||
### drawio file: | ||
|
||
Download generated ``ecr.drawio``: | ||
|
||
[Download](output/drawio/ecr.drawio){: .btn .btn-purple } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<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:ecr:arn:i-1234567890abcdef0" value="<b>Name</b>: Registry for images<BR><b>ARN</b>: arn:i-1234567890abcdef0<BR>-----------<BR><b>images</b>: 23<BR><b>ImageId</b>: ami-0abcdef1234567890<BR><b>multiarch</b>: 13" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.ecr;fillColor=#F58534;gradientColor=none;" parent="1" vertex="1"> | ||
<mxGeometry width="69" height="72" as="geometry"/> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
layout: default | ||
title: Git Repository | ||
parent: ONPREM Components | ||
nav_order: 3 | ||
date: 2024-01-15 | ||
--- | ||
|
||
# Git Repository | ||
{: .d-inline-block .no_toc } | ||
|
||
New (v0.3.22) | ||
{: .label .label-green } | ||
|
||
## Table of contents | ||
{: .no_toc .text-delta } | ||
|
||
1. TOC | ||
{:toc} | ||
|
||
--- | ||
|
||
|
||
## Node Type: ``git_repository`` | ||
|
||
## Rendering: | ||
|
||
![lambda](output/jpg/git_repository.jpg) | ||
|
||
## Code Snippet: | ||
|
||
```python | ||
{% root_include_snippet ../tests/onprem/test_git_repository.py %} | ||
``` | ||
|
||
## drawio git_repository vertex: | ||
|
||
```xml | ||
<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: | ||
```html | ||
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: | ||
```xml | ||
<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``: | ||
|
||
[Download](output/drawio/git_repository.drawio){: .btn .btn-purple } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
layout: default | ||
title: Github code | ||
parent: ONPREM Components | ||
nav_order: 3 | ||
date: 2024-01-15 | ||
--- | ||
|
||
# Github code | ||
{: .d-inline-block .no_toc } | ||
|
||
New (v0.3.22) | ||
{: .label .label-green } | ||
|
||
## Table of contents | ||
{: .no_toc .text-delta } | ||
|
||
1. TOC | ||
{:toc} | ||
|
||
--- | ||
|
||
|
||
## Node Type: ``github_code`` | ||
|
||
## Rendering: | ||
|
||
![lambda](output/jpg/github_code.jpg) | ||
|
||
## Code Snippet: | ||
|
||
```python | ||
{% root_include_snippet ../tests/onprem/test_github_code.py %} | ||
``` | ||
|
||
## drawio github_code vertex: | ||
|
||
```xml | ||
<mxCell id="vertex:github_code: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: | ||
```html | ||
style="verticalLabelPosition=bottom;html=1;verticalAlign=top;align=left;strokeColor=none;fillColor=#00BEF2;shape=mxgraph.azure.github_code;pointerEvents=1;" | ||
``` | ||
|
||
| attribute | value | | ||
|:----------|:------| | ||
|align| left | | ||
|fillColor| #00BEF2 | | ||
|html| 1 | | ||
|pointerEvents| 1 | | ||
|shape| mxgraph.azure.github_code | | ||
|strokeColor| none | | ||
|verticalAlign| top | | ||
|verticalLabelPosition| bottom | | ||
|
||
### Vertex size: | ||
|
||
| attribute | value | | ||
|:---------|:-----------| | ||
| width | 50 | | ||
| height |50| | ||
|
||
### Full XML dump: | ||
```xml | ||
<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:github_code:arn:aws:code:eu-west-1:123456789012:repo/123" value="<b>Name</b>: github_code<BR><b>ID</b>: arn:aws:code:eu-west-1:123456789012:repo/123<BR>-----------<BR><b>name</b>: my-code<BR><b>codeDigest</b>: sha256:5562sfsf60a6d1aaed5c2bb227d3d4ec14c755bdb446349b" style="verticalLabelPosition=bottom;html=1;verticalAlign=top;align=left;strokeColor=none;fillColor=#00BEF2;shape=mxgraph.azure.github_code;pointerEvents=1;" parent="1" vertex="1"> | ||
<mxGeometry width="50" height="50" as="geometry"/> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> | ||
``` | ||
|
||
### drawio file: | ||
|
||
Download generated ``github_code.drawio``: | ||
|
||
[Download](output/drawio/github_code.drawio){: .btn .btn-purple } |
13 changes: 13 additions & 0 deletions
13
docs/docs/onprem-components/output/drawio/git_repository.drawio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<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> |
13 changes: 13 additions & 0 deletions
13
docs/docs/onprem-components/output/drawio/github_code.drawio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<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:github_code:arn:aws:code:eu-west-1:123456789012:repo/123" value="<b>Name</b>: github_code<BR><b>ID</b>: arn:aws:code:eu-west-1:123456789012:repo/123<BR>-----------<BR><b>name</b>: my-code<BR><b>codeDigest</b>: sha256:5562sfsf60a6d1aaed5c2bb227d3d4ec14c755bdb446349b" style="verticalLabelPosition=bottom;html=1;verticalAlign=top;align=left;strokeColor=none;fillColor=#00BEF2;shape=mxgraph.azure.github_code;pointerEvents=1;" parent="1" vertex="1"> | ||
<mxGeometry width="50" height="50" as="geometry"/> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from multicloud_diagrams import MultiCloudDiagrams | ||
from utils.templating import TestRendering | ||
|
||
|
||
class TestAWSVertexInIsolation(TestRendering): | ||
|
||
def test_ecr(self): | ||
# docs | ||
self.node_type = 'ecr' | ||
|
||
# given | ||
mcd = MultiCloudDiagrams() | ||
|
||
# when | ||
ecr_arn = 'arn:i-1234567890abcdef0' | ||
ecr_name = 'Registry for images' | ||
metadata = { | ||
"images": 23, | ||
"ImageId": "ami-0abcdef1234567890", | ||
"multiarch": 13, | ||
} | ||
mcd.add_vertex(node_id=ecr_arn, node_name=ecr_name, node_type='ecr', metadata=metadata) | ||
|
||
# then | ||
expected = {'id': 'vertex:ecr:arn:i-1234567890abcdef0', | ||
'parent': '1', | ||
'style': 'outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.ecr;fillColor=#F58534;gradientColor=none;', | ||
'value': '<b>Name</b>: Registry for images<BR><b>ARN</b>: ' | ||
'arn:i-1234567890abcdef0<BR>-----------<BR><b>images</b>: ' | ||
'23<BR><b>ImageId</b>: ami-0abcdef1234567890<BR><b>multiarch</b>: 13', | ||
'vertex': '1'} | ||
self.verify_resource(expected, mcd.mx_file, 'ECR', self.node_type) | ||
|
||
# docs | ||
self.mcd = mcd |
Oops, something went wrong.