Guard policy clean up
[clamp.git] / src / test / resources / tosca / operational-policy-json-schema.json
1 {
2   "type": "object",
3   "title": "Configuration",
4   "required": [
5     "operational_policy"
6   ],
7   "properties": {
8     "operational_policy": {
9       "type": "object",
10       "title": "Related Parameters",
11       "required": [
12         "controlLoop",
13         "policies"
14       ],
15       "properties": {
16         "controlLoop": {
17           "type": "object",
18           "title": "Control Loop details",
19           "required": [
20             "timeout",
21             "abatement",
22             "trigger_policy",
23             "controlLoopName"
24           ],
25           "properties": {
26             "timeout": {
27               "type": "string",
28               "title": "Overall Time Limit",
29               "default": "0",
30               "format": "number"
31             },
32             "abatement": {
33               "type": "string",
34               "title": "Abatement",
35               "enum": [
36                 "True",
37                 "False"
38               ]
39             },
40             "trigger_policy": {
41               "type": "string",
42               "title": "Policy Decision Entry"
43             },
44             "controlLoopName": {
45               "type": "string",
46               "title": "Control loop name",
47               "readOnly": "True"
48             }
49           }
50         },
51         "policies": {
52           "uniqueItems": "true",
53           "id": "policies_array",
54           "type": "array",
55           "title": "Policy Decision Tree",
56           "format": "tabs-top",
57           "items": {
58             "title": "Policy Decision",
59             "type": "object",
60             "id": "policy_item",
61             "headerTemplate": "{{self.id}} - {{self.recipe}}",
62             "format": "categories",
63             "basicCategoryTitle": "recipe",
64             "required": [
65               "id",
66               "retry",
67               "timeout",
68               "actor",
69               "success",
70               "failure",
71               "failure_timeout",
72               "failure_retries",
73               "failure_exception",
74               "failure_guard",
75               "target"
76             ],
77             "properties": {
78               "id": {
79                 "default": "Policy 1",
80                 "title": "Policy ID",
81                 "type": "string"
82               },
83               "retry": {
84                 "default": "0",
85                 "title": "Number of Retry",
86                 "type": "string",
87                 "format": "number"
88               },
89               "timeout": {
90                 "default": "0",
91                 "title": "Timeout",
92                 "type": "string",
93                 "format": "number"
94               },
95               "actor": {
96                 "type": "object",
97                 "title": "Actor",
98                 "anyOf": [
99                   {
100                     "title": "APPC",
101                     "type": "object",
102                     "properties": {
103                       "actor": {
104                         "title": "actor",
105                         "type": "string",
106                         "default": "APPC",
107                         "options": {
108                           "hidden": true
109                         }
110                       },
111                       "recipe": {
112                         "title": "recipe",
113                         "type": "string",
114                         "default": "",
115                         "enum": [
116                           "Restart",
117                           "Rebuild",
118                           "Migrate",
119                           "Health-Check",
120                           "ModifyConfig"
121                         ]
122                       },
123                       "payload": {
124                         "title": "Payload (YAML)",
125                         "type": "string",
126                         "format": "textarea"
127                       }
128                     }
129                   },
130                   {
131                     "title": "SO",
132                     "type": "object",
133                     "properties": {
134                       "actor": {
135                         "title": "actor",
136                         "type": "string",
137                         "default": "SO",
138                         "options": {
139                           "hidden": true
140                         }
141                       },
142                       "recipe": {
143                         "title": "recipe",
144                         "type": "string",
145                         "default": "",
146                         "enum": [
147                           "VF Module Create",
148                           "VF Module Delete"
149                         ]
150                       },
151                       "payload": {
152                         "title": "Payload (YAML)",
153                         "type": "string",
154                         "format": "textarea"
155                       }
156                     }
157                   },
158                   {
159                     "title": "SDNC",
160                     "type": "object",
161                     "properties": {
162                       "actor": {
163                         "title": "actor",
164                         "type": "string",
165                         "default": "SDNC",
166                         "options": {
167                           "hidden": true
168                         }
169                       },
170                       "recipe": {
171                         "title": "recipe",
172                         "type": "string",
173                         "default": "",
174                         "enum": [
175                           "Reroute",
176                           "BandwidthOnDemand"
177                         ]
178                       },
179                       "payload": {
180                         "title": "Payload (YAML)",
181                         "type": "string",
182                         "format": "textarea"
183                       }
184                     }
185                   },
186                   {
187                     "title": "VFC",
188                     "type": "object",
189                     "properties": {
190                       "actor": {
191                         "title": "actor",
192                         "type": "string",
193                         "default": "VFC",
194                         "options": {
195                           "hidden": true
196                         }
197                       },
198                       "recipe": {
199                         "title": "recipe",
200                         "type": "string",
201                         "default": "",
202                         "enum": [
203                           "ModifyConfig"
204                         ]
205                       },
206                       "payload": {
207                         "title": "Payload (YAML)",
208                         "type": "string",
209                         "format": "textarea"
210                       }
211                     }
212                   },
213                   {
214                     "title": "CDS",
215                     "type": "object",
216                     "properties": {
217                       "actor": {
218                         "title": "actor",
219                         "type": "string",
220                         "default": "CDS",
221                         "options": {
222                           "hidden": true
223                         }
224                       },
225                       "recipe": {
226                         "title": "recipe",
227                         "type": "object",
228                         "anyOf": [
229                           {
230                             "title": "user-defined",
231                             "type": "object",
232                             "properties": {
233                               "recipe": {
234                                 "title": "recipe",
235                                 "type": "string",
236                                 "default": "user-defined",
237                                 "format": "textarea"
238                               },
239                               "payload": {
240                                 "title": "Payload (YAML)",
241                                 "type": "string",
242                                 "default": "",
243                                 "format": "textarea"
244                               }
245                             }
246                           },
247                           {
248                             "title": "resource-assignment",
249                             "type": "object",
250                             "properties": {
251                               "recipe": {
252                                 "title": "recipe",
253                                 "type": "string",
254                                 "default": "resource-assignment",
255                                 "options": {
256                                   "hidden": true
257                                 }
258                               },
259                               "payload": {
260                                 "title": "Payload",
261                                 "type": "object",
262                                 "properties": {
263                                   "artifact_name": {
264                                     "title": "artifact name",
265                                     "type": "string",
266                                     "default": "baseconfiguration",
267                                     "readOnly": "True"
268                                   },
269                                   "artifact_version": {
270                                     "title": "artifact version",
271                                     "type": "string",
272                                     "default": "1.0.0",
273                                     "readOnly": "True"
274                                   },
275                                   "mode": {
276                                     "title": "mode",
277                                     "type": "string",
278                                     "default": "async"
279                                   },
280                                   "data": {
281                                     "title": "data",
282                                     "properties": {
283                                       "request-id": {
284                                         "title": "request-id",
285                                         "type": "string"
286                                       },
287                                       "service-instance-id": {
288                                         "title": "service-instance-id",
289                                         "type": "string"
290                                       },
291                                       "vnf-id": {
292                                         "title": "vnf-id",
293                                         "type": "string"
294                                       },
295                                       "action-name": {
296                                         "title": "action-name",
297                                         "type": "string"
298                                       },
299                                       "scope-type": {
300                                         "title": "scope-type",
301                                         "type": "string"
302                                       },
303                                       "hostname": {
304                                         "title": "hostname",
305                                         "type": "string"
306                                       },
307                                       "vnf_name": {
308                                         "title": "vnf_name",
309                                         "type": "string"
310                                       }
311                                     }
312                                   }
313                                 }
314                               }
315                             }
316                           },
317                           {
318                             "title": "activate",
319                             "type": "object",
320                             "properties": {
321                               "recipe": {
322                                 "title": "recipe",
323                                 "type": "string",
324                                 "default": "activate",
325                                 "options": {
326                                   "hidden": true
327                                 }
328                               },
329                               "payload": {
330                                 "title": "Payload",
331                                 "type": "object",
332                                 "properties": {
333                                   "artifact_name": {
334                                     "title": "artifact name",
335                                     "type": "string",
336                                     "default": "baseconfiguration",
337                                     "readOnly": "True"
338                                   },
339                                   "artifact_version": {
340                                     "title": "artifact version",
341                                     "type": "string",
342                                     "default": "1.0.0",
343                                     "readOnly": "True"
344                                   },
345                                   "mode": {
346                                     "title": "mode",
347                                     "type": "string",
348                                     "default": "async"
349                                   },
350                                   "data": {
351                                     "title": "data",
352                                     "properties": {
353                                       "request-id": {
354                                         "title": "request-id",
355                                         "type": "string"
356                                       },
357                                       "service-instance-id": {
358                                         "title": "service-instance-id",
359                                         "type": "string"
360                                       },
361                                       "vnf-id": {
362                                         "title": "vnf-id",
363                                         "type": "string"
364                                       },
365                                       "action-name": {
366                                         "title": "action-name",
367                                         "type": "string"
368                                       },
369                                       "scope-type": {
370                                         "title": "scope-type",
371                                         "type": "string"
372                                       },
373                                       "hostname": {
374                                         "title": "hostname",
375                                         "type": "string"
376                                       },
377                                       "vnf_name": {
378                                         "title": "vnf_name",
379                                         "type": "string"
380                                       }
381                                     }
382                                   }
383                                 }
384                               }
385                             }
386                           },
387                           {
388                             "title": "activate-restconf",
389                             "type": "object",
390                             "properties": {
391                               "recipe": {
392                                 "title": "recipe",
393                                 "type": "string",
394                                 "default": "activate-restconf",
395                                 "options": {
396                                   "hidden": true
397                                 }
398                               },
399                               "payload": {
400                                 "title": "Payload",
401                                 "type": "object",
402                                 "properties": {
403                                   "artifact_name": {
404                                     "title": "artifact name",
405                                     "type": "string",
406                                     "default": "baseconfiguration",
407                                     "readOnly": "True"
408                                   },
409                                   "artifact_version": {
410                                     "title": "artifact version",
411                                     "type": "string",
412                                     "default": "1.0.0",
413                                     "readOnly": "True"
414                                   },
415                                   "mode": {
416                                     "title": "mode",
417                                     "type": "string",
418                                     "default": "async"
419                                   },
420                                   "data": {
421                                     "title": "data",
422                                     "properties": {
423                                       "request-id": {
424                                         "title": "request-id",
425                                         "type": "string"
426                                       },
427                                       "service-instance-id": {
428                                         "title": "service-instance-id",
429                                         "type": "string"
430                                       },
431                                       "vnf-id": {
432                                         "title": "vnf-id",
433                                         "type": "string"
434                                       },
435                                       "action-name": {
436                                         "title": "action-name",
437                                         "type": "string"
438                                       },
439                                       "scope-type": {
440                                         "title": "scope-type",
441                                         "type": "string"
442                                       },
443                                       "hostname": {
444                                         "title": "hostname",
445                                         "type": "string"
446                                       },
447                                       "vnf_name": {
448                                         "title": "vnf_name",
449                                         "type": "string"
450                                       }
451                                     }
452                                   }
453                                 }
454                               }
455                             }
456                           },
457                           {
458                             "title": "activate-cli",
459                             "type": "object",
460                             "properties": {
461                               "recipe": {
462                                 "title": "recipe",
463                                 "type": "string",
464                                 "default": "activate-cli",
465                                 "options": {
466                                   "hidden": true
467                                 }
468                               },
469                               "payload": {
470                                 "title": "Payload",
471                                 "type": "object",
472                                 "properties": {
473                                   "artifact_name": {
474                                     "title": "artifact name",
475                                     "type": "string",
476                                     "default": "baseconfiguration",
477                                     "readOnly": "True"
478                                   },
479                                   "artifact_version": {
480                                     "title": "artifact version",
481                                     "type": "string",
482                                     "default": "1.0.0",
483                                     "readOnly": "True"
484                                   },
485                                   "mode": {
486                                     "title": "mode",
487                                     "type": "string",
488                                     "default": "async"
489                                   },
490                                   "data": {
491                                     "title": "data",
492                                     "properties": {
493                                       "request-id": {
494                                         "title": "request-id",
495                                         "type": "string"
496                                       },
497                                       "service-instance-id": {
498                                         "title": "service-instance-id",
499                                         "type": "string"
500                                       },
501                                       "vnf-id": {
502                                         "title": "vnf-id",
503                                         "type": "string"
504                                       },
505                                       "action-name": {
506                                         "title": "action-name",
507                                         "type": "string"
508                                       },
509                                       "scope-type": {
510                                         "title": "scope-type",
511                                         "type": "string"
512                                       },
513                                       "hostname": {
514                                         "title": "hostname",
515                                         "type": "string"
516                                       },
517                                       "vnf_name": {
518                                         "title": "vnf_name",
519                                         "type": "string"
520                                       }
521                                     }
522                                   }
523                                 }
524                               }
525                             }
526                           },
527                           {
528                             "title": "assign-activate",
529                             "type": "object",
530                             "properties": {
531                               "recipe": {
532                                 "title": "recipe",
533                                 "type": "string",
534                                 "default": "assign-activate",
535                                 "options": {
536                                   "hidden": true
537                                 }
538                               },
539                               "payload": {
540                                 "title": "Payload",
541                                 "type": "object",
542                                 "properties": {
543                                   "artifact_name": {
544                                     "title": "artifact name",
545                                     "type": "string",
546                                     "default": "baseconfiguration",
547                                     "readOnly": "True"
548                                   },
549                                   "artifact_version": {
550                                     "title": "artifact version",
551                                     "type": "string",
552                                     "default": "1.0.0",
553                                     "readOnly": "True"
554                                   },
555                                   "mode": {
556                                     "title": "mode",
557                                     "type": "string",
558                                     "default": "async"
559                                   },
560                                   "data": {
561                                     "title": "data",
562                                     "properties": {
563                                       "request-id": {
564                                         "title": "request-id",
565                                         "type": "string"
566                                       },
567                                       "service-instance-id": {
568                                         "title": "service-instance-id",
569                                         "type": "string"
570                                       },
571                                       "vnf-id": {
572                                         "title": "vnf-id",
573                                         "type": "string"
574                                       },
575                                       "action-name": {
576                                         "title": "action-name",
577                                         "type": "string"
578                                       },
579                                       "scope-type": {
580                                         "title": "scope-type",
581                                         "type": "string"
582                                       },
583                                       "hostname": {
584                                         "title": "hostname",
585                                         "type": "string"
586                                       },
587                                       "vnf_name": {
588                                         "title": "vnf_name",
589                                         "type": "string"
590                                       }
591                                     }
592                                   }
593                                 }
594                               }
595                             }
596                           },
597                           {
598                             "title": "imperative-test-wf",
599                             "type": "object",
600                             "properties": {
601                               "recipe": {
602                                 "title": "recipe",
603                                 "type": "string",
604                                 "default": "imperative-test-wf",
605                                 "options": {
606                                   "hidden": true
607                                 }
608                               },
609                               "payload": {
610                                 "title": "Payload",
611                                 "type": "object",
612                                 "properties": {
613                                   "artifact_name": {
614                                     "title": "artifact name",
615                                     "type": "string",
616                                     "default": "baseconfiguration",
617                                     "readOnly": "True"
618                                   },
619                                   "artifact_version": {
620                                     "title": "artifact version",
621                                     "type": "string",
622                                     "default": "1.0.0",
623                                     "readOnly": "True"
624                                   },
625                                   "mode": {
626                                     "title": "mode",
627                                     "type": "string",
628                                     "default": "async"
629                                   },
630                                   "data": {
631                                     "title": "data",
632                                     "properties": {
633                                       "request-id": {
634                                         "title": "request-id",
635                                         "type": "string"
636                                       },
637                                       "service-instance-id": {
638                                         "title": "service-instance-id",
639                                         "type": "string"
640                                       },
641                                       "vnf-id": {
642                                         "title": "vnf-id",
643                                         "type": "string"
644                                       },
645                                       "action-name": {
646                                         "title": "action-name",
647                                         "type": "string"
648                                       },
649                                       "scope-type": {
650                                         "title": "scope-type",
651                                         "type": "string"
652                                       },
653                                       "hostname": {
654                                         "title": "hostname",
655                                         "type": "string"
656                                       },
657                                       "vnf_name": {
658                                         "title": "vnf_name",
659                                         "type": "string"
660                                       }
661                                     }
662                                   }
663                                 }
664                               }
665                             }
666                           }
667                         ]
668                       }
669                     }
670                   }
671                 ]
672               },
673               "success": {
674                 "default": "final_success",
675                 "title": "When Success",
676                 "type": "string"
677               },
678               "failure": {
679                 "default": "final_failure",
680                 "title": "When Failure",
681                 "type": "string"
682               },
683               "failure_timeout": {
684                 "default": "final_failure_timeout",
685                 "title": "When Failure Timeout",
686                 "type": "string"
687               },
688               "failure_retries": {
689                 "default": "final_failure_retries",
690                 "title": "When Failure Retries",
691                 "type": "string"
692               },
693               "failure_exception": {
694                 "default": "final_failure_exception",
695                 "title": "When Failure Exception",
696                 "type": "string"
697               },
698               "failure_guard": {
699                 "default": "final_failure_guard",
700                 "title": "When Failure Guard",
701                 "type": "string"
702               },
703               "target": {
704                 "type": "object",
705                 "required": [
706                   "type",
707                   "resourceID"
708                 ],
709                 "anyOf": [
710                   {
711                     "title": "User Defined",
712                     "additionalProperties": "True",
713                     "properties": {
714                       "type": {
715                         "title": "Target type",
716                         "type": "string",
717                         "default": "",
718                         "enum": [
719                           "VNF",
720                           "VFMODULE",
721                           "VM"
722                         ]
723                       },
724                       "resourceID": {
725                         "title": "Target type",
726                         "type": "string",
727                         "default": ""
728                       }
729                     }
730                   },
731                   {
732                     "title": "VNF-vLoadBalancerMS 0",
733                     "properties": {
734                       "type": {
735                         "title": "Type",
736                         "type": "string",
737                         "default": "VNF",
738                         "readOnly": "True"
739                       },
740                       "resourceID": {
741                         "title": "Resource ID",
742                         "type": "string",
743                         "default": "vLoadBalancerMS",
744                         "readOnly": "True"
745                       }
746                     }
747                   },
748                   {
749                     "title": "VFMODULE-Vloadbalancerms..vpkg..module-1",
750                     "properties": {
751                       "type": {
752                         "title": "Type",
753                         "type": "string",
754                         "default": "VFMODULE",
755                         "readOnly": "True"
756                       },
757                       "resourceID": {
758                         "title": "Resource ID",
759                         "type": "string",
760                         "default": "Vloadbalancerms..vpkg..module-1",
761                         "readOnly": "True"
762                       },
763                       "modelInvariantId": {
764                         "title": "Model Invariant Id (ModelInvariantUUID)",
765                         "type": "string",
766                         "default": "ca052563-eb92-4b5b-ad41-9111768ce043",
767                         "readOnly": "True"
768                       },
769                       "modelVersionId": {
770                         "title": "Model Version Id (ModelUUID)",
771                         "type": "string",
772                         "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
773                         "readOnly": "True"
774                       },
775                       "modelName": {
776                         "title": "Model Name",
777                         "type": "string",
778                         "default": "Vloadbalancerms..vpkg..module-1",
779                         "readOnly": "True"
780                       },
781                       "modelVersion": {
782                         "title": "Model Version",
783                         "type": "string",
784                         "default": "1",
785                         "readOnly": "True"
786                       },
787                       "modelCustomizationId": {
788                         "title": "Customization ID",
789                         "type": "string",
790                         "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
791                         "readOnly": "True"
792                       }
793                     }
794                   },
795                   {
796                     "title": "VFMODULE-Vloadbalancerms..vdns..module-3",
797                     "properties": {
798                       "type": {
799                         "title": "Type",
800                         "type": "string",
801                         "default": "VFMODULE",
802                         "readOnly": "True"
803                       },
804                       "resourceID": {
805                         "title": "Resource ID",
806                         "type": "string",
807                         "default": "Vloadbalancerms..vdns..module-3",
808                         "readOnly": "True"
809                       },
810                       "modelInvariantId": {
811                         "title": "Model Invariant Id (ModelInvariantUUID)",
812                         "type": "string",
813                         "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
814                         "readOnly": "True"
815                       },
816                       "modelVersionId": {
817                         "title": "Model Version Id (ModelUUID)",
818                         "type": "string",
819                         "default": "4fa73b49-8a6c-493e-816b-eb401567b720",
820                         "readOnly": "True"
821                       },
822                       "modelName": {
823                         "title": "Model Name",
824                         "type": "string",
825                         "default": "Vloadbalancerms..vdns..module-3",
826                         "readOnly": "True"
827                       },
828                       "modelVersion": {
829                         "title": "Model Version",
830                         "type": "string",
831                         "default": "1",
832                         "readOnly": "True"
833                       },
834                       "modelCustomizationId": {
835                         "title": "Customization ID",
836                         "type": "string",
837                         "default": "bafcdab0-801d-4d81-9ead-f464640a38b1",
838                         "readOnly": "True"
839                       }
840                     }
841                   },
842                   {
843                     "title": "VFMODULE-Vloadbalancerms..base_template..module-0",
844                     "properties": {
845                       "type": {
846                         "title": "Type",
847                         "type": "string",
848                         "default": "VFMODULE",
849                         "readOnly": "True"
850                       },
851                       "resourceID": {
852                         "title": "Resource ID",
853                         "type": "string",
854                         "default": "Vloadbalancerms..base_template..module-0",
855                         "readOnly": "True"
856                       },
857                       "modelInvariantId": {
858                         "title": "Model Invariant Id (ModelInvariantUUID)",
859                         "type": "string",
860                         "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
861                         "readOnly": "True"
862                       },
863                       "modelVersionId": {
864                         "title": "Model Version Id (ModelUUID)",
865                         "type": "string",
866                         "default": "63734409-f745-4e4d-a38b-131638a0edce",
867                         "readOnly": "True"
868                       },
869                       "modelName": {
870                         "title": "Model Name",
871                         "type": "string",
872                         "default": "Vloadbalancerms..base_template..module-0",
873                         "readOnly": "True"
874                       },
875                       "modelVersion": {
876                         "title": "Model Version",
877                         "type": "string",
878                         "default": "1",
879                         "readOnly": "True"
880                       },
881                       "modelCustomizationId": {
882                         "title": "Customization ID",
883                         "type": "string",
884                         "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
885                         "readOnly": "True"
886                       }
887                     }
888                   },
889                   {
890                     "title": "VFMODULE-Vloadbalancerms..vlb..module-2",
891                     "properties": {
892                       "type": {
893                         "title": "Type",
894                         "type": "string",
895                         "default": "VFMODULE",
896                         "readOnly": "True"
897                       },
898                       "resourceID": {
899                         "title": "Resource ID",
900                         "type": "string",
901                         "default": "Vloadbalancerms..vlb..module-2",
902                         "readOnly": "True"
903                       },
904                       "modelInvariantId": {
905                         "title": "Model Invariant Id (ModelInvariantUUID)",
906                         "type": "string",
907                         "default": "a772a1f4-0064-412c-833d-4749b15828dd",
908                         "readOnly": "True"
909                       },
910                       "modelVersionId": {
911                         "title": "Model Version Id (ModelUUID)",
912                         "type": "string",
913                         "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
914                         "readOnly": "True"
915                       },
916                       "modelName": {
917                         "title": "Model Name",
918                         "type": "string",
919                         "default": "Vloadbalancerms..vlb..module-2",
920                         "readOnly": "True"
921                       },
922                       "modelVersion": {
923                         "title": "Model Version",
924                         "type": "string",
925                         "default": "1",
926                         "readOnly": "True"
927                       },
928                       "modelCustomizationId": {
929                         "title": "Customization ID",
930                         "type": "string",
931                         "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
932                         "readOnly": "True"
933                       }
934                     }
935                   }
936                 ]
937               }
938             }
939           }
940         }
941       }
942     }
943   }
944 }