Create Service object
[clamp.git] / src / test / resources / tosca / loop.json
1 {
2   "name": "ControlLoopTest",
3   "dcaeDeploymentId": "123456789",
4   "dcaeDeploymentStatusUrl": "https://dcaetest.org",
5   "dcaeBlueprintId": "UUID-blueprint",
6   "operationalPolicySchema": {
7     "schema": {
8       "uniqueItems": "true",
9       "format": "tabs",
10       "type": "array",
11       "minItems": 1,
12       "maxItems": 1,
13       "title": "Operational policies",
14       "items": {
15         "type": "object",
16         "title": "Operational Policy Item",
17         "id": "operational_policy_item",
18         "headerTemplate": "{{self.name}}",
19         "required": [
20           "name",
21           "configurationsJson"
22         ],
23         "properties": {
24           "name": {
25             "type": "string",
26             "title": "Operational policy name",
27             "readOnly": "True"
28           },
29           "configurationsJson": {
30             "type": "object",
31             "title": "Configuration",
32             "required": [
33               "operational_policy",
34               "guard_policies"
35             ],
36             "properties": {
37               "operational_policy": {
38                 "type": "object",
39                 "title": "Related Parameters",
40                 "required": [
41                   "controlLoop",
42                   "policies"
43                 ],
44                 "properties": {
45                   "controlLoop": {
46                     "type": "object",
47                     "title": "Control Loop details",
48                     "required": [
49                       "timeout",
50                       "abatement",
51                       "trigger_policy",
52                       "controlLoopName"
53                     ],
54                     "properties": {
55                       "timeout": {
56                         "type": "string",
57                         "title": "Overall Time Limit",
58                         "default": "0",
59                         "format": "number"
60                       },
61                       "abatement": {
62                         "type": "string",
63                         "title": "Abatement",
64                         "enum": [
65                           "True",
66                           "False"
67                         ]
68                       },
69                       "trigger_policy": {
70                         "type": "string",
71                         "title": "Policy Decision Entry"
72                       },
73                       "controlLoopName": {
74                         "type": "string",
75                         "title": "Control loop name",
76                         "readOnly": "True"
77                       }
78                     }
79                   },
80                   "policies": {
81                     "uniqueItems": "true",
82                     "id": "policies_array",
83                     "type": "array",
84                     "title": "Policy Decision Tree",
85                     "format": "tabs-top",
86                     "items": {
87                       "title": "Policy Decision",
88                       "type": "object",
89                       "id": "policy_item",
90                       "headerTemplate": "{{self.id}} - {{self.recipe}}",
91                       "format": "categories",
92                       "basicCategoryTitle": "recipe",
93                       "required": [
94                         "id",
95                         "recipe",
96                         "retry",
97                         "timeout",
98                         "actor",
99                         "success",
100                         "failure",
101                         "failure_timeout",
102                         "failure_retries",
103                         "failure_exception",
104                         "failure_guard",
105                         "target"
106                       ],
107                       "properties": {
108                         "id": {
109                           "default": "Policy 1",
110                           "title": "Policy ID",
111                           "type": "string"
112                         },
113                         "recipe": {
114                           "title": "Recipe",
115                           "type": "string",
116                           "enum": [
117                             "Restart",
118                             "Rebuild",
119                             "Migrate",
120                             "Health-Check",
121                             "ModifyConfig",
122                             "VF Module Create",
123                             "VF Module Delete",
124                             "Reroute"
125                           ]
126                         },
127                         "retry": {
128                           "default": "0",
129                           "title": "Number of Retry",
130                           "type": "string",
131                           "format": "number"
132                         },
133                         "timeout": {
134                           "default": "0",
135                           "title": "Timeout",
136                           "type": "string",
137                           "format": "number"
138                         },
139                         "actor": {
140                           "title": "Actor",
141                           "type": "string",
142                           "enum": [
143                             "APPC",
144                             "SO",
145                             "VFC",
146                             "SDNC",
147                             "SDNR"
148                           ]
149                         },
150                         "payload": {
151                           "title": "Payload (YAML)",
152                           "type": "string",
153                           "format": "textarea"
154                         },
155                         "success": {
156                           "default": "final_success",
157                           "title": "When Success",
158                           "type": "string"
159                         },
160                         "failure": {
161                           "default": "final_failure",
162                           "title": "When Failure",
163                           "type": "string"
164                         },
165                         "failure_timeout": {
166                           "default": "final_failure_timeout",
167                           "title": "When Failure Timeout",
168                           "type": "string"
169                         },
170                         "failure_retries": {
171                           "default": "final_failure_retries",
172                           "title": "When Failure Retries",
173                           "type": "string"
174                         },
175                         "failure_exception": {
176                           "default": "final_failure_exception",
177                           "title": "When Failure Exception",
178                           "type": "string"
179                         },
180                         "failure_guard": {
181                           "default": "final_failure_guard",
182                           "title": "When Failure Guard",
183                           "type": "string"
184                         },
185                         "target": {
186                           "type": "object",
187                           "required": [
188                             "type",
189                             "resourceID"
190                           ],
191                           "anyOf": [
192                             {
193                               "title": "User Defined",
194                               "additionalProperties": "True",
195                               "properties": {
196                                 "type": {
197                                   "title": "Target type",
198                                   "type": "string",
199                                   "default": "",
200                                   "enum": [
201                                     "VNF",
202                                     "VFMODULE",
203                                     "VM"
204                                   ]
205                                 },
206                                 "resourceID": {
207                                   "title": "Target type",
208                                   "type": "string",
209                                   "default": ""
210                                 }
211                               }
212                             },
213                             {
214                               "title": "VNF-vLoadBalancerMS 0",
215                               "properties": {
216                                 "type": {
217                                   "title": "Type",
218                                   "type": "string",
219                                   "default": "VNF",
220                                   "readOnly": "True"
221                                 },
222                                 "resourceID": {
223                                   "title": "Resource ID",
224                                   "type": "string",
225                                   "default": "vLoadBalancerMS",
226                                   "readOnly": "True"
227                                 }
228                               }
229                             },
230                             {
231                               "title": "VFMODULE-Vloadbalancerms..vpkg..module-1",
232                               "properties": {
233                                 "type": {
234                                   "title": "Type",
235                                   "type": "string",
236                                   "default": "VFMODULE",
237                                   "readOnly": "True"
238                                 },
239                                 "resourceID": {
240                                   "title": "Resource ID",
241                                   "type": "string",
242                                   "default": "Vloadbalancerms..vpkg..module-1",
243                                   "readOnly": "True"
244                                 },
245                                 "modelInvariantId": {
246                                   "title": "Model Invariant Id (ModelInvariantUUID)",
247                                   "type": "string",
248                                   "default": "ca052563-eb92-4b5b-ad41-9111768ce043",
249                                   "readOnly": "True"
250                                 },
251                                 "modelVersionId": {
252                                   "title": "Model Version Id (ModelUUID)",
253                                   "type": "string",
254                                   "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
255                                   "readOnly": "True"
256                                 },
257                                 "modelName": {
258                                   "title": "Model Name",
259                                   "type": "string",
260                                   "default": "Vloadbalancerms..vpkg..module-1",
261                                   "readOnly": "True"
262                                 },
263                                 "modelVersion": {
264                                   "title": "Model Version",
265                                   "type": "string",
266                                   "default": "1",
267                                   "readOnly": "True"
268                                 },
269                                 "modelCustomizationId": {
270                                   "title": "Customization ID",
271                                   "type": "string",
272                                   "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
273                                   "readOnly": "True"
274                                 }
275                               }
276                             },
277                             {
278                               "title": "VFMODULE-Vloadbalancerms..vdns..module-3",
279                               "properties": {
280                                 "type": {
281                                   "title": "Type",
282                                   "type": "string",
283                                   "default": "VFMODULE",
284                                   "readOnly": "True"
285                                 },
286                                 "resourceID": {
287                                   "title": "Resource ID",
288                                   "type": "string",
289                                   "default": "Vloadbalancerms..vdns..module-3",
290                                   "readOnly": "True"
291                                 },
292                                 "modelInvariantId": {
293                                   "title": "Model Invariant Id (ModelInvariantUUID)",
294                                   "type": "string",
295                                   "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
296                                   "readOnly": "True"
297                                 },
298                                 "modelVersionId": {
299                                   "title": "Model Version Id (ModelUUID)",
300                                   "type": "string",
301                                   "default": "4fa73b49-8a6c-493e-816b-eb401567b720",
302                                   "readOnly": "True"
303                                 },
304                                 "modelName": {
305                                   "title": "Model Name",
306                                   "type": "string",
307                                   "default": "Vloadbalancerms..vdns..module-3",
308                                   "readOnly": "True"
309                                 },
310                                 "modelVersion": {
311                                   "title": "Model Version",
312                                   "type": "string",
313                                   "default": "1",
314                                   "readOnly": "True"
315                                 },
316                                 "modelCustomizationId": {
317                                   "title": "Customization ID",
318                                   "type": "string",
319                                   "default": "bafcdab0-801d-4d81-9ead-f464640a38b1",
320                                   "readOnly": "True"
321                                 }
322                               }
323                             },
324                             {
325                               "title": "VFMODULE-Vloadbalancerms..base_template..module-0",
326                               "properties": {
327                                 "type": {
328                                   "title": "Type",
329                                   "type": "string",
330                                   "default": "VFMODULE",
331                                   "readOnly": "True"
332                                 },
333                                 "resourceID": {
334                                   "title": "Resource ID",
335                                   "type": "string",
336                                   "default": "Vloadbalancerms..base_template..module-0",
337                                   "readOnly": "True"
338                                 },
339                                 "modelInvariantId": {
340                                   "title": "Model Invariant Id (ModelInvariantUUID)",
341                                   "type": "string",
342                                   "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
343                                   "readOnly": "True"
344                                 },
345                                 "modelVersionId": {
346                                   "title": "Model Version Id (ModelUUID)",
347                                   "type": "string",
348                                   "default": "63734409-f745-4e4d-a38b-131638a0edce",
349                                   "readOnly": "True"
350                                 },
351                                 "modelName": {
352                                   "title": "Model Name",
353                                   "type": "string",
354                                   "default": "Vloadbalancerms..base_template..module-0",
355                                   "readOnly": "True"
356                                 },
357                                 "modelVersion": {
358                                   "title": "Model Version",
359                                   "type": "string",
360                                   "default": "1",
361                                   "readOnly": "True"
362                                 },
363                                 "modelCustomizationId": {
364                                   "title": "Customization ID",
365                                   "type": "string",
366                                   "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
367                                   "readOnly": "True"
368                                 }
369                               }
370                             },
371                             {
372                               "title": "VFMODULE-Vloadbalancerms..vlb..module-2",
373                               "properties": {
374                                 "type": {
375                                   "title": "Type",
376                                   "type": "string",
377                                   "default": "VFMODULE",
378                                   "readOnly": "True"
379                                 },
380                                 "resourceID": {
381                                   "title": "Resource ID",
382                                   "type": "string",
383                                   "default": "Vloadbalancerms..vlb..module-2",
384                                   "readOnly": "True"
385                                 },
386                                 "modelInvariantId": {
387                                   "title": "Model Invariant Id (ModelInvariantUUID)",
388                                   "type": "string",
389                                   "default": "a772a1f4-0064-412c-833d-4749b15828dd",
390                                   "readOnly": "True"
391                                 },
392                                 "modelVersionId": {
393                                   "title": "Model Version Id (ModelUUID)",
394                                   "type": "string",
395                                   "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
396                                   "readOnly": "True"
397                                 },
398                                 "modelName": {
399                                   "title": "Model Name",
400                                   "type": "string",
401                                   "default": "Vloadbalancerms..vlb..module-2",
402                                   "readOnly": "True"
403                                 },
404                                 "modelVersion": {
405                                   "title": "Model Version",
406                                   "type": "string",
407                                   "default": "1",
408                                   "readOnly": "True"
409                                 },
410                                 "modelCustomizationId": {
411                                   "title": "Customization ID",
412                                   "type": "string",
413                                   "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
414                                   "readOnly": "True"
415                                 }
416                               }
417                             }
418                           ]
419                         }
420                       }
421                     }
422                   }
423                 }
424               },
425               "guard_policies": {
426                 "type": "array",
427                 "format": "tabs-top",
428                 "title": "Associated Guard policies",
429                 "items": {
430                   "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}",
431                   "anyOf": [
432                     {
433                       "title": "Guard MinMax",
434                       "type": "object",
435                       "properties": {
436                         "policy-id": {
437                           "type": "string",
438                           "default": "guard.minmax.new",
439                           "pattern": "^(guard.minmax\\..*)$"
440                         },
441                         "content": {
442                           "properties": {
443                             "actor": {
444                               "type": "string",
445                               "enum": [
446                                 "APPC",
447                                 "SO",
448                                 "VFC",
449                                 "SDNC",
450                                 "SDNR"
451                               ]
452                             },
453                             "recipe": {
454                               "type": "string",
455                               "enum": [
456                                 "Restart",
457                                 "Rebuild",
458                                 "Migrate",
459                                 "Health-Check",
460                                 "ModifyConfig",
461                                 "VF Module Create",
462                                 "VF Module Delete",
463                                 "Reroute"
464                               ]
465                             },
466                             "targets": {
467                               "type": "string",
468                               "default": ".*"
469                             },
470                             "clname": {
471                               "type": "string",
472                               "template": "{{loopName}}",
473                               "watch": {
474                                 "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName"
475                               }
476                             },
477                             "guardActiveStart": {
478                               "type": "string",
479                               "default": "00:00:00Z"
480                             },
481                             "guardActiveEnd": {
482                               "type": "string",
483                               "default": "10:00:00Z"
484                             },
485                             "min": {
486                               "type": "string",
487                               "default": "0"
488                             },
489                             "max": {
490                               "type": "string",
491                               "default": "1"
492                             }
493                           }
494                         }
495                       }
496                     },
497                     {
498                       "title": "Guard Frequency",
499                       "type": "object",
500                       "properties": {
501                         "policy-id": {
502                           "type": "string",
503                           "default": "guard.frequency.new",
504                           "pattern": "^(guard.frequency\\..*)$"
505                         },
506                         "content": {
507                           "properties": {
508                             "actor": {
509                               "type": "string",
510                               "enum": [
511                                 "APPC",
512                                 "SO",
513                                 "VFC",
514                                 "SDNC",
515                                 "SDNR"
516                               ]
517                             },
518                             "recipe": {
519                               "type": "string",
520                               "enum": [
521                                 "Restart",
522                                 "Rebuild",
523                                 "Migrate",
524                                 "Health-Check",
525                                 "ModifyConfig",
526                                 "VF Module Create",
527                                 "VF Module Delete",
528                                 "Reroute"
529                               ]
530                             },
531                             "targets": {
532                               "type": "string",
533                               "default": ".*"
534                             },
535                             "clname": {
536                               "type": "string",
537                               "template": "{{loopName}}",
538                               "watch": {
539                                 "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName"
540                               }
541                             },
542                             "guardActiveStart": {
543                               "type": "string",
544                               "default": "00:00:00Z"
545                             },
546                             "guardActiveEnd": {
547                               "type": "string",
548                               "default": "10:00:00Z"
549                             },
550                             "limit": {
551                               "type": "string"
552                             },
553                             "timeWindow": {
554                               "type": "string"
555                             },
556                             "timeUnits": {
557                               "type": "string",
558                               "enum": [
559                                 "minute",
560                                 "hour",
561                                 "day",
562                                 "week",
563                                 "month",
564                                 "year"
565                               ]
566                             }
567                           }
568                         }
569                       }
570                     }
571                   ]
572                 }
573               }
574             }
575           }
576         }
577       }
578     }
579   },
580   "globalPropertiesJson": {
581     "testname": "testvalue"
582   },
583   "modelService": {
584     "serviceDetails": {
585       "serviceType": "",
586       "namingPolicy": "",
587       "environmentContext": "General_Revenue-Bearing",
588       "serviceEcompNaming": "true",
589       "serviceRole": "",
590       "name": "vLoadBalancerMS",
591       "description": "vLBMS",
592       "invariantUUID": "30ec5b59-4799-48d8-ac5f-1058a6b0e48f",
593       "ecompGeneratedNaming": "true",
594       "category": "Network L4+",
595       "type": "Service",
596       "UUID": "63cac700-ab9a-4115-a74f-7eac85e3fce0",
597       "instantiationType": "A-la-carte"
598     },
599     "resourceDetails": {
600       "CP": {},
601       "VL": {},
602       "VF": {
603         "vLoadBalancerMS 0": {
604           "resourceVendor": "Test",
605           "resourceVendorModelNumber": "",
606           "name": "vLoadBalancerMS",
607           "description": "vLBMS",
608           "invariantUUID": "1a31b9f2-e50d-43b7-89b3-a040250cf506",
609           "subcategory": "Load Balancer",
610           "category": "Application L4+",
611           "type": "VF",
612           "UUID": "b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6",
613           "version": "1.0",
614           "resourceVendorRelease": "1.0",
615           "customizationUUID": "465246dc-7748-45f4-a013-308d92922552"
616         }
617       },
618       "CR": {},
619       "VFC": {},
620       "PNF": {},
621       "Service": {},
622       "CVFC": {},
623       "Service Proxy": {},
624       "Configuration": {},
625       "AllottedResource": {},
626       "VFModule": {
627         "Vloadbalancerms..vpkg..module-1": {
628           "vfModuleModelInvariantUUID": "ca052563-eb92-4b5b-ad41-9111768ce043",
629           "vfModuleModelVersion": "1",
630           "vfModuleModelName": "Vloadbalancerms..vpkg..module-1",
631           "vfModuleModelUUID": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
632           "vfModuleModelCustomizationUUID": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
633           "min_vf_module_instances": 0,
634           "vf_module_label": "vpkg",
635           "max_vf_module_instances": 1,
636           "vf_module_type": "Expansion",
637           "isBase": false,
638           "initial_count": 0,
639           "volume_group": false
640         },
641         "Vloadbalancerms..vdns..module-3": {
642           "vfModuleModelInvariantUUID": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
643           "vfModuleModelVersion": "1",
644           "vfModuleModelName": "Vloadbalancerms..vdns..module-3",
645           "vfModuleModelUUID": "4fa73b49-8a6c-493e-816b-eb401567b720",
646           "vfModuleModelCustomizationUUID": "bafcdab0-801d-4d81-9ead-f464640a38b1",
647           "min_vf_module_instances": 0,
648           "vf_module_label": "vdns",
649           "max_vf_module_instances": 50,
650           "vf_module_type": "Expansion",
651           "isBase": false,
652           "initial_count": 0,
653           "volume_group": false
654         },
655         "Vloadbalancerms..base_template..module-0": {
656           "vfModuleModelInvariantUUID": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
657           "vfModuleModelVersion": "1",
658           "vfModuleModelName": "Vloadbalancerms..base_template..module-0",
659           "vfModuleModelUUID": "63734409-f745-4e4d-a38b-131638a0edce",
660           "vfModuleModelCustomizationUUID": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
661           "min_vf_module_instances": 1,
662           "vf_module_label": "base_template",
663           "max_vf_module_instances": 1,
664           "vf_module_type": "Base",
665           "isBase": true,
666           "initial_count": 1,
667           "volume_group": false
668         },
669         "Vloadbalancerms..vlb..module-2": {
670           "vfModuleModelInvariantUUID": "a772a1f4-0064-412c-833d-4749b15828dd",
671           "vfModuleModelVersion": "1",
672           "vfModuleModelName": "Vloadbalancerms..vlb..module-2",
673           "vfModuleModelUUID": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
674           "vfModuleModelCustomizationUUID": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
675           "min_vf_module_instances": 0,
676           "vf_module_label": "vlb",
677           "max_vf_module_instances": 1,
678           "vf_module_type": "Expansion",
679           "isBase": false,
680           "initial_count": 0,
681           "volume_group": false
682         }
683       }
684     }
685   },
686   "lastComputedState": "DESIGN",
687   "components": {
688     "POLICY": {
689       "componentState": {
690         "stateName": "UNKNOWN",
691         "description": "The current status is not clear. Need to regresh the status to get the current status."
692       }
693     },
694     "DCAE": {
695       "componentState": {
696         "stateName": "BLUEPRINT_DEPLOYED",
697         "description": "The DCAE blueprint has been found in the DCAE inventory but not yet instancianted for this loop"
698       }
699     }
700   },
701   "operationalPolicies": [],
702   "microServicePolicies": [],
703   "loopLogs": []
704 }