Merge "Fix bug when adding op 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   ],
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                                       "template-prefix": {
284                                         "title": "template-prefix",
285                                         "type": "array"
286                                       },
287                                       "template-prefix-with-complex-type": {
288                                         "title": "template-prefix-with-complex-type",
289                                         "type": "array",
290                                         "items": {
291                                           "properties": {
292                                             "prefix-id": {
293                                               "title": "prefix-id",
294                                               "type": "string"
295                                             }
296                                           }
297                                         }
298                                       },
299                                       "private1-prefix-id": {
300                                         "title": "private1-prefix-id",
301                                         "type": "string"
302                                       }
303                                     }
304                                   }
305                                 }
306                               }
307                             }
308                           }
309                         ]
310                       }
311                     }
312                   }
313                 ]
314               },
315               "success": {
316                 "default": "final_success",
317                 "title": "When Success",
318                 "type": "string"
319               },
320               "failure": {
321                 "default": "final_failure",
322                 "title": "When Failure",
323                 "type": "string"
324               },
325               "failure_timeout": {
326                 "default": "final_failure_timeout",
327                 "title": "When Failure Timeout",
328                 "type": "string"
329               },
330               "failure_retries": {
331                 "default": "final_failure_retries",
332                 "title": "When Failure Retries",
333                 "type": "string"
334               },
335               "failure_exception": {
336                 "default": "final_failure_exception",
337                 "title": "When Failure Exception",
338                 "type": "string"
339               },
340               "failure_guard": {
341                 "default": "final_failure_guard",
342                 "title": "When Failure Guard",
343                 "type": "string"
344               },
345               "target": {
346                 "type": "object",
347                 "required": [
348                   "type",
349                   "resourceID"
350                 ],
351                 "anyOf": [
352                   {
353                     "title": "User Defined",
354                     "additionalProperties": "True",
355                     "properties": {
356                       "type": {
357                         "title": "Target type",
358                         "type": "string",
359                         "default": "",
360                         "enum": [
361                           "VNF",
362                           "VFMODULE",
363                           "VM"
364                         ]
365                       },
366                       "resourceID": {
367                         "title": "Target type",
368                         "type": "string",
369                         "default": ""
370                       }
371                     }
372                   },
373                   {
374                     "title": "VNF-vLoadBalancerMS 0",
375                     "properties": {
376                       "type": {
377                         "title": "Type",
378                         "type": "string",
379                         "default": "VNF",
380                         "readOnly": "True"
381                       },
382                       "resourceID": {
383                         "title": "Resource ID",
384                         "type": "string",
385                         "default": "vLoadBalancerMS",
386                         "readOnly": "True"
387                       }
388                     }
389                   },
390                   {
391                     "title": "VFMODULE-Vloadbalancerms..vpkg..module-1",
392                     "properties": {
393                       "type": {
394                         "title": "Type",
395                         "type": "string",
396                         "default": "VFMODULE",
397                         "readOnly": "True"
398                       },
399                       "resourceID": {
400                         "title": "Resource ID",
401                         "type": "string",
402                         "default": "Vloadbalancerms..vpkg..module-1",
403                         "readOnly": "True"
404                       },
405                       "modelInvariantId": {
406                         "title": "Model Invariant Id (ModelInvariantUUID)",
407                         "type": "string",
408                         "default": "ca052563-eb92-4b5b-ad41-9111768ce043",
409                         "readOnly": "True"
410                       },
411                       "modelVersionId": {
412                         "title": "Model Version Id (ModelUUID)",
413                         "type": "string",
414                         "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
415                         "readOnly": "True"
416                       },
417                       "modelName": {
418                         "title": "Model Name",
419                         "type": "string",
420                         "default": "Vloadbalancerms..vpkg..module-1",
421                         "readOnly": "True"
422                       },
423                       "modelVersion": {
424                         "title": "Model Version",
425                         "type": "string",
426                         "default": "1",
427                         "readOnly": "True"
428                       },
429                       "modelCustomizationId": {
430                         "title": "Customization ID",
431                         "type": "string",
432                         "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
433                         "readOnly": "True"
434                       }
435                     }
436                   },
437                   {
438                     "title": "VFMODULE-Vloadbalancerms..vdns..module-3",
439                     "properties": {
440                       "type": {
441                         "title": "Type",
442                         "type": "string",
443                         "default": "VFMODULE",
444                         "readOnly": "True"
445                       },
446                       "resourceID": {
447                         "title": "Resource ID",
448                         "type": "string",
449                         "default": "Vloadbalancerms..vdns..module-3",
450                         "readOnly": "True"
451                       },
452                       "modelInvariantId": {
453                         "title": "Model Invariant Id (ModelInvariantUUID)",
454                         "type": "string",
455                         "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
456                         "readOnly": "True"
457                       },
458                       "modelVersionId": {
459                         "title": "Model Version Id (ModelUUID)",
460                         "type": "string",
461                         "default": "4fa73b49-8a6c-493e-816b-eb401567b720",
462                         "readOnly": "True"
463                       },
464                       "modelName": {
465                         "title": "Model Name",
466                         "type": "string",
467                         "default": "Vloadbalancerms..vdns..module-3",
468                         "readOnly": "True"
469                       },
470                       "modelVersion": {
471                         "title": "Model Version",
472                         "type": "string",
473                         "default": "1",
474                         "readOnly": "True"
475                       },
476                       "modelCustomizationId": {
477                         "title": "Customization ID",
478                         "type": "string",
479                         "default": "bafcdab0-801d-4d81-9ead-f464640a38b1",
480                         "readOnly": "True"
481                       }
482                     }
483                   },
484                   {
485                     "title": "VFMODULE-Vloadbalancerms..base_template..module-0",
486                     "properties": {
487                       "type": {
488                         "title": "Type",
489                         "type": "string",
490                         "default": "VFMODULE",
491                         "readOnly": "True"
492                       },
493                       "resourceID": {
494                         "title": "Resource ID",
495                         "type": "string",
496                         "default": "Vloadbalancerms..base_template..module-0",
497                         "readOnly": "True"
498                       },
499                       "modelInvariantId": {
500                         "title": "Model Invariant Id (ModelInvariantUUID)",
501                         "type": "string",
502                         "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
503                         "readOnly": "True"
504                       },
505                       "modelVersionId": {
506                         "title": "Model Version Id (ModelUUID)",
507                         "type": "string",
508                         "default": "63734409-f745-4e4d-a38b-131638a0edce",
509                         "readOnly": "True"
510                       },
511                       "modelName": {
512                         "title": "Model Name",
513                         "type": "string",
514                         "default": "Vloadbalancerms..base_template..module-0",
515                         "readOnly": "True"
516                       },
517                       "modelVersion": {
518                         "title": "Model Version",
519                         "type": "string",
520                         "default": "1",
521                         "readOnly": "True"
522                       },
523                       "modelCustomizationId": {
524                         "title": "Customization ID",
525                         "type": "string",
526                         "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
527                         "readOnly": "True"
528                       }
529                     }
530                   },
531                   {
532                     "title": "VFMODULE-Vloadbalancerms..vlb..module-2",
533                     "properties": {
534                       "type": {
535                         "title": "Type",
536                         "type": "string",
537                         "default": "VFMODULE",
538                         "readOnly": "True"
539                       },
540                       "resourceID": {
541                         "title": "Resource ID",
542                         "type": "string",
543                         "default": "Vloadbalancerms..vlb..module-2",
544                         "readOnly": "True"
545                       },
546                       "modelInvariantId": {
547                         "title": "Model Invariant Id (ModelInvariantUUID)",
548                         "type": "string",
549                         "default": "a772a1f4-0064-412c-833d-4749b15828dd",
550                         "readOnly": "True"
551                       },
552                       "modelVersionId": {
553                         "title": "Model Version Id (ModelUUID)",
554                         "type": "string",
555                         "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
556                         "readOnly": "True"
557                       },
558                       "modelName": {
559                         "title": "Model Name",
560                         "type": "string",
561                         "default": "Vloadbalancerms..vlb..module-2",
562                         "readOnly": "True"
563                       },
564                       "modelVersion": {
565                         "title": "Model Version",
566                         "type": "string",
567                         "default": "1",
568                         "readOnly": "True"
569                       },
570                       "modelCustomizationId": {
571                         "title": "Customization ID",
572                         "type": "string",
573                         "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
574                         "readOnly": "True"
575                       }
576                     }
577                   }
578                 ]
579               }
580             }
581           }
582         }
583       }
584     }
585   }
586 }