Integrate using Policy Type to find Matchable
[policy/xacml-pdp.git] / applications / optimization / src / test / resources / 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.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: [US]
17                 identity: affinity_vCPE
18                 applicableResources: any
19                 affinityProperties:
20                     qualifier: same
21                     category: complex
22     -
23         OSDF_CASABLANCA.Affinity_vCPE_0:
24             type: onap.policies.optimization.AffinityPolicy
25             version: 1.0.0
26             type_version: 1.0.0
27             metadata:
28                 policy-id: OSDF_CASABLANCA.Affinity_vCPE_0
29                 policy-version: 1
30             properties:
31                 scope: []
32                 services: [vCPE]
33                 resources: []
34                 geography: [US]
35                 identity: affinity_vCPE
36                 applicableResources: any
37                 affinityProperties:
38                     qualifier: different
39                     category: complex
40     -
41         OSDF_CASABLANCA.Affinity_vCPE_1:
42             type: onap.policies.optimization.AffinityPolicy
43             version: 1.0.0
44             type_version: 1.0.0
45             metadata:
46                 policy-id: OSDF_CASABLANCA.Affinity_vCPE_1
47                 policy-version: 1
48             properties:
49                 scope: [gold, platinum]
50                 services: [vCPE]
51                 resources: [vGMuxInfra, vG]
52                 geography: [US, INTERNATIONAL]
53                 identity: affinity_vCPE
54                 applicableResources: any
55                 affinityProperties:
56                     qualifier: same
57                     category: availabilityZone
58     -
59         OSDF_CASABLANCA.Capacity_vG_1:
60             type: onap.policies.optimization.Vim_fit
61             version: 1.0.0
62             type_version: 1.0.0
63             metadata:
64                 policy-id: OSDF_CASABLANCA.Capacity_vG_1
65                 policy-version: 1
66             properties:
67                 scope: []
68                 services: [vCPE]
69                 resources: [vG]
70                 geography: [US, INTERNATIONAL]
71                 identity: capacity_vG
72                 applicableResources: any
73                 capacityProperty:
74                    controller: multicloud
75                    request: "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
76     -
77         OSDF_CASABLANCA.Distance_vG_1:
78             type: onap.policies.optimization.DistancePolicy
79             version: 1.0.0
80             type_version: 1.0.0
81             metadata:
82                 policy-id: OSDF_CASABLANCA.Distance_vG_1
83                 policy-version: 1
84             properties:
85                 scope: [platinum]
86                 services: [vCPE]
87                 resources: [vG]
88                 geography: [US, INTERNATIONAL]
89                 identity: distance-vG
90                 applicableResources: any
91                 distanceProperties:
92                     locationInfo: customer_loc
93                     distance:
94                         value: 1500
95                         operator: "<"
96                         unit: km
97     -
98         OSDF_CASABLANCA.hpa_policy_vG_1:
99             type: onap.policies.optimization.HpaPolicy
100             version: 1.0.0
101             type_version: 1.0.0
102             metadata:
103                 policy-id: OSDF_CASABLANCA.hpa_policy_vG_1
104                 policy-version: 1
105             properties:
106                 scope: []
107                 services: [vCPE]
108                 resources: [vG]
109                 geography: []
110                 identity: hpa-vG
111                 flavorFeatures:
112                     -
113                          id: vg_1
114                          type: vnfc
115                          directives:
116                              -    type: flavor_directives
117                                   attributes:
118                                       -    attribute_name: flavor_label_vm_01
119                                            attribute_value: ""
120                          flavorProperties:
121                              -
122                                   hpa-feature: basicCapabilities
123                                   mandatory: True
124                                   architecture: generic
125                                   directives: []
126                                   hpa-feature-attributes:
127                                       -    hpa-attribute-key: numVirtualCpu
128                                            hpa-attribute-value: 6
129                                            operator: ['>=']
130                                            unit: ""
131                                       -    hpa-attribute-key: virtualMemSize
132                                            hpa-attribute-value: 4
133                                            operator: ['<=']
134                                            unit: ""
135                              -
136                                   hpa-feature: ovsDpdk
137                                   mandatory: False
138                                   architecture: generic
139                                   directives: []
140                                   hpa-feature-attributes:
141                                       -    hpa-attribute-key: dataProcessingAccelerationLibrary
142                                            hpa-attribute-value: ovsDpdk_version
143                                            operator: [=]
144                                            unit: ""
145     -
146         OSDF_CASABLANCA.queryPolicy_vCPE:
147             type: onap.policies.optimization.QueryPolicy
148             version: 1.0.0
149             type_version: 1.0.0
150             metadata:
151                 policy-id: OSDF_CASABLANCA.queryPolicy_vCPE
152                 policy-version: 1
153             properties:
154                 scope: []
155                 services: [vCPE]
156                 resources: [vGMuxInfra, vG]
157                 geography: [US, INTERNATIONAL]
158                 identity: vCPE_Query_Policy
159                 queryProperties:
160                     -
161                         attribute: locationId
162                         attribute_location: customerLocation
163                         value: ""
164                     -
165                         attribute: id
166                         attribute_location: "vpnInfo.vpnId"
167                         value: ""
168                     -
169                         attribute: upstreamBW
170                         attribute_location: "vpnInfo.upstreamBW"
171                         value: ""
172                     -
173                         attribute: customerLatitude
174                         attribute_location: customerLatitude
175                         value: 1.1
176                     - 
177                         attribute: customerLongitude
178                         attribute_location: customerLongitude
179                         value: 2.2
180     -
181         OSDF_CASABLANCA.SubscriberPolicy_v1:
182             type: onap.policies.optimization.SubscriberPolicy
183             version: 1.0.0
184             type_version: 1.0.0
185             metadata:
186                 policy-id: OSDF_CASABLANCA.SubscriberPolicy_v1
187                 policy-version: 1
188             properties:
189                 scope: []
190                 services: [vCPE]
191                 identity: subscriber_vCPE
192                 properties:
193                     subscriberName: [subscriber_x, subscriber_y]
194                     subscriberRole: [platinum]
195                     provStatus: [CAPPED]
196     -
197         OSDF_CASABLANCA.SubscriberPolicy_v2:
198             type: onap.policies.optimization.SubscriberPolicy
199             version: 1.0.0
200             type_version: 1.0.0
201             metadata:
202                 policy-id: OSDF_CASABLANCA.SubscriberPolicy_v2
203                 policy-version: 1
204             properties:
205                 scope: []
206                 services: [vCPE]
207                 identity: subscriber_vCPE
208                 properties:
209                     subscriberName: [subscriber_a, subscriber_b]
210                     subscriberRole: [gold]
211                     provStatus: [CAPPED]
212     -
213         OSDF_CASABLANCA.vnfPolicy_vG:
214             type: onap.policies.optimization.VnfPolicy
215             version: 1.0.0
216             type_version: 1.0.0
217             metadata:
218                 policy-id: OSDF_CASABLANCA.vnfPolicy_vG
219                 policy-version: 1
220             properties:
221                 scope: []
222                 services: [vCPE]
223                 resources: [vG]
224                 geography: [US, INTERNATIONAL]
225                 identity: vnf_vG
226                 applicableResources: any
227                 vnfProperties:
228                     -
229                         inventoryProvider: aai
230                         serviceType: ""
231                         inventoryType: cloudRegionId
232                         customerId: ""