Fix sonar issues in dcaegen2-analytics-tca
[dcaegen2/analytics/tca.git] / dpo / tcadocker_spec.json
1 {
2   "self": {
3     "name": "tca-docker",
4     "version": "1.0.0",
5     "description": "docker cdap tca application",
6     "component_type": "docker"
7   },
8   "streams": {
9     "subscribes": [
10       {
11         "config_key": "tca_handle_in",
12         "format": "VES_specification",
13         "version": "5.28.4",
14         "type": "message router"
15       }
16     ],
17     "publishes": [
18       {
19         "config_key": "tca_handle_out",
20         "format": "TCA Alert Definition",
21         "version": "1.0.0",
22         "type": "message router"
23       }
24     ]
25   },
26   "services": {
27     "calls": [],
28     "provides": []
29   },
30         "artifacts": [
31                 {
32                         "type": "docker image",
33                         "uri": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0"
34                 }
35         ],
36         "auxilary": {
37                 "healthcheck": {
38                         "type": "https",
39                         "interval": "15s",
40                         "timeout": "1s",
41                         "endpoint": "/"
42                 },
43                 "ports": [
44                         "11011:11011"
45                 ]
46         },
47   "parameters": {
48     "app_config": [
49         {
50                                         "name": "appName",
51                                         "description": "CDAP Application Name for TCA App",
52                                         "value": "dcae-tca",
53                                         "sourced_at_deployment": false,
54                                         "policy_editable": false,
55                                         "designer_editable": false
56                                 },
57                                 {
58                                         "name": "appDescription",
59                                         "description": "CDAP Application Description for TCA App",
60                                         "value": "DCAE Analytics Threshold Crossing Alert Application",
61                                         "sourced_at_deployment": false,
62                                         "policy_editable": false,
63                                         "designer_editable": false
64                                 },
65                                 {
66                                         "name": "tcaSubscriberOutputStreamName",
67                                         "description": "Name of Stream where TCA DMaaP Subscriber pushes incoming messages to TCA App for processing",
68                                         "value": "TCASubscriberOutputStream",
69                                         "sourced_at_deployment": false,
70                                         "policy_editable": false,
71                                         "designer_editable": false
72                                 },
73                                 {
74                                         "name": "thresholdCalculatorFlowletInstances",
75                                         "description": "Number of instances for Threshold Calculator",
76                                         "value": 2,
77                                         "sourced_at_deployment": false,
78                                         "policy_editable": false,
79                                         "designer_editable": false
80                                 },
81                                 {
82                                         "name": "tcaVESMessageStatusTableName",
83                                         "description": "TCA Message Status Table Name where status of each TCA message is stored",
84                                         "value": "TCAVESMessageStatusTable",
85                                         "sourced_at_deployment": false,
86                                         "policy_editable": false,
87                                         "designer_editable": false
88                                 },
89                                 {
90                                         "name": "tcaVESMessageStatusTableTTLSeconds",
91                                         "description": "Time to Live for entries in Message Status Table",
92                                         "value": 86400,
93                                         "sourced_at_deployment": false,
94                                         "policy_editable": false,
95                                         "designer_editable": false
96                                 },
97                                 {
98                                         "name": "tcaVESAlertsTableName",
99                                         "description": "Table where TCA generated alerts are temporarily stored before published to DMaaP MR topic",
100                                         "value": "TCAVESAlertsTable",
101                                         "sourced_at_deployment": false,
102                                         "policy_editable": false,
103                                         "designer_editable": false
104                                 },
105                                 {
106                                         "name": "tcaVESAlertsTableTTLSeconds",
107                                         "description": "Time to Live for entries in Alerts Table",
108                                         "value": 1728000,
109                                         "sourced_at_deployment": false,
110                                         "policy_editable": false,
111                                         "designer_editable": false
112                                 },
113                                 {
114                                         "name": "tcaAlertsAbatementTableName",
115                                         "description": "Table where information to determine sending of Abatement Alerts is stored",
116                                         "value": "TCAAlertsAbatementTable",
117                                         "sourced_at_deployment": false,
118                                         "policy_editable": false,
119                                         "designer_editable": false
120                                 },
121                                 {
122                                         "name": "tcaAlertsAbatementTableTTLSeconds",
123                                         "description": "Time to Live for entries in  Alerts Abatement Table",
124                                         "value": 1728000,
125                                         "sourced_at_deployment": false,
126                                         "policy_editable": false,
127                                         "designer_editable": false
128                                 }
129     ],
130     "app_preferences": [
131         {
132                                         "name": "subscriberHostName",
133                                         "description": "",
134                                         "value": "HOSTNAME",
135                                         "sourced_at_deployment": false,
136                                         "policy_editable": false,
137                                         "designer_editable": false
138                                 },
139                                 {
140                                         "name": "subscriberHostPort",
141                                         "description": "",
142                                         "value": 1234,
143                                         "sourced_at_deployment": false,
144                                         "policy_editable": false,
145                                         "designer_editable": false
146                                 },
147                                 {
148                                         "name": "subscriberTopicName",
149                                         "description": "",
150                                         "value": "com.att.dcae.dmaap.mtnje2.DcaeTestVESSub",
151                                         "sourced_at_deployment": false,
152                                         "policy_editable": false,
153                                         "designer_editable": false
154                                 },
155                                 {
156                                         "name": "subscriberProtocol",
157                                         "description": "",
158                                         "value": "https",
159                                         "sourced_at_deployment": false,
160                                         "policy_editable": false,
161                                         "designer_editable": false
162                                 },
163                                 {
164                                         "name": "subscriberUserName",
165                                         "description": "",
166                                         "value": "USERNAME",
167                                         "sourced_at_deployment": false,
168                                         "policy_editable": false,
169                                         "designer_editable": false
170                                 },
171                                 {
172                                         "name": "subscriberUserPassword",
173                                         "description": "",
174                                         "value": "PASSWORD",
175                                         "sourced_at_deployment": false,
176                                         "policy_editable": false,
177                                         "designer_editable": false
178                                 },
179                                 {
180                                         "name": "subscriberContentType",
181                                         "description": "Subscriber Content Type",
182                                         "value": "application/json",
183                                         "sourced_at_deployment": false,
184                                         "policy_editable": false,
185                                         "designer_editable": false
186                                 },
187                                 {
188                                         "name": "subscriberConsumerId",
189                                         "description": "Subscriber Consumer Id",
190                                         "value": "c12",
191                                         "sourced_at_deployment": false,
192                                         "policy_editable": false,
193                                         "designer_editable": false
194                                 },
195                                 {
196                                         "name": "subscriberConsumerGroup",
197                                         "description": "Subscriber Group Id",
198                                         "value": "OpenDCAE-c12",
199                                         "sourced_at_deployment": false,
200                                         "policy_editable": false,
201                                         "designer_editable": false
202                                 },
203                                 {
204                                         "name": "subscriberTimeoutMS",
205                                         "description": "Subscriber timeout in milliseconds",
206                                         "value": -1,
207                                         "sourced_at_deployment": false,
208                                         "policy_editable": false,
209                                         "designer_editable": false
210                                 },
211                                 {
212                                         "name": "subscriberMessageLimit",
213                                         "description": "Subscriber max message fetch limit",
214                                         "value": -1,
215                                         "sourced_at_deployment": false,
216                                         "policy_editable": false,
217                                         "designer_editable": false
218                                 },
219                                 {
220                                         "name": "subscriberPollingInterval",
221                                         "description": "Subscriber Polling Interval in milliseconds",
222                                         "value": 30000,
223                                         "sourced_at_deployment": false,
224                                         "policy_editable": false,
225                                         "designer_editable": false
226                                 },
227                                 {
228                                         "name": "publisherHostName",
229                                         "description": "",
230                                         "value": "HOSTNAME",
231                                         "sourced_at_deployment": false,
232                                         "policy_editable": false,
233                                         "designer_editable": false
234                                 },
235                                 {
236                                         "name": "publisherHostPort",
237                                         "description": "",
238                                         "value": 1234,
239                                         "sourced_at_deployment": false,
240                                         "policy_editable": false,
241                                         "designer_editable": false
242                                 },
243                                 {
244                                         "name": "publisherTopicName",
245                                         "description": "",
246                                         "value": "com.att.dcae.dmaap.mtnje2.DcaeTestVESPub",
247                                         "sourced_at_deployment": false,
248                                         "policy_editable": false,
249                                         "designer_editable": false
250                                 },
251                                 {
252                                         "name": "publisherProtocol",
253                                         "description": "",
254                                         "value": "https",
255                                         "sourced_at_deployment": false,
256                                         "policy_editable": false,
257                                         "designer_editable": false
258                                 },
259                                 {
260                                         "name": "publisherUserName",
261                                         "description": "",
262                                         "value": "USERNAME",
263                                         "sourced_at_deployment": false,
264                                         "policy_editable": false,
265                                         "designer_editable": false
266                                 },
267                                 {
268                                         "name": "publisherUserPassword",
269                                         "description": "",
270                                         "value": "PASSWORD",
271                                         "sourced_at_deployment": false,
272                                         "policy_editable": false,
273                                         "designer_editable": false
274                                 },
275                                 {
276                                         "name": "publisherContentType",
277                                         "description": "Publisher Content Type",
278                                         "value": "application/json",
279                                         "sourced_at_deployment": false,
280                                         "policy_editable": false,
281                                         "designer_editable": false
282                                 },
283                                 {
284                                         "name": "publisherMaxBatchSize",
285                                         "description": "Publisher max batch size",
286                                         "value": 1,
287                                         "sourced_at_deployment": false,
288                                         "policy_editable": false,
289                                         "designer_editable": false
290                                 },
291                                 {
292                                         "name": "publisherMaxRecoveryQueueSize",
293                                         "description": "Publisher Max Recovery Queue Size",
294                                         "value": 100000,
295                                         "sourced_at_deployment": false,
296                                         "policy_editable": false,
297                                         "designer_editable": false
298                                 },
299                                 {
300                                         "name": "publisherPollingInterval",
301                                         "description": "Publisher Polling Interval in milliseconds",
302                                         "value": 20000,
303                                         "sourced_at_deployment": false,
304                                         "policy_editable": false,
305                                         "designer_editable": false
306                                 },
307                                 {
308                                         "name": "enableAlertCEFFormat",
309                                         "description": "Enable output alert to be in CEF Format",
310                                         "value": "false",
311                                         "sourced_at_deployment": false,
312                                         "policy_editable": false,
313                                         "designer_editable": false
314                                 },
315                                 {
316                                         "name": "enableAAIEnrichment",
317                                         "description": "Enable A&AI Enrichment of generated TCA Alerts",
318                                         "value": "true",
319                                         "sourced_at_deployment": false,
320                                         "policy_editable": false,
321                                         "designer_editable": false
322                                 },
323                                 {
324                                         "name": "aaiEnrichmentHost",
325                                         "description": "A&AI Enrichment API Host name",
326                                         "value": "123.123.123.123",
327                                         "sourced_at_deployment": false,
328                                         "policy_editable": false,
329                                         "designer_editable": false
330                                 },
331                                 {
332                                         "name": "aaiEnrichmentPortNumber",
333                                         "description": "A&AI Enrichment API Host port number",
334                                         "value": 8443,
335                                         "sourced_at_deployment": false,
336                                         "policy_editable": false,
337                                         "designer_editable": false
338                                 },
339                                 {
340                                         "name": "aaiEnrichmentProtocol",
341                                         "description": "A&AI Enrichment API protocol",
342                                         "value": "https",
343                                         "sourced_at_deployment": false,
344                                         "policy_editable": false,
345                                         "designer_editable": false
346                                 },
347                                 {
348                                         "name": "aaiEnrichmentUserName",
349                                         "description": "A&AI Enrichment API username",
350                                         "value": "USERNAME",
351                                         "sourced_at_deployment": false,
352                                         "policy_editable": false,
353                                         "designer_editable": false
354                                 },
355                                 {
356                                         "name": "aaiEnrichmentUserPassword",
357                                         "description": "A&AI Enrichment API password",
358                                         "value": "PASSWORD",
359                                         "sourced_at_deployment": false,
360                                         "policy_editable": false,
361                                         "designer_editable": false
362                                 },
363                                 {
364                                         "name": "aaiEnrichmentIgnoreSSLCertificateErrors",
365                                         "description": "A&AI Ignore SSL Certification Errors",
366                                         "value": "true",
367                                         "sourced_at_deployment": false,
368                                         "policy_editable": false,
369                                         "designer_editable": false
370                                 },
371                                 {
372                                         "name": "aaiVNFEnrichmentAPIPath",
373                                         "description": "A&AI VNF Enrichment API Path",
374                                         "value": "/aai/v11/network/generic-vnfs/generic-vnf",
375                                         "sourced_at_deployment": false,
376                                         "policy_editable": false,
377                                         "designer_editable": false
378                                 },
379                                 {
380                                         "name": "aaiVMEnrichmentAPIPath",
381                                         "description": "A&AI VM Enrichment API Path",
382                                         "value": "/aai/v11/search/nodes-query",
383                                         "sourced_at_deployment": false,
384                                         "policy_editable": false,
385                                         "designer_editable": false
386                                 },
387                                 {
388                                         "name": "aaiEnrichmentProxyURL",
389                                         "description": "A&AI Enrichment API Proxy URL",
390                                         "value": "URL",
391                                         "sourced_at_deployment": false,
392                                         "policy_editable": false,
393                                         "designer_editable": false
394                                 },
395                                 {
396                                         "name": "tca_policy",
397                                         "description": "TCA Policy JSON",
398                                         "value": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}",
399                                         "sourced_at_deployment": false,
400                                         "designer_editable": false,
401                                         "policy_editable": true,
402                                         "policy_schema": [
403                                                 {
404                                                         "name": "domain",
405                                                         "description": "Domain name to which TCA needs to be applied",
406                                                         "type": "string",
407                                                         "value": "measurementsForVfScaling",
408                                                         "constraints": [
409                                                                 {
410                                                                         "equal": "measurementsForVfScaling"
411                                                                 }
412                                                         ]
413                                                 },
414                                                 {
415                                                         "name": "metricsPerEventName",
416                                                         "description": "Contains eventName and threshold details that need to be applied to given eventName",
417                                                         "type": "list",
418                                                         "entry_schema": [
419                                                                 {
420                                                                         "name": "eventName",
421                                                                         "description": "Event name to which thresholds need to be applied",
422                                                                         "type": "string",
423                                                                         "value": ""
424                                                                 },
425                                                                 {
426                                                                         "name": "controlLoopSchemaType",
427                                                                         "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
428                                                                         "type": "string",
429                                                                         "value": "",
430                                                                         "constraints": [
431                                                                                 {
432                                                                                         "valid_values": [
433                                                                                                 "VM",
434                                                                                                 "VNF"
435                                                                                         ]
436                                                                                 }
437                                                                         ]
438                                                                 },
439                                                                 {
440                                                                         "name": "policyScope",
441                                                                         "description": "TCA Policy Scope",
442                                                                         "type": "string",
443                                                                         "value": ""
444                                                                 },
445                                                                 {
446                                                                         "name": "policyName",
447                                                                         "description": "TCA Policy Scope Name",
448                                                                         "type": "string",
449                                                                         "value": ""
450                                                                 },
451                                                                 {
452                                                                         "name": "policyVersion",
453                                                                         "description": "TCA Policy Scope Version",
454                                                                         "type": "string",
455                                                                         "value": ""
456                                                                 },
457                                                                 {
458                                                                         "name": "thresholds",
459                                                                         "description": "Thresholds associated with eventName",
460                                                                         "type": "list",
461                                                                         "entry_schema": [
462                                                                                 {
463                                                                                         "name": "closedLoopControlName",
464                                                                                         "description": "Closed Loop Control Name associated with the threshold",
465                                                                                         "type": "string",
466                                                                                         "value": ""
467                                                                                 },
468                                                                                 {
469                                                                                         "name": "version",
470                                                                                         "description": "Version number associated with the threshold",
471                                                                                         "type": "string",
472                                                                                         "value": ""
473                                                                                 },
474                                                                                 {
475                                                                                         "name": "fieldPath",
476                                                                                         "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
477                                                                                         "type": "string",
478                                                                                         "value": ""
479                                                                                 },
480                                                                                 {
481                                                                                         "name": "thresholdValue",
482                                                                                         "description": "Threshold value for the field Path inside CEF message",
483                                                                                         "type": "number",
484                                                                                         "value": ""
485                                                                                 },
486                                                                                 {
487                                                                                         "name": "direction",
488                                                                                         "description": "Direction of the threshold",
489                                                                                         "type": "string",
490                                                                                         "value": "",
491                                                                                         "constraints": [
492                                                                                                 {
493                                                                                                         "valid_values": [
494                                                                                                                 "LESS",
495                                                                                                                 "LESS_OR_EQUAL",
496                                                                                                                 "GREATER",
497                                                                                                                 "GREATER_OR_EQUAL",
498                                                                                                                 "EQUAL"
499                                                                                                         ]
500                                                                                                 }
501                                                                                         ]
502                                                                                 },
503                                                                                 {
504                                                                                         "name": "closedLoopEventStatus",
505                                                                                         "description": "Closed Loop Event Status of the threshold",
506                                                                                         "type": "string",
507                                                                                         "value": "",
508                                                                                         "constraints": [
509                                                                                                 {
510                                                                                                         "valid_values": [
511                                                                                                                 "ONSET",
512                                                                                                                 "ABATED"
513                                                                                                         ]
514                                                                                                 }
515                                                                                         ]
516                                                                                 },
517                                                                                 {
518                                                                                         "name": "severity",
519                                                                                         "description": "Threshold Event Severity",
520                                                                                         "value": "",
521                                                                                         "type": "string",
522                                                                                         "constraints": [
523                                                                                                 {
524                                                                                                         "valid_values": [
525                                                                                                                 "CRITICAL",
526                                                                                                                 "MAJOR",
527                                                                                                                 "MINOR",
528                                                                                                                 "WARNING",
529                                                                                                                 "NORMAL"
530                                                                                                         ]
531                                                                                                 }
532                                                                                         ]
533                                                                                 }
534                                                                         ]
535                                                                 }
536                                                         ]
537                                                 }
538                                         ]
539                                 }
540                         ]
541                 }
542         
543 }