f893158b8f942a6d34b5249be08dce5f737a59cd
[policy/models.git] / models-examples / src / main / resources / policies / vCPE.policies.optimization.input.tosca.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 topology_template:
3   policies:
4     -
5         OSDF_CASABLANCA.Affinity_Default:
6             type: onap.policies.optimization.resource.AffinityPolicy
7             version: 1.0.0
8             type_version: 1.0.0
9             metadata:
10                 policy-id: OSDF_CASABLANCA.Affinity_Default
11                 policy-version: 1
12             properties:
13                 scope: []
14                 services: []
15                 resources: []
16                 geography: []
17                 identity: affinity_vCPE
18                 applicableResources: any
19                 affinityProperties:
20                     qualifier: same
21                     category: complex
22     -
23         OSDF_CASABLANCA.Affinity_Default_US:
24             type: onap.policies.optimization.resource.AffinityPolicy
25             version: 1.0.0
26             type_version: 1.0.0
27             metadata:
28                 policy-id: OSDF_CASABLANCA.Affinity_Default_US
29                 policy-version: 1
30             properties:
31                 scope: []
32                 services: []
33                 resources: []
34                 geography: [US]
35                 identity: affinity_vCPE
36                 applicableResources: any
37                 affinityProperties:
38                     qualifier: same
39                     category: complex
40     -
41         OSDF_CASABLANCA.Affinity_Default_vCPE_US_0:
42             type: onap.policies.optimization.resource.AffinityPolicy
43             version: 1.0.0
44             type_version: 1.0.0
45             metadata:
46                 policy-id: OSDF_CASABLANCA.Affinity_Default_vCPE_US_0
47                 policy-version: 1
48             properties:
49                 scope: []
50                 services: [vCPE]
51                 resources: []
52                 geography: [US]
53                 identity: affinity_vCPE
54                 applicableResources: any
55                 affinityProperties:
56                     qualifier: different
57                     category: complex
58     -
59         OSDF_CASABLANCA.Affinity_vCPE_US_Gold_1:
60             type: onap.policies.optimization.resource.AffinityPolicy
61             version: 1.0.0
62             type_version: 1.0.0
63             metadata:
64                 policy-id: OSDF_CASABLANCA.Affinity_vCPE_1
65                 policy-version: 1
66             properties:
67                 scope: [gold]
68                 services: [vCPE]
69                 resources: [vGMuxInfra, vG]
70                 geography: [US, INTERNATIONAL]
71                 identity: affinity_vCPE
72                 applicableResources: any
73                 affinityProperties:
74                     qualifier: same
75                     category: availabilityZone
76     -
77         OSDF_CASABLANCA.Affinity_vCPE_US_Platinum_1:
78             type: onap.policies.optimization.resource.AffinityPolicy
79             version: 1.0.0
80             type_version: 1.0.0
81             metadata:
82                 policy-id: OSDF_CASABLANCA.Affinity_vCPE_1
83                 policy-version: 1
84             properties:
85                 scope: [platinum]
86                 services: [vCPE]
87                 resources: [vGMuxInfra, vG]
88                 geography: [US, INTERNATIONAL]
89                 identity: affinity_vCPE
90                 applicableResources: any
91                 affinityProperties:
92                     qualifier: different
93                     category: availabilityZone
94     -
95         OSDF_CASABLANCA.Capacity_vG_1:
96             type: onap.policies.optimization.resource.Vim_fit
97             version: 1.0.0
98             type_version: 1.0.0
99             metadata:
100                 policy-id: OSDF_CASABLANCA.Capacity_vG_1
101                 policy-version: 1
102             properties:
103                 scope: []
104                 services: [vCPE]
105                 resources: [vG]
106                 geography: [US, INTERNATIONAL]
107                 identity: capacity_vG
108                 applicableResources: any
109                 capacityProperty:
110                    controller: multicloud
111                    request: "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
112     -
113         OSDF_CASABLANCA.Capacity_vG_2:
114             type: onap.policies.optimization.resource.Vim_fit
115             version: 1.0.0
116             type_version: 1.0.0
117             metadata:
118                 policy-id: OSDF_CASABLANCA.Capacity_vG_2
119                 policy-version: 1
120             properties:
121                 scope: []
122                 services: [vCPE]
123                 resources: [vG]
124                 geography: [US, INTERNATIONAL]
125                 identity: capacity_vG
126                 applicableResources: any
127                 capacityProperty:
128                    controller: multicloud
129                    request: "{\"vCPU\": 15, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"MB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
130     -
131         OSDF_CASABLANCA.Distance_vG_1:
132             type: onap.policies.optimization.resource.DistancePolicy
133             version: 1.0.0
134             type_version: 1.0.0
135             metadata:
136                 policy-id: OSDF_CASABLANCA.Distance_vG_1
137                 policy-version: 1
138             properties:
139                 scope: [platinum]
140                 services: [vCPE]
141                 resources: [vG]
142                 geography: [US, INTERNATIONAL]
143                 identity: distance-vG
144                 applicableResources: any
145                 distanceProperties:
146                     locationInfo: customer_loc
147                     distance:
148                         value: 1500
149                         operator: "<"
150                         unit: km
151     -
152         OSDF_CASABLANCA.hpa_policy_Default:
153             type: onap.policies.optimization.resource.HpaPolicy
154             version: 1.0.0
155             type_version: 1.0.0
156             metadata:
157                 policy-id: OSDF_CASABLANCA.hpa_policy_Default
158                 policy-version: 1
159             properties:
160                 scope: []
161                 services: []
162                 resources: []
163                 geography: []
164                 identity: hpa-vG
165                 flavorFeatures:
166                     -
167                          id: vg_1
168                          type: vnfc
169                          directives:
170                              -    type: flavor_directives
171                                   attributes:
172                                       -    attribute_name: flavor_label_vm_01
173                                            attribute_value: ""
174                          flavorProperties:
175                              -
176                                   hpa-feature: basicCapabilities
177                                   mandatory: True
178                                   architecture: generic
179                                   directives: []
180                                   hpa-feature-attributes:
181                                       -    hpa-attribute-key: numVirtualCpu
182                                            hpa-attribute-value: 8
183                                            operator: ['>=']
184                                            unit: ""
185                                       -    hpa-attribute-key: virtualMemSize
186                                            hpa-attribute-value: 6
187                                            operator: ['<=']
188                                            unit: ""
189                              -
190                                   hpa-feature: ovsDpdk
191                                   mandatory: False
192                                   architecture: generic
193                                   directives: []
194                                   hpa-feature-attributes:
195                                       -    hpa-attribute-key: dataProcessingAccelerationLibrary
196                                            hpa-attribute-value: ovsDpdk_version
197                                            operator: [=]
198                                            unit: ""
199     -
200         OSDF_CASABLANCA.hpa_policy_vG_1:
201             type: onap.policies.optimization.resource.HpaPolicy
202             version: 1.0.0
203             type_version: 1.0.0
204             metadata:
205                 policy-id: OSDF_CASABLANCA.hpa_policy_vG_1
206                 policy-version: 1
207             properties:
208                 scope: []
209                 services: [vCPE, vOtherService]
210                 resources: [vG]
211                 geography: []
212                 identity: hpa-vG
213                 flavorFeatures:
214                     -
215                          id: vg_1
216                          type: vnfc
217                          directives:
218                              -    type: flavor_directives
219                                   attributes:
220                                       -    attribute_name: flavor_label_vm_01
221                                            attribute_value: ""
222                          flavorProperties:
223                              -
224                                   hpa-feature: basicCapabilities
225                                   mandatory: True
226                                   architecture: generic
227                                   directives: []
228                                   hpa-feature-attributes:
229                                       -    hpa-attribute-key: numVirtualCpu
230                                            hpa-attribute-value: 6
231                                            operator: ['>=']
232                                            unit: ""
233                                       -    hpa-attribute-key: virtualMemSize
234                                            hpa-attribute-value: 4
235                                            operator: ['<=']
236                                            unit: ""
237                              -
238                                   hpa-feature: ovsDpdk
239                                   mandatory: False
240                                   architecture: generic
241                                   directives: []
242                                   hpa-feature-attributes:
243                                       -    hpa-attribute-key: dataProcessingAccelerationLibrary
244                                            hpa-attribute-value: ovsDpdk_version
245                                            operator: [=]
246                                            unit: ""
247     -
248         OSDF_CASABLANCA.queryPolicy_vCPE:
249             type: onap.policies.optimization.service.QueryPolicy
250             version: 1.0.0
251             type_version: 1.0.0
252             metadata:
253                 policy-id: OSDF_CASABLANCA.queryPolicy_vCPE
254                 policy-version: 1
255             properties:
256                 scope: []
257                 services: [vCPE]
258                 geography: [US, INTERNATIONAL]
259                 identity: vCPE_Query_Policy
260                 queryProperties:
261                     -
262                         attribute: locationId
263                         attribute_location: customerLocation
264                         value: ""
265                     -
266                         attribute: id
267                         attribute_location: "vpnInfo.vpnId"
268                         value: ""
269                     -
270                         attribute: upstreamBW
271                         attribute_location: "vpnInfo.upstreamBW"
272                         value: ""
273                     -
274                         attribute: customerLatitude
275                         attribute_location: customerLatitude
276                         value: 1.1
277                     - 
278                         attribute: customerLongitude
279                         attribute_location: customerLongitude
280                         value: 2.2
281     -
282         OSDF_CASABLANCA.SubscriberPolicy_v1:
283             type: onap.policies.optimization.service.SubscriberPolicy
284             version: 1.0.0
285             type_version: 1.0.0
286             metadata:
287                 policy-id: OSDF_CASABLANCA.SubscriberPolicy_v1
288                 policy-version: 1
289             properties:
290                 scope: []
291                 services: [vCPE]
292                 identity: subscriber_vCPE
293                 subscriberProperties:
294                     subscriberName: [subscriber_x, subscriber_y]
295                     subscriberRole: [platinum]
296                     provStatus: [CAPPED]
297     -
298         OSDF_CASABLANCA.SubscriberPolicy_v2:
299             type: onap.policies.optimization.service.SubscriberPolicy
300             version: 1.0.0
301             type_version: 1.0.0
302             metadata:
303                 policy-id: OSDF_CASABLANCA.SubscriberPolicy_v2
304                 policy-version: 1
305             properties:
306                 scope: []
307                 services: [vCPE]
308                 identity: subscriber_vCPE
309                 subscriberProperties:
310                     subscriberName: [subscriber_a, subscriber_b]
311                     subscriberRole: [gold]
312                     provStatus: [CAPPED]
313     -
314         OSDF_CASABLANCA.vnfPolicy_vG:
315             type: onap.policies.optimization.resource.VnfPolicy
316             version: 1.0.0
317             type_version: 1.0.0
318             metadata:
319                 policy-id: OSDF_CASABLANCA.vnfPolicy_vG
320                 policy-version: 1
321             properties:
322                 scope: []
323                 services: [vCPE]
324                 resources: [vG]
325                 geography: [US, INTERNATIONAL]
326                 identity: vnf_vG
327                 applicableResources: any
328                 vnfProperties:
329                     -
330                         inventoryProvider: aai
331                         serviceType: ""
332                         inventoryType: cloudRegionId
333                         customerId: ""