929e29efa4a9e849a0df843873c48360866f95a0
[policy/models.git] / models-examples / src / main / resources / policies / vCPE.policies.optimization.input.tosca.json
1 {
2     "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
3     "topology_template": {
4         "policies": [
5             {
6                 "OSDF_CASABLANCA.Affinity_Default": {
7                     "type": "onap.policies.optimization.resource.AffinityPolicy",
8                     "version": "1.0.0",
9                     "type_version": "1.0.0",
10                     "metadata": {
11                         "policy-id": "OSDF_CASABLANCA.Affinity_Default",
12                         "policy-version": 1
13                     },
14                     "properties": {
15                         "scope": [],
16                         "services": [],
17                         "resources": [],
18                         "geography": [],
19                         "identity": "affinity_vCPE",
20                         "applicableResources": "any",
21                         "affinityProperties": {
22                             "qualifier": "same",
23                             "category": "complex"
24                         }
25                     }
26                 }
27             },
28             {
29                 "OSDF_CASABLANCA.Affinity_Default_US": {
30                     "type": "onap.policies.optimization.resource.AffinityPolicy",
31                     "version": "1.0.0",
32                     "type_version": "1.0.0",
33                     "metadata": {
34                         "policy-id": "OSDF_CASABLANCA.Affinity_Default_US",
35                         "policy-version": 1
36                     },
37                     "properties": {
38                         "scope": [],
39                         "services": [],
40                         "resources": [],
41                         "geography": [
42                             "US"
43                         ],
44                         "identity": "affinity_vCPE",
45                         "applicableResources": "any",
46                         "affinityProperties": {
47                             "qualifier": "same",
48                             "category": "complex"
49                         }
50                     }
51                 }
52             },
53             {
54                 "OSDF_CASABLANCA.Affinity_Default_vCPE_US_0": {
55                     "type": "onap.policies.optimization.resource.AffinityPolicy",
56                     "version": "1.0.0",
57                     "type_version": "1.0.0",
58                     "metadata": {
59                         "policy-id": "OSDF_CASABLANCA.Affinity_Default_vCPE_US_0",
60                         "policy-version": 1
61                     },
62                     "properties": {
63                         "scope": [],
64                         "services": [
65                             "vCPE"
66                         ],
67                         "resources": [],
68                         "geography": [
69                             "US"
70                         ],
71                         "identity": "affinity_vCPE",
72                         "applicableResources": "any",
73                         "affinityProperties": {
74                             "qualifier": "different",
75                             "category": "complex"
76                         }
77                     }
78                 }
79             },
80             {
81                 "OSDF_CASABLANCA.Affinity_vCPE_US_Gold_1": {
82                     "type": "onap.policies.optimization.resource.AffinityPolicy",
83                     "version": "1.0.0",
84                     "type_version": "1.0.0",
85                     "metadata": {
86                         "policy-id": "OSDF_CASABLANCA.Affinity_vCPE_1",
87                         "policy-version": 1
88                     },
89                     "properties": {
90                         "scope": [
91                             "gold"
92                         ],
93                         "services": [
94                             "vCPE"
95                         ],
96                         "resources": [
97                             "vGMuxInfra",
98                             "vG"
99                         ],
100                         "geography": [
101                             "US",
102                             "INTERNATIONAL"
103                         ],
104                         "identity": "affinity_vCPE",
105                         "applicableResources": "any",
106                         "affinityProperties": {
107                             "qualifier": "same",
108                             "category": "availabilityZone"
109                         }
110                     }
111                 }
112             },
113             {
114                 "OSDF_CASABLANCA.Affinity_vCPE_US_Platinum_1": {
115                     "type": "onap.policies.optimization.resource.AffinityPolicy",
116                     "version": "1.0.0",
117                     "type_version": "1.0.0",
118                     "metadata": {
119                         "policy-id": "OSDF_CASABLANCA.Affinity_vCPE_1",
120                         "policy-version": 1
121                     },
122                     "properties": {
123                         "scope": [
124                             "platinum"
125                         ],
126                         "services": [
127                             "vCPE"
128                         ],
129                         "resources": [
130                             "vGMuxInfra",
131                             "vG"
132                         ],
133                         "geography": [
134                             "US",
135                             "INTERNATIONAL"
136                         ],
137                         "identity": "affinity_vCPE",
138                         "applicableResources": "any",
139                         "affinityProperties": {
140                             "qualifier": "different",
141                             "category": "availabilityZone"
142                         }
143                     }
144                 }
145             },
146             {
147                 "OSDF_CASABLANCA.Capacity_vG_1": {
148                     "type": "onap.policies.optimization.resource.Vim_fit",
149                     "version": "1.0.0",
150                     "type_version": "1.0.0",
151                     "metadata": {
152                         "policy-id": "OSDF_CASABLANCA.Capacity_vG_1",
153                         "policy-version": 1
154                     },
155                     "properties": {
156                         "scope": [],
157                         "services": [
158                             "vCPE"
159                         ],
160                         "resources": [
161                             "vG"
162                         ],
163                         "geography": [
164                             "US",
165                             "INTERNATIONAL"
166                         ],
167                         "identity": "capacity_vG",
168                         "applicableResources": "any",
169                         "capacityProperty": {
170                             "controller": "multicloud",
171                             "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
172                         }
173                     }
174                 }
175             },
176             {
177                 "OSDF_CASABLANCA.Capacity_vG_2": {
178                     "type": "onap.policies.optimization.resource.Vim_fit",
179                     "version": "1.0.0",
180                     "type_version": "1.0.0",
181                     "metadata": {
182                         "policy-id": "OSDF_CASABLANCA.Capacity_vG_2",
183                         "policy-version": 1
184                     },
185                     "properties": {
186                         "scope": [],
187                         "services": [
188                             "vCPE"
189                         ],
190                         "resources": [
191                             "vG"
192                         ],
193                         "geography": [
194                             "US",
195                             "INTERNATIONAL"
196                         ],
197                         "identity": "capacity_vG",
198                         "applicableResources": "any",
199                         "capacityProperty": {
200                             "controller": "multicloud",
201                             "request": "{\"vCPU\": 15, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"MB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
202                         }
203                     }
204                 }
205             },
206             {
207                 "OSDF_CASABLANCA.Distance_vG_1": {
208                     "type": "onap.policies.optimization.resource.DistancePolicy",
209                     "version": "1.0.0",
210                     "type_version": "1.0.0",
211                     "metadata": {
212                         "policy-id": "OSDF_CASABLANCA.Distance_vG_1",
213                         "policy-version": 1
214                     },
215                     "properties": {
216                         "scope": [
217                             "platinum"
218                         ],
219                         "services": [
220                             "vCPE"
221                         ],
222                         "resources": [
223                             "vG"
224                         ],
225                         "geography": [
226                             "US",
227                             "INTERNATIONAL"
228                         ],
229                         "identity": "distance-vG",
230                         "applicableResources": "any",
231                         "distanceProperties": {
232                             "locationInfo": "customer_loc",
233                             "distance": {
234                                 "value": 1500,
235                                 "operator": "<",
236                                 "unit": "km"
237                             }
238                         }
239                     }
240                 }
241             },
242             {
243                 "OSDF_CASABLANCA.hpa_policy_Default": {
244                     "type": "onap.policies.optimization.resource.HpaPolicy",
245                     "version": "1.0.0",
246                     "type_version": "1.0.0",
247                     "metadata": {
248                         "policy-id": "OSDF_CASABLANCA.hpa_policy_Default",
249                         "policy-version": 1
250                     },
251                     "properties": {
252                         "scope": [],
253                         "services": [],
254                         "resources": [],
255                         "geography": [],
256                         "identity": "hpa-vG",
257                         "flavorFeatures": [
258                             {
259                                 "id": "vg_1",
260                                 "type": "vnfc",
261                                 "directives": [
262                                     {
263                                         "type": "flavor_directives",
264                                         "attributes": [
265                                             {
266                                                 "attribute_name": "flavor_label_vm_01",
267                                                 "attribute_value": ""
268                                             }
269                                         ]
270                                     }
271                                 ],
272                                 "flavorProperties": [
273                                     {
274                                         "hpa-feature": "basicCapabilities",
275                                         "mandatory": true,
276                                         "architecture": "generic",
277                                         "directives": [],
278                                         "hpa-feature-attributes": [
279                                             {
280                                                 "hpa-attribute-key": "numVirtualCpu",
281                                                 "hpa-attribute-value": 8,
282                                                 "operator": [
283                                                     ">="
284                                                 ],
285                                                 "unit": ""
286                                             },
287                                             {
288                                                 "hpa-attribute-key": "virtualMemSize",
289                                                 "hpa-attribute-value": 6,
290                                                 "operator": [
291                                                     "<="
292                                                 ],
293                                                 "unit": ""
294                                             }
295                                         ]
296                                     },
297                                     {
298                                         "hpa-feature": "ovsDpdk",
299                                         "mandatory": false,
300                                         "architecture": "generic",
301                                         "directives": [],
302                                         "hpa-feature-attributes": [
303                                             {
304                                                 "hpa-attribute-key": "dataProcessingAccelerationLibrary",
305                                                 "hpa-attribute-value": "ovsDpdk_version",
306                                                 "operator": [
307                                                     "="
308                                                 ],
309                                                 "unit": ""
310                                             }
311                                         ]
312                                     }
313                                 ]
314                             }
315                         ]
316                     }
317                 }
318             },
319             {
320                 "OSDF_CASABLANCA.hpa_policy_vG_1": {
321                     "type": "onap.policies.optimization.resource.HpaPolicy",
322                     "version": "1.0.0",
323                     "type_version": "1.0.0",
324                     "metadata": {
325                         "policy-id": "OSDF_CASABLANCA.hpa_policy_vG_1",
326                         "policy-version": 1
327                     },
328                     "properties": {
329                         "scope": [],
330                         "services": [
331                             "vCPE",
332                             "vOtherService"
333                         ],
334                         "resources": [
335                             "vG"
336                         ],
337                         "geography": [],
338                         "identity": "hpa-vG",
339                         "flavorFeatures": [
340                             {
341                                 "id": "vg_1",
342                                 "type": "vnfc",
343                                 "directives": [
344                                     {
345                                         "type": "flavor_directives",
346                                         "attributes": [
347                                             {
348                                                 "attribute_name": "flavor_label_vm_01",
349                                                 "attribute_value": ""
350                                             }
351                                         ]
352                                     }
353                                 ],
354                                 "flavorProperties": [
355                                     {
356                                         "hpa-feature": "basicCapabilities",
357                                         "mandatory": true,
358                                         "architecture": "generic",
359                                         "directives": [],
360                                         "hpa-feature-attributes": [
361                                             {
362                                                 "hpa-attribute-key": "numVirtualCpu",
363                                                 "hpa-attribute-value": 6,
364                                                 "operator": [
365                                                     ">="
366                                                 ],
367                                                 "unit": ""
368                                             },
369                                             {
370                                                 "hpa-attribute-key": "virtualMemSize",
371                                                 "hpa-attribute-value": 4,
372                                                 "operator": [
373                                                     "<="
374                                                 ],
375                                                 "unit": ""
376                                             }
377                                         ]
378                                     },
379                                     {
380                                         "hpa-feature": "ovsDpdk",
381                                         "mandatory": false,
382                                         "architecture": "generic",
383                                         "directives": [],
384                                         "hpa-feature-attributes": [
385                                             {
386                                                 "hpa-attribute-key": "dataProcessingAccelerationLibrary",
387                                                 "hpa-attribute-value": "ovsDpdk_version",
388                                                 "operator": [
389                                                     "="
390                                                 ],
391                                                 "unit": ""
392                                             }
393                                         ]
394                                     }
395                                 ]
396                             }
397                         ]
398                     }
399                 }
400             },
401             {
402                 "OSDF_CASABLANCA.queryPolicy_vCPE": {
403                     "type": "onap.policies.optimization.service.QueryPolicy",
404                     "version": "1.0.0",
405                     "type_version": "1.0.0",
406                     "metadata": {
407                         "policy-id": "OSDF_CASABLANCA.queryPolicy_vCPE",
408                         "policy-version": 1
409                     },
410                     "properties": {
411                         "scope": [],
412                         "services": [
413                             "vCPE"
414                         ],
415                         "geography": [
416                             "US",
417                             "INTERNATIONAL"
418                         ],
419                         "identity": "vCPE_Query_Policy",
420                         "queryProperties": [
421                             {
422                                 "attribute": "locationId",
423                                 "attribute_location": "customerLocation",
424                                 "value": ""
425                             },
426                             {
427                                 "attribute": "id",
428                                 "attribute_location": "vpnInfo.vpnId",
429                                 "value": ""
430                             },
431                             {
432                                 "attribute": "upstreamBW",
433                                 "attribute_location": "vpnInfo.upstreamBW",
434                                 "value": ""
435                             },
436                             {
437                                 "attribute": "customerLatitude",
438                                 "attribute_location": "customerLatitude",
439                                 "value": 1.1
440                             },
441                             {
442                                 "attribute": "customerLongitude",
443                                 "attribute_location": "customerLongitude",
444                                 "value": 2.2
445                             }
446                         ]
447                     }
448                 }
449             },
450             {
451                 "OSDF_CASABLANCA.SubscriberPolicy_v1": {
452                     "type": "onap.policies.optimization.service.SubscriberPolicy",
453                     "version": "1.0.0",
454                     "type_version": "1.0.0",
455                     "metadata": {
456                         "policy-id": "OSDF_CASABLANCA.SubscriberPolicy_v1",
457                         "policy-version": 1
458                     },
459                     "properties": {
460                         "scope": [],
461                         "services": [
462                             "vCPE"
463                         ],
464                         "identity": "subscriber_vCPE",
465                         "subscriberProperties": {
466                             "subscriberName": [
467                                 "subscriber_x",
468                                 "subscriber_y"
469                             ],
470                             "subscriberRole": [
471                                 "platinum"
472                             ],
473                             "provStatus": [
474                                 "CAPPED"
475                             ]
476                         }
477                     }
478                 }
479             },
480             {
481                 "OSDF_CASABLANCA.SubscriberPolicy_v2": {
482                     "type": "onap.policies.optimization.service.SubscriberPolicy",
483                     "version": "1.0.0",
484                     "type_version": "1.0.0",
485                     "metadata": {
486                         "policy-id": "OSDF_CASABLANCA.SubscriberPolicy_v2",
487                         "policy-version": 1
488                     },
489                     "properties": {
490                         "scope": [],
491                         "services": [
492                             "vCPE"
493                         ],
494                         "identity": "subscriber_vCPE",
495                         "subscriberProperties": {
496                             "subscriberName": [
497                                 "subscriber_a",
498                                 "subscriber_b"
499                             ],
500                             "subscriberRole": [
501                                 "gold"
502                             ],
503                             "provStatus": [
504                                 "CAPPED"
505                             ]
506                         }
507                     }
508                 }
509             },
510             {
511                 "OSDF_CASABLANCA.vnfPolicy_vG": {
512                     "type": "onap.policies.optimization.resource.VnfPolicy",
513                     "version": "1.0.0",
514                     "type_version": "1.0.0",
515                     "metadata": {
516                         "policy-id": "OSDF_CASABLANCA.vnfPolicy_vG",
517                         "policy-version": 1
518                     },
519                     "properties": {
520                         "scope": [],
521                         "services": [
522                             "vCPE"
523                         ],
524                         "resources": [
525                             "vG"
526                         ],
527                         "geography": [
528                             "US",
529                             "INTERNATIONAL"
530                         ],
531                         "identity": "vnf_vG",
532                         "applicableResources": "any",
533                         "vnfProperties": [
534                             {
535                                 "inventoryProvider": "aai",
536                                 "serviceType": "",
537                                 "inventoryType": "cloudRegionId",
538                                 "customerId": ""
539                             }
540                         ]
541                     }
542                 }
543             }
544         ]
545     }
546 }