Merge "Fix entityId bug"
[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": "User defined",
733                     "properties": {}
734                   },
735                   {
736                     "title": "VNF-vLoadBalancerMS 0",
737                     "properties": {
738                       "type": {
739                         "title": "Type",
740                         "type": "string",
741                         "default": "VNF",
742                         "readOnly": "True"
743                       },
744                       "resourceID": {
745                         "title": "Resource ID",
746                         "type": "string",
747                         "default": "vLoadBalancerMS",
748                         "readOnly": "True"
749                       }
750                     }
751                   },
752                   {
753                     "title": "VFMODULE-Vloadbalancerms..vpkg..module-1",
754                     "properties": {
755                       "type": {
756                         "title": "Type",
757                         "type": "string",
758                         "default": "VFMODULE",
759                         "readOnly": "True"
760                       },
761                       "resourceID": {
762                         "title": "Resource ID",
763                         "type": "string",
764                         "default": "Vloadbalancerms..vpkg..module-1",
765                         "readOnly": "True"
766                       },
767                       "modelInvariantId": {
768                         "title": "Model Invariant Id (ModelInvariantUUID)",
769                         "type": "string",
770                         "default": "ca052563-eb92-4b5b-ad41-9111768ce043",
771                         "readOnly": "True"
772                       },
773                       "modelVersionId": {
774                         "title": "Model Version Id (ModelUUID)",
775                         "type": "string",
776                         "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
777                         "readOnly": "True"
778                       },
779                       "modelName": {
780                         "title": "Model Name",
781                         "type": "string",
782                         "default": "Vloadbalancerms..vpkg..module-1",
783                         "readOnly": "True"
784                       },
785                       "modelVersion": {
786                         "title": "Model Version",
787                         "type": "string",
788                         "default": "1",
789                         "readOnly": "True"
790                       },
791                       "modelCustomizationId": {
792                         "title": "Customization ID",
793                         "type": "string",
794                         "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
795                         "readOnly": "True"
796                       }
797                     }
798                   },
799                   {
800                     "title": "VFMODULE-Vloadbalancerms..vdns..module-3",
801                     "properties": {
802                       "type": {
803                         "title": "Type",
804                         "type": "string",
805                         "default": "VFMODULE",
806                         "readOnly": "True"
807                       },
808                       "resourceID": {
809                         "title": "Resource ID",
810                         "type": "string",
811                         "default": "Vloadbalancerms..vdns..module-3",
812                         "readOnly": "True"
813                       },
814                       "modelInvariantId": {
815                         "title": "Model Invariant Id (ModelInvariantUUID)",
816                         "type": "string",
817                         "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
818                         "readOnly": "True"
819                       },
820                       "modelVersionId": {
821                         "title": "Model Version Id (ModelUUID)",
822                         "type": "string",
823                         "default": "4fa73b49-8a6c-493e-816b-eb401567b720",
824                         "readOnly": "True"
825                       },
826                       "modelName": {
827                         "title": "Model Name",
828                         "type": "string",
829                         "default": "Vloadbalancerms..vdns..module-3",
830                         "readOnly": "True"
831                       },
832                       "modelVersion": {
833                         "title": "Model Version",
834                         "type": "string",
835                         "default": "1",
836                         "readOnly": "True"
837                       },
838                       "modelCustomizationId": {
839                         "title": "Customization ID",
840                         "type": "string",
841                         "default": "bafcdab0-801d-4d81-9ead-f464640a38b1",
842                         "readOnly": "True"
843                       }
844                     }
845                   },
846                   {
847                     "title": "VFMODULE-Vloadbalancerms..base_template..module-0",
848                     "properties": {
849                       "type": {
850                         "title": "Type",
851                         "type": "string",
852                         "default": "VFMODULE",
853                         "readOnly": "True"
854                       },
855                       "resourceID": {
856                         "title": "Resource ID",
857                         "type": "string",
858                         "default": "Vloadbalancerms..base_template..module-0",
859                         "readOnly": "True"
860                       },
861                       "modelInvariantId": {
862                         "title": "Model Invariant Id (ModelInvariantUUID)",
863                         "type": "string",
864                         "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
865                         "readOnly": "True"
866                       },
867                       "modelVersionId": {
868                         "title": "Model Version Id (ModelUUID)",
869                         "type": "string",
870                         "default": "63734409-f745-4e4d-a38b-131638a0edce",
871                         "readOnly": "True"
872                       },
873                       "modelName": {
874                         "title": "Model Name",
875                         "type": "string",
876                         "default": "Vloadbalancerms..base_template..module-0",
877                         "readOnly": "True"
878                       },
879                       "modelVersion": {
880                         "title": "Model Version",
881                         "type": "string",
882                         "default": "1",
883                         "readOnly": "True"
884                       },
885                       "modelCustomizationId": {
886                         "title": "Customization ID",
887                         "type": "string",
888                         "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
889                         "readOnly": "True"
890                       }
891                     }
892                   },
893                   {
894                     "title": "VFMODULE-Vloadbalancerms..vlb..module-2",
895                     "properties": {
896                       "type": {
897                         "title": "Type",
898                         "type": "string",
899                         "default": "VFMODULE",
900                         "readOnly": "True"
901                       },
902                       "resourceID": {
903                         "title": "Resource ID",
904                         "type": "string",
905                         "default": "Vloadbalancerms..vlb..module-2",
906                         "readOnly": "True"
907                       },
908                       "modelInvariantId": {
909                         "title": "Model Invariant Id (ModelInvariantUUID)",
910                         "type": "string",
911                         "default": "a772a1f4-0064-412c-833d-4749b15828dd",
912                         "readOnly": "True"
913                       },
914                       "modelVersionId": {
915                         "title": "Model Version Id (ModelUUID)",
916                         "type": "string",
917                         "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
918                         "readOnly": "True"
919                       },
920                       "modelName": {
921                         "title": "Model Name",
922                         "type": "string",
923                         "default": "Vloadbalancerms..vlb..module-2",
924                         "readOnly": "True"
925                       },
926                       "modelVersion": {
927                         "title": "Model Version",
928                         "type": "string",
929                         "default": "1",
930                         "readOnly": "True"
931                       },
932                       "modelCustomizationId": {
933                         "title": "Customization ID",
934                         "type": "string",
935                         "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
936                         "readOnly": "True"
937                       }
938                     }
939                   }
940                 ]
941               }
942             }
943           }
944         }
945       }
946     }
947   }
948 }