Payload attributes are not displayed in operational policy
[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 (YAML)",
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                                       "resource-assignment-properties": {
301                                         "title": "resource-assignment-properties",
302                                         "type": "object",
303                                         "properties": {
304                                           "private1-prefix-id": {
305                                             "title": "private1-prefix-id",
306                                             "type": "string"
307                                           }
308                                         }
309                                       }
310                                     }
311                                   }
312                                 }
313                               }
314                             }
315                           }
316                         ]
317                       }
318                     }
319                   }
320                 ]
321               },
322               "success": {
323                 "default": "final_success",
324                 "title": "When Success",
325                 "type": "string"
326               },
327               "failure": {
328                 "default": "final_failure",
329                 "title": "When Failure",
330                 "type": "string"
331               },
332               "failure_timeout": {
333                 "default": "final_failure_timeout",
334                 "title": "When Failure Timeout",
335                 "type": "string"
336               },
337               "failure_retries": {
338                 "default": "final_failure_retries",
339                 "title": "When Failure Retries",
340                 "type": "string"
341               },
342               "failure_exception": {
343                 "default": "final_failure_exception",
344                 "title": "When Failure Exception",
345                 "type": "string"
346               },
347               "failure_guard": {
348                 "default": "final_failure_guard",
349                 "title": "When Failure Guard",
350                 "type": "string"
351               },
352               "target": {
353                 "type": "object",
354                 "required": [
355                   "type",
356                   "resourceID"
357                 ],
358                 "anyOf": [
359                   {
360                     "title": "User Defined",
361                     "additionalProperties": "True",
362                     "properties": {
363                       "type": {
364                         "title": "Target type",
365                         "type": "string",
366                         "default": "",
367                         "enum": [
368                           "VNF",
369                           "VFMODULE",
370                           "VM"
371                         ]
372                       },
373                       "resourceID": {
374                         "title": "Target type",
375                         "type": "string",
376                         "default": ""
377                       }
378                     }
379                   },
380                   {
381                     "title": "VNF-vLoadBalancerMS 0",
382                     "properties": {
383                       "type": {
384                         "title": "Type",
385                         "type": "string",
386                         "default": "VNF",
387                         "readOnly": "True"
388                       },
389                       "resourceID": {
390                         "title": "Resource ID",
391                         "type": "string",
392                         "default": "vLoadBalancerMS",
393                         "readOnly": "True"
394                       }
395                     }
396                   },
397                   {
398                     "title": "VFMODULE-Vloadbalancerms..vpkg..module-1",
399                     "properties": {
400                       "type": {
401                         "title": "Type",
402                         "type": "string",
403                         "default": "VFMODULE",
404                         "readOnly": "True"
405                       },
406                       "resourceID": {
407                         "title": "Resource ID",
408                         "type": "string",
409                         "default": "Vloadbalancerms..vpkg..module-1",
410                         "readOnly": "True"
411                       },
412                       "modelInvariantId": {
413                         "title": "Model Invariant Id (ModelInvariantUUID)",
414                         "type": "string",
415                         "default": "ca052563-eb92-4b5b-ad41-9111768ce043",
416                         "readOnly": "True"
417                       },
418                       "modelVersionId": {
419                         "title": "Model Version Id (ModelUUID)",
420                         "type": "string",
421                         "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
422                         "readOnly": "True"
423                       },
424                       "modelName": {
425                         "title": "Model Name",
426                         "type": "string",
427                         "default": "Vloadbalancerms..vpkg..module-1",
428                         "readOnly": "True"
429                       },
430                       "modelVersion": {
431                         "title": "Model Version",
432                         "type": "string",
433                         "default": "1",
434                         "readOnly": "True"
435                       },
436                       "modelCustomizationId": {
437                         "title": "Customization ID",
438                         "type": "string",
439                         "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
440                         "readOnly": "True"
441                       }
442                     }
443                   },
444                   {
445                     "title": "VFMODULE-Vloadbalancerms..vdns..module-3",
446                     "properties": {
447                       "type": {
448                         "title": "Type",
449                         "type": "string",
450                         "default": "VFMODULE",
451                         "readOnly": "True"
452                       },
453                       "resourceID": {
454                         "title": "Resource ID",
455                         "type": "string",
456                         "default": "Vloadbalancerms..vdns..module-3",
457                         "readOnly": "True"
458                       },
459                       "modelInvariantId": {
460                         "title": "Model Invariant Id (ModelInvariantUUID)",
461                         "type": "string",
462                         "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
463                         "readOnly": "True"
464                       },
465                       "modelVersionId": {
466                         "title": "Model Version Id (ModelUUID)",
467                         "type": "string",
468                         "default": "4fa73b49-8a6c-493e-816b-eb401567b720",
469                         "readOnly": "True"
470                       },
471                       "modelName": {
472                         "title": "Model Name",
473                         "type": "string",
474                         "default": "Vloadbalancerms..vdns..module-3",
475                         "readOnly": "True"
476                       },
477                       "modelVersion": {
478                         "title": "Model Version",
479                         "type": "string",
480                         "default": "1",
481                         "readOnly": "True"
482                       },
483                       "modelCustomizationId": {
484                         "title": "Customization ID",
485                         "type": "string",
486                         "default": "bafcdab0-801d-4d81-9ead-f464640a38b1",
487                         "readOnly": "True"
488                       }
489                     }
490                   },
491                   {
492                     "title": "VFMODULE-Vloadbalancerms..base_template..module-0",
493                     "properties": {
494                       "type": {
495                         "title": "Type",
496                         "type": "string",
497                         "default": "VFMODULE",
498                         "readOnly": "True"
499                       },
500                       "resourceID": {
501                         "title": "Resource ID",
502                         "type": "string",
503                         "default": "Vloadbalancerms..base_template..module-0",
504                         "readOnly": "True"
505                       },
506                       "modelInvariantId": {
507                         "title": "Model Invariant Id (ModelInvariantUUID)",
508                         "type": "string",
509                         "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
510                         "readOnly": "True"
511                       },
512                       "modelVersionId": {
513                         "title": "Model Version Id (ModelUUID)",
514                         "type": "string",
515                         "default": "63734409-f745-4e4d-a38b-131638a0edce",
516                         "readOnly": "True"
517                       },
518                       "modelName": {
519                         "title": "Model Name",
520                         "type": "string",
521                         "default": "Vloadbalancerms..base_template..module-0",
522                         "readOnly": "True"
523                       },
524                       "modelVersion": {
525                         "title": "Model Version",
526                         "type": "string",
527                         "default": "1",
528                         "readOnly": "True"
529                       },
530                       "modelCustomizationId": {
531                         "title": "Customization ID",
532                         "type": "string",
533                         "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
534                         "readOnly": "True"
535                       }
536                     }
537                   },
538                   {
539                     "title": "VFMODULE-Vloadbalancerms..vlb..module-2",
540                     "properties": {
541                       "type": {
542                         "title": "Type",
543                         "type": "string",
544                         "default": "VFMODULE",
545                         "readOnly": "True"
546                       },
547                       "resourceID": {
548                         "title": "Resource ID",
549                         "type": "string",
550                         "default": "Vloadbalancerms..vlb..module-2",
551                         "readOnly": "True"
552                       },
553                       "modelInvariantId": {
554                         "title": "Model Invariant Id (ModelInvariantUUID)",
555                         "type": "string",
556                         "default": "a772a1f4-0064-412c-833d-4749b15828dd",
557                         "readOnly": "True"
558                       },
559                       "modelVersionId": {
560                         "title": "Model Version Id (ModelUUID)",
561                         "type": "string",
562                         "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
563                         "readOnly": "True"
564                       },
565                       "modelName": {
566                         "title": "Model Name",
567                         "type": "string",
568                         "default": "Vloadbalancerms..vlb..module-2",
569                         "readOnly": "True"
570                       },
571                       "modelVersion": {
572                         "title": "Model Version",
573                         "type": "string",
574                         "default": "1",
575                         "readOnly": "True"
576                       },
577                       "modelCustomizationId": {
578                         "title": "Customization ID",
579                         "type": "string",
580                         "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
581                         "readOnly": "True"
582                       }
583                     }
584                   }
585                 ]
586               }
587             }
588           }
589         }
590       }
591     },
592     "guard_policies": {
593       "type": "array",
594       "format": "tabs-top",
595       "title": "Associated Guard policies",
596       "items": {
597         "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}",
598         "anyOf": [
599           {
600             "title": "Guard MinMax",
601             "type": "object",
602             "properties": {
603               "policy-id": {
604                 "type": "string",
605                 "default": "guard.minmax.new",
606                 "pattern": "^(guard.minmax\\..*)$"
607               },
608               "content": {
609                 "properties": {
610                   "actor": {
611                     "type": "string",
612                     "enum": [
613                       "APPC",
614                       "SO",
615                       "VFC",
616                       "SDNC",
617                       "SDNR"
618                     ]
619                   },
620                   "recipe": {
621                     "type": "string",
622                     "enum": [
623                       "Restart",
624                       "Rebuild",
625                       "Migrate",
626                       "Health-Check",
627                       "ModifyConfig",
628                       "VF Module Create",
629                       "VF Module Delete",
630                       "Reroute"
631                     ]
632                   },
633                   "targets": {
634                     "type": "string",
635                     "default": ".*"
636                   },
637                   "clname": {
638                     "type": "string",
639                     "template": "{{loopName}}",
640                     "watch": {
641                       "loopName": "operational_policy.controlLoop.controlLoopName"
642                     }
643                   },
644                   "guardActiveStart": {
645                     "type": "string",
646                     "default": "00:00:00Z"
647                   },
648                   "guardActiveEnd": {
649                     "type": "string",
650                     "default": "10:00:00Z"
651                   },
652                   "min": {
653                     "type": "string",
654                     "default": "0"
655                   },
656                   "max": {
657                     "type": "string",
658                     "default": "1"
659                   }
660                 }
661               }
662             }
663           },
664           {
665             "title": "Guard Frequency",
666             "type": "object",
667             "properties": {
668               "policy-id": {
669                 "type": "string",
670                 "default": "guard.frequency.new",
671                 "pattern": "^(guard.frequency\\..*)$"
672               },
673               "content": {
674                 "properties": {
675                   "actor": {
676                     "type": "string",
677                     "enum": [
678                       "APPC",
679                       "SO",
680                       "VFC",
681                       "SDNC",
682                       "SDNR"
683                     ]
684                   },
685                   "recipe": {
686                     "type": "string",
687                     "enum": [
688                       "Restart",
689                       "Rebuild",
690                       "Migrate",
691                       "Health-Check",
692                       "ModifyConfig",
693                       "VF Module Create",
694                       "VF Module Delete",
695                       "Reroute"
696                     ]
697                   },
698                   "targets": {
699                     "type": "string",
700                     "default": ".*"
701                   },
702                   "clname": {
703                     "type": "string",
704                     "template": "{{loopName}}",
705                     "watch": {
706                       "loopName": "operational_policy.controlLoop.controlLoopName"
707                     }
708                   },
709                   "guardActiveStart": {
710                     "type": "string",
711                     "default": "00:00:00Z"
712                   },
713                   "guardActiveEnd": {
714                     "type": "string",
715                     "default": "10:00:00Z"
716                   },
717                   "limit": {
718                     "type": "string"
719                   },
720                   "timeWindow": {
721                     "type": "string"
722                   },
723                   "timeUnits": {
724                     "type": "string",
725                     "enum": [
726                       "minute",
727                       "hour",
728                       "day",
729                       "week",
730                       "month",
731                       "year"
732                     ]
733                   }
734                 }
735               }
736             }
737           }
738         ]
739       }
740     }
741   }
742 }