Skip to content

Commit

Permalink
feat: add aws backup service
Browse files Browse the repository at this point in the history
  • Loading branch information
tsypuk committed May 8, 2024
1 parent b2ef4de commit 9c9d4e5
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
7 changes: 7 additions & 0 deletions multicloud_diagrams/providers/aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,5 +235,12 @@
"height": "78",
"version": "0.3.36",
"desc": "Amazon Elastic Kubernetes Service"
},
"backup": {
"style": "sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=#60A337;gradientDirection=north;fillColor=#277116;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.backup;",
"width": "78",
"height": "78",
"version": "0.3.36",
"desc": "AWS Backup"
}
}
45 changes: 45 additions & 0 deletions tests/aws/test_backup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from multicloud_diagrams import MultiCloudDiagrams
from utils.templating import TestRendering


class TestAWSVertexInIsolation(TestRendering):

def test_backup(self):
# docs
self.node_type = 'backup'

# given
mcd = MultiCloudDiagrams()

# when
backup_arn = 'arn:aws:backup:us-west-1:123456789012:service/backup'
backup_name = 'Full Dynamo&RDS backup'
metadata = {
"serviceName": "backup",
"Entities": "Dynamo,RDS",
"status": "ACTIVE",
"desiredCount": 1,
"schedule": "none",
"pendingCount": 0,
"platformVersion": "LATEST",
"platformFamily": "Linux",
"deployment": "arn:aws:backup:eu-west-1:123456789012:deployment/backup:15",
}
mcd.add_vertex(node_id=backup_arn, node_name=backup_name, node_type='backup', metadata=metadata)

# then
expected = {'id': 'vertex:backup:arn:aws:backup:us-west-1:123456789012:service/backup',
'parent': '1',
'style': 'sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=#60A337;gradientDirection=north;fillColor=#277116;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.backup;',
'value': '<b>Name</b>: Full Dynamo&RDS backup<BR><b>ARN</b>: '
'arn:aws:backup:us-west-1:123456789012:service/backup<BR>-----------<BR><b>serviceName</b>: '
'backup<BR><b>Entities</b>: Dynamo,RDS<BR><b>status</b>: '
'ACTIVE<BR><b>desiredCount</b>: 1<BR><b>schedule</b>: '
'none<BR><b>pendingCount</b>: 0<BR><b>platformVersion</b>: '
'LATEST<BR><b>platformFamily</b>: Linux<BR><b>deployment</b>: '
'arn:aws:backup:eu-west-1:123456789012:deployment/backup:15',
'vertex': '1'}
self.verify_resource(expected, mcd.mx_file, 'eks', self.node_type)

# docs
self.mcd = mcd

0 comments on commit 9c9d4e5

Please sign in to comment.