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