Skip to content

Commit

Permalink
feat: added aws datasync service
Browse files Browse the repository at this point in the history
  • Loading branch information
tsypuk committed May 11, 2024
1 parent c58d3f5 commit 523b2c1
Show file tree
Hide file tree
Showing 2 changed files with 51 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 @@ -249,5 +249,12 @@
"height": "78",
"version": "0.3.38",
"desc": "AWS AppFlow"
},
"datasync": {
"style": "sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=#4AB29A;gradientDirection=north;fillColor=#116D5B;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.datasync;",
"width": "78",
"height": "78",
"version": "0.3.39",
"desc": "AWS DataSync"
}
}
44 changes: 44 additions & 0 deletions tests/aws/test_datasync.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from multicloud_diagrams import MultiCloudDiagrams
from utils.templating import TestRendering


class TestAWSVertexInIsolation(TestRendering):

def test_datasync(self):
# docs
self.node_type = 'datasync'

# given
mcd = MultiCloudDiagrams()

# when
datasync_service_arn = 'arn:aws:datasync:us-west-1:123456789012:service/datasync/data'
datasync_service_name = 'Data Sync'
metadata = {
"serviceName": "datasync",
"clusterArn": "arn:aws:datasync:eu-west-1:123456789012:/datasync",
"serviceRegistries": "arn:aws:datasync:eu-west-1:123456789012:service/datasync",
"status": "ACTIVE",
"launchType": "Data Transfer",
"platformVersion": "LATEST",
"platformFamily": "Linux",
}
mcd.add_vertex(node_id=datasync_service_arn, node_name=datasync_service_name, node_type='datasync', metadata=metadata)

# then
expected = {'id': 'vertex:datasync:arn:aws:datasync:us-west-1:123456789012:service/datasync/data',
'parent': '1',
'style': 'sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=#4AB29A;gradientDirection=north;fillColor=#116D5B;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.datasync;',
'value': '<b>Name</b>: Data Sync<BR><b>ARN</b>: '
'arn:aws:datasync:us-west-1:123456789012:service/datasync/data<BR>-----------<BR><b>serviceName</b>: '
'datasync<BR><b>clusterArn</b>: '
'arn:aws:datasync:eu-west-1:123456789012:/datasync<BR><b>serviceRegistries</b>: '
'arn:aws:datasync:eu-west-1:123456789012:service/datasync<BR><b>status</b>: '
'ACTIVE<BR><b>launchType</b>: Data '
'Transfer<BR><b>platformVersion</b>: '
'LATEST<BR><b>platformFamily</b>: Linux',
'vertex': '1'}
self.verify_resource(expected, mcd.mx_file, 'datasync', self.node_type)

# docs
self.mcd = mcd

0 comments on commit 523b2c1

Please sign in to comment.