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