CLAMP-CDS integration to display all CDS actions for blueprint in CL
[clamp.git] / src / main / resources / clds / json-schema / operational_policies / operational_policy.json
1 {
2     "schema": {
3         "uniqueItems": "true",
4         "format": "tabs",
5         "type": "array",
6         "minItems": 1,
7         "maxItems": 1,
8         "title": "Operational policies",
9         "items": {
10             "type": "object",
11             "title": "Operational Policy Item",
12             "id": "operational_policy_item",
13             "headerTemplate": "{{self.name}}",
14             "required": [
15                 "name",
16                 "configurationsJson"
17             ],
18             "properties": {
19                 "name": {
20                     "type": "string",
21                     "title": "Operational policy name",
22                     "readOnly": "True"
23                 },
24                 "configurationsJson": {
25                     "type": "object",
26                     "title": "Configuration",
27                     "required": [
28                         "operational_policy",
29                         "guard_policies"
30                     ],
31                     "properties": {
32                         "operational_policy": {
33                             "type": "object",
34                             "title": "Related Parameters",
35                             "required": [
36                                 "controlLoop",
37                                 "policies"
38                             ],
39                             "properties": {
40                                 "controlLoop": {
41                                     "type": "object",
42                                     "title": "Control Loop details",
43                                     "required": [
44                                         "timeout",
45                                         "abatement",
46                                         "trigger_policy",
47                                         "controlLoopName"
48                                     ],
49                                     "properties": {
50                                         "timeout": {
51                                             "type": "string",
52                                             "title": "Overall Time Limit",
53                                             "default": "0",
54                                             "format": "number"
55                                         },
56                                         "abatement": {
57                                             "type": "string",
58                                             "title": "Abatement",
59                                             "enum": [
60                                                 "True",
61                                                 "False"
62                                             ]
63                                         },
64                                         "trigger_policy": {
65                                             "type": "string",
66                                             "title": "Policy Decision Entry"
67                                         },
68                                         "controlLoopName": {
69                                             "type": "string",
70                                             "title": "Control loop name",
71                                             "readOnly": "True"
72                                         }
73                                     }
74                                 },
75                                 "policies": {
76                                     "uniqueItems": "true",
77                                     "id": "policies_array",
78                                     "type": "array",
79                                     "title": "Policy Decision Tree",
80                                     "format": "tabs-top",
81                                     "items": {
82                                         "title": "Policy Decision",
83                                         "type": "object",
84                                         "id": "policy_item",
85                                         "headerTemplate": "{{self.id}} - {{self.recipe}}",
86                                         "format": "categories",
87                                         "basicCategoryTitle": "recipe",
88                                         "required": [
89                                             "id",
90                                             "retry",
91                                             "timeout",
92                                             "actor",
93                                             "success",
94                                             "failure",
95                                             "failure_timeout",
96                                             "failure_retries",
97                                             "failure_exception",
98                                             "failure_guard",
99                                             "target"
100                                         ],
101                                         "properties": {
102                                             "id": {
103                                                 "default": "Policy 1",
104                                                 "title": "Policy ID",
105                                                 "type": "string"
106                                             },
107                                             "retry": {
108                                                 "default": "0",
109                                                 "title": "Number of Retry",
110                                                 "type": "string",
111                                                 "format": "number"
112                                             },
113                                             "timeout": {
114                                                 "default": "0",
115                                                 "title": "Timeout",
116                                                 "type": "string",
117                                                 "format": "number"
118                                             },
119                                             "actor": {
120                                                 "type": "object",
121                                                 "title": "Actor",
122                                                 "anyOf": [
123                                                     {
124                                                         "title": "APPC",
125                                                         "properties": {
126                                                             "actor": {
127                                                                 "title": "actor",
128                                                                 "type": "string",
129                                                                 "default": "APPC",
130                                                                 "options": {
131                                                                     "hidden": true
132                                                                 }
133                                                             },
134                                                             "type": {
135                                                                 "title": "recipe",
136                                                                 "type": "string",
137                                                                 "default": "",
138                                                                 "enum": [
139                                                                     "Restart",
140                                                                     "Rebuild",
141                                                                     "Migrate",
142                                                                     "Health-Check",
143                                                                     "ModifyConfig"
144                                                                 ]
145                                                             },
146                                                             "payload": {
147                                                                 "title": "Payload (YAML)",
148                                                                 "type": "string",
149                                                                 "format": "textarea"
150                                                             }
151                                                         }
152                                                     },
153                                                     {
154                                                         "title": "SO",
155                                                         "properties": {
156                                                             "actor": {
157                                                                 "title": "actor",
158                                                                 "type": "string",
159                                                                 "default": "SO",
160                                                                 "options": {
161                                                                     "hidden": true
162                                                                 }
163                                                             },
164                                                             "type": {
165                                                                 "title": "recipe",
166                                                                 "type": "string",
167                                                                 "default": "",
168                                                                 "enum": [
169                                                                     "VF Module Create",
170                                                                     "VF Module Delete"
171                                                                 ]
172                                                             },
173                                                             "payload": {
174                                                                 "title": "Payload (YAML)",
175                                                                 "type": "string",
176                                                                 "format": "textarea"
177                                                             }
178                                                         }
179                                                     },
180                                                     {
181                                                         "title": "SDNC",
182                                                         "properties": {
183                                                             "actor": {
184                                                                 "title": "actor",
185                                                                 "type": "string",
186                                                                 "default": "SDNC",
187                                                                 "options": {
188                                                                     "hidden": true
189                                                                 }
190                                                             },
191                                                             "type": {
192                                                                 "title": "recipe",
193                                                                 "type": "string",
194                                                                 "default": "",
195                                                                 "enum": [
196                                                                     "Reroute",
197                                                                     "BandwidthOnDemand"
198                                                                 ]
199                                                             },
200                                                             "payload": {
201                                                                 "title": "Payload (YAML)",
202                                                                 "type": "string",
203                                                                 "format": "textarea"
204                                                             }
205                                                         }
206                                                     },
207                                                     {
208                                                         "title": "VFC",
209                                                         "properties": {
210                                                             "actor": {
211                                                                 "title": "actor",
212                                                                 "type": "string",
213                                                                 "default": "VFC",
214                                                                 "options": {
215                                                                     "hidden": true
216                                                                 }
217                                                             },
218                                                             "type": {
219                                                                 "title": "recipe",
220                                                                 "type": "string",
221                                                                 "required": [
222                                                                     "payload"
223                                                                 ],
224                                                                 "default": "",
225                                                                 "enum": [
226                                                                     "ModifyConfig"
227                                                                 ]
228                                                             },
229                                                             "payload": {
230                                                                 "title": "Payload (YAML)",
231                                                                 "type": "string",
232                                                                 "format": "textarea"
233                                                             }
234                                                         }
235                                                     },
236                                                     {
237                                                         "title": "CDS",
238                                                         "properties": {
239                                                             "actor": {
240                                                                 "title": "actor",
241                                                                 "type": "string",
242                                                                 "default": "CDS",
243                                                                 "options": {
244                                                                     "hidden": true
245                                                                 }
246                                                             },
247                                                             "type": {
248                                                                 "title": "recipe",
249                                                                 "type": "object",
250                                                                 "required": [
251                                                                     "payload"
252                                                                 ],
253                                                                 "anyOf": [
254                                                                     {
255                                                                         "title": "user-defined",
256                                                                         "properties": {
257                                                                             "type": {
258                                                                                 "title": "Payload (YAML)",
259                                                                                 "type": "string",
260                                                                                 "default" : "",
261                                                                                 "format" : "textarea"
262                                                                             }
263                                                                         }
264                                                                     }
265                                                                 ]
266                                                             }
267                                                         }
268                                                     }
269                                                 ]
270                                             },
271                                             "success": {
272                                                 "default": "final_success",
273                                                 "title": "When Success",
274                                                 "type": "string"
275                                             },
276                                             "failure": {
277                                                 "default": "final_failure",
278                                                 "title": "When Failure",
279                                                 "type": "string"
280                                             },
281                                             "failure_timeout": {
282                                                 "default": "final_failure_timeout",
283                                                 "title": "When Failure Timeout",
284                                                 "type": "string"
285                                             },
286                                             "failure_retries": {
287                                                 "default": "final_failure_retries",
288                                                 "title": "When Failure Retries",
289                                                 "type": "string"
290                                             },
291                                             "failure_exception": {
292                                                 "default": "final_failure_exception",
293                                                 "title": "When Failure Exception",
294                                                 "type": "string"
295                                             },
296                                             "failure_guard": {
297                                                 "default": "final_failure_guard",
298                                                 "title": "When Failure Guard",
299                                                 "type": "string"
300                                             },
301                                             "target": {
302                                                 "type": "object",
303                                                 "required": [
304                                                     "type",
305                                                     "resourceID"
306                                                 ],
307                                                 "anyOf": [
308                                                     {
309                                                         "title": "User Defined",
310                                                         "additionalProperties": "True",
311                                                         "properties": {
312                                                             "type": {
313                                                                 "title": "Target type",
314                                                                 "type": "string",
315                                                                 "default": "",
316                                                                 "enum": [
317                                                                     "VNF",
318                                                                     "VFMODULE",
319                                                                     "VM"
320                                                                 ]
321                                                             },
322                                                             "resourceID": {
323                                                                 "title": "Target type",
324                                                                 "type": "string",
325                                                                 "default": ""
326                                                             }
327                                                         }
328                                                     }
329                                                 ]
330                                             }
331                                         }
332                                     }
333                                 }
334                             }
335                         },
336                         "guard_policies": {
337                             "type": "array",
338                             "format": "tabs-top",
339                             "title": "Associated Guard policies",
340                             "items": {
341                                 "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}",
342                                 "anyOf": [
343                                     {
344                                         "title": "Guard MinMax",
345                                         "type": "object",
346                                         "properties": {
347                                             "policy-id": {
348                                                 "type": "string",
349                                                 "default": "guard.minmax.new",
350                                                 "pattern": "^(guard.minmax\\..*)$"
351                                             },
352                                             "content": {
353                                                 "properties": {
354                                                     "actor": {
355                                                         "type": "string",
356                                                         "enum": [
357                                                             "APPC",
358                                                             "SO",
359                                                             "VFC",
360                                                             "SDNC",
361                                                             "SDNR"
362                                                         ]
363                                                     },
364                                                     "recipe": {
365                                                         "type": "string",
366                                                         "enum": [
367                                                             "Restart",
368                                                             "Rebuild",
369                                                             "Migrate",
370                                                             "Health-Check",
371                                                             "ModifyConfig",
372                                                             "VF Module Create",
373                                                             "VF Module Delete",
374                                                             "Reroute"
375                                                         ]
376                                                     },
377                                                     "targets": {
378                                                         "type": "string",
379                                                         "default": ".*"
380                                                     },
381                                                     "clname": {
382                                                         "type": "string",
383                                                         "template": "{{loopName}}",
384                                                         "watch": {
385                                                             "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName"
386                                                         }
387                                                     },
388                                                     "guardActiveStart": {
389                                                         "type": "string",
390                                                         "default": "00:00:00Z"
391                                                     },
392                                                     "guardActiveEnd": {
393                                                         "type": "string",
394                                                         "default": "10:00:00Z"
395                                                     },
396                                                     "min": {
397                                                         "type": "string",
398                                                         "default": "0"
399                                                     },
400                                                     "max": {
401                                                         "type": "string",
402                                                         "default": "1"
403                                                     }
404                                                 }
405                                             }
406                                         }
407                                     },
408                                     {
409                                         "title": "Guard Frequency",
410                                         "type": "object",
411                                         "properties": {
412                                             "policy-id": {
413                                                 "type": "string",
414                                                 "default": "guard.frequency.new",
415                                                 "pattern": "^(guard.frequency\\..*)$"
416                                             },
417                                             "content": {
418                                                 "properties": {
419                                                     "actor": {
420                                                         "type": "string",
421                                                         "enum": [
422                                                             "APPC",
423                                                             "SO",
424                                                             "VFC",
425                                                             "SDNC",
426                                                             "SDNR"
427                                                         ]
428                                                     },
429                                                     "recipe": {
430                                                         "type": "string",
431                                                         "enum": [
432                                                             "Restart",
433                                                             "Rebuild",
434                                                             "Migrate",
435                                                             "Health-Check",
436                                                             "ModifyConfig",
437                                                             "VF Module Create",
438                                                             "VF Module Delete",
439                                                             "Reroute"
440                                                         ]
441                                                     },
442                                                     "targets": {
443                                                         "type": "string",
444                                                         "default": ".*"
445                                                     },
446                                                     "clname": {
447                                                         "type": "string",
448                                                         "template": "{{loopName}}",
449                                                         "watch": {
450                                                             "loopName": "operational_policy_item.configurationsJson.operational_policy.controlLoop.controlLoopName"
451                                                         }
452                                                     },
453                                                     "guardActiveStart": {
454                                                         "type": "string",
455                                                         "default": "00:00:00Z"
456                                                     },
457                                                     "guardActiveEnd": {
458                                                         "type": "string",
459                                                         "default": "10:00:00Z"
460                                                     },
461                                                     "limit": {
462                                                         "type": "string"
463                                                     },
464                                                     "timeWindow": {
465                                                         "type": "string"
466                                                     },
467                                                     "timeUnits": {
468                                                         "type": "string",
469                                                         "enum":["minute","hour","day","week","month","year"]
470                                                     }
471                                                 }
472                                             }
473                                         }
474                                     }
475                                 ]
476                             }
477                         }
478                     }
479                 }
480             }
481         }
482     }
483 }