Skip to content

Commit a0d7950

Browse files
committed
Correct identations in .TOSCA generation+inputs and stereotype names
1 parent 1511f37 commit a0d7950

File tree

5 files changed

+150
-74
lines changed

5 files changed

+150
-74
lines changed

ToscaDesigner/Generated TOSCA files/MyrtusSmartTrafficManagementTopologyTemplate.tosca

Lines changed: 144 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,148 @@ tosca_definitions_version: tosca_simple_yaml_1_3
33

44

55
topology_template:
6-
7-
node_templates:
8-
Myrtus_Workstation_1:
9-
type: example.eu.myrtus.nodetypes.Myrtus-Workstation
10-
11-
12-
13-
14-
MyrtusFaceDetectionService_0:
15-
type: example.eu.myrtus.nodetypes.MyrtusFaceDetectionService
16-
17-
properties:
18-
dockerImage: "thebigpotatoe/face-recognition-docker"
19-
requirements:
20-
- host:
21-
node: Myrtus_Workstation_1
22-
relationship: con_HostedOn_0
23-
capability: host
24-
25-
26-
Myrtus_Proxy_0:
27-
type: example.eu.myrtus.nodetypes.MyrtusProxy
28-
29-
properties:
30-
dockerImage: "nginx:alpine"
31-
port: "443"
32-
requirements:
33-
- egress1:
34-
node: MyrtusCameraFeed_0
35-
relationship: con_ConnectsTo_0
36-
capability: CameraFeed.WebService
37-
38-
- egress2:
39-
node: MyrtusFaceDetectionService_0
40-
relationship: con_ConnectsTo_1
41-
capability: FaceDetectionService
42-
43-
- host:
44-
node: Myrtus_Workstation_1
45-
relationship: con_HostedOn_2
46-
capability: host
47-
48-
artifacts:
49-
MyrtusCameraFeed_0:
50-
type: example.eu.myrtus.nodetypes.MyrtusCameraFeed
51-
52-
properties:
53-
dockerImage: "ci.hesi.energy:5000/myrtus/examples/myrtusface/camera_feed:web"
54-
requirements:
55-
- host:
56-
node: Myrtus_Workstation_1
57-
relationship: con_HostedOn_1
58-
capability: host
59-
60-
61-
6+
inputs:
7+
edge_high_cpu_threshold
8+
type: float
9+
default: '0.7'
10+
fog_high_cpu_threshold
11+
type: integer
12+
default: '0.6'
13+
high_traffic_threshold_15min
14+
type: integer
15+
default: '125'
16+
low_traffic_threshold_15min
17+
type: integer
18+
default: '25'
19+
groups:
20+
compute_nodes:
21+
node_templates:
22+
cloud_instance_1:
23+
type: .CloudInstance
24+
properties:
25+
memory: "128 GB DDR4"
26+
storageCapacity: "4000 GB SSD"
27+
processingCapabilities: "Intel Xeon Platinum 8358, 32 cores @ 2.60 GHz"
28+
maxNetworkBandwidth: "10 Gbps"
29+
highCpuThreshold: "0.7"
30+
fog_node_1:
31+
type: .FogNode
32+
properties:
33+
processingCapabilities: "Intel Xeon E-2224, 4 cores @ 3.40 GHz"
34+
memory: "16 GB DDR4"
35+
maxNetworkBandwidth: "1 Gbps"
36+
storageCapacity: "500 GB SSD"
37+
highCpuThreshold: "0.8"
38+
basic_edge_camera_1:
39+
type: .EdgeCamera
40+
properties:
41+
processingCapability: "ARM Cortex-A73, Quad-core 1.4 GHz"
42+
memory: "2 GB LPDDR4"
43+
maxNetworkBandwidth: "100 Mbps"
44+
cameraSensorSpec: "1/2.8-inch CMOS, 12 MP, 4K@30fps"
45+
location: "Intersection of Main St. and 1st Ave."
46+
maxPowerConsumptionThreshold: "11.5W"
47+
minPowerConsumptionThreshold: "3.5W"
48+
baselineAveragePowerConsumption: "4.5W"
49+
highCpuThreshold: "0.7"
50+
currentCpuUtilization: ""
51+
currentFrameRate: ""
52+
currentPowerConsumption: ""
53+
basic_edge_camera_2:
54+
type: .EdgeCamera
55+
properties:
56+
processingCapability: "ARM Cortex-A73, Quad-core 1.4 GHz"
57+
memory: "2 GB LPDDR4"
58+
maxNetworkBandwidth: "100 Mbps"
59+
cameraSensorSpec: "1/2.8-inch CMOS, 12 MP, 4K@30fps"
60+
location: "Intersection of Main St. and 1st Ave."
61+
baselineAveragePowerConsumption: "4.5W"
62+
minPowerConsumptionThreshold: "3.5W"
63+
maxPowerConsumptionThreshold: "11.5W"
64+
highCpuThreshold: "0.7"
65+
currentPowerConsumption: ""
66+
currentCpuUtilization: ""
67+
currentFrameRate: ""
68+
advanced_edge_camera_1:
69+
type: .EdgeCamera
70+
properties:
71+
processingCapability: "NVIDIA Jetson TX2"
72+
memory: "4 GB LPDDR4"
73+
maxNetworkBandwidth: "1 Gbps"
74+
cameraSensorSpec: "1/1.8-inch CMOS, 20 MP, 4K@60fps"
75+
location: "Intersection of Main St. and 1st Ave."
76+
maxPowerConsumptionThreshold: "20W"
77+
minPowerConsumptionThreshold: "5W"
78+
baselineAveragePowerConsumption: "8W"
79+
highCpuThreshold: "0.8"
80+
currentCpuUtilization: ""
81+
currentFrameRate: ""
82+
currentPowerConsumption: ""
83+
advanced_edge_camera_2:
84+
type: .EdgeCamera
85+
properties:
86+
processingCapability: "NVIDIA Jetson TX2"
87+
minPowerConsumptionThreshold: "5W"
88+
maxNetworkBandwidth: "1 Gbps"
89+
location: "Intersection of Main St. and 1st Ave."
90+
memory: "4 GB LPDDR4"
91+
cameraSensorSpec: "1/1.8-inch CMOS, 20 MP, 4K@60fps"
92+
maxPowerConsumptionThreshold: "20W"
93+
baselineAveragePowerConsumption: "8W"
94+
highCpuThreshold: "0.8"
95+
currentCpuUtilization: ""
96+
currentFrameRate: ""
97+
currentPowerConsumption: ""
98+
software_component_nodes:
99+
node_templates:
100+
object_detection_1:
101+
type: .object_detection
102+
properties:
103+
dockerImage: "dockerHub/objectDetection"
104+
requirements:
105+
- host:
106+
node: basic_edge_camera_1
107+
relationship:
108+
capability:
109+
properties:
110+
processingRequirement: "0.4" memoryRequirement: "250MB" object_tracking_1:
111+
type: .object_tracking
112+
properties:
113+
dockerImage: "dockerHub/objectTracking"
114+
requirements:
115+
- host:
116+
node: basic_edge_camera_1
117+
relationship:
118+
capability:
119+
properties:
120+
processingRequirement: "0.5" memoryRequirement: "300MB" image_processing_1:
121+
type: .image_processing
122+
properties:
123+
dockerImage: "dockerHub/imageProcessing"
124+
requirements:
125+
- host:
126+
node: fog_node_1
127+
relationship:
128+
capability:
129+
properties:
130+
processingRequirement: "0.4" memoryRequirement: "250MB" traffic_data_analysis_1:
131+
type: .traffic_data_analysis
132+
properties:
133+
dockerImage: "dockerHub/trafficDataAnalysis"
134+
requirements:
135+
- host:
136+
node: cloud_instance_1
137+
relationship:
138+
capability:
139+
properties:
140+
memoryRequirement: "0.7" processingRequirement: "700MB" digital_signature_verification_1:
141+
type: .security_countermeasure
142+
encryption_decryption_1:
143+
type: .security_countermeasure
144+
key_exchange_mechanism_1:
145+
type: .security_countermeasure
146+
ai_malware_mechanism_1:
147+
type: .security_countermeasure
148+
side_channel_secure_library_1:
149+
type: .security_countermeasure
62150
relationship_templates:
63-
con_HostedOn_2:
64-
type: hostedOn
65-
con_HostedOn_1:
66-
type: hostedOn
67-
con_HostedOn_0:
68-
type: hostedOn
69-
con_ConnectsTo_1:
70-
type: connectsTo
71-
con_ConnectsTo_0:
72-
type: connectsTo

ToscaDesigner/src/main/conf/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@
663663
<Icon path=""/>
664664
<Image path=""/>
665665
</Stereotype>
666-
<Stereotype name="TGroup" metaclass="Standard.Package" owner-stereotype="" is-hidden="false" label="%stereotype.Tgroup.label" uid="572d5cb4-54c7-45d0-a9c8-3dc3677f9ef3" is-abstract="false">
666+
<Stereotype name="TGroup" metaclass="Standard.Class" owner-stereotype="" is-hidden="false" label="%stereotype.Tgroup.label" uid="572d5cb4-54c7-45d0-a9c8-3dc3677f9ef3" is-abstract="false">
667667
<Icon path="res/icon/gui/Tgroup48.ICON.png"/>
668668
<Image path="res/icon/gui/Tgroup48.png"/>
669669
</Stereotype>
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{{name}}:
2-
{{#unless (noStereotypeApplications this "TNodeTemplate")}}node_templates:{{/unless}}
3-
{{#ownedElement}}{{#extension}}{{#eq name "TNodeTemplate"}}
4-
{{> (lookup this.name) ../this}}
5-
{{/eq}}{{/extension}}{{/ownedElement}}
2+
{{#unless (noStereotypeApplications this "TNodeTemplate")}}node_templates:{{/unless}}
3+
{{#ownedElement}}{{#extension}}{{#eq name "TNodeTemplate"}}{{> (lookup this.name) ../this}}{{/eq}}{{/extension}}{{/ownedElement}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{{name}}
22
type: {{type.name}}
3-
default: '{{value}}'
3+
default: '{{value}}'

ToscaDesigner/src/main/resources/fr/softeam/templates/TTopologyTemplate.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
{{/eq}}{{/extension}}{{/each}}
55
{{imports this}}
66
topology_template:
7-
{{#unless (noStereotypeApplications this "InputParameterType")}}
7+
{{#unless (noStereotypeApplications this "InputParametersType")}}
88
inputs:
9-
{{#ownedElement}}{{#extension}}{{#eq name "InputParameterType"}}{{#ownedAttribute}}{{#extension}}{{#eq name "TParameter"}}
9+
{{#ownedElement}}{{#extension}}{{#eq name "InputParametersType"}}{{#ownedAttribute}}{{#extension}}{{#eq name "TParameter"}}
1010
{{> (lookup this.name) ../this}}
1111
{{/eq}}{{/extension}}{{/ownedAttribute}}{{/eq}}{{/extension}}{{/ownedElement}}
1212
{{/unless}}{{#unless (noStereotypeApplications this "TNodeTemplate")}}

0 commit comments

Comments
 (0)