21985776badbae745cdf9af872039f9fcea337dc
[integration/csit.git] / tests / optf-has / has / data / plan_with_hpa.json
1 {
2    "name":"vCPE-with-HPA",
3    "template":{
4       "homing_template_version":"2017-10-10",
5       "parameters":{
6          "service_name":"Residential vCPE",
7          "service_id":"vcpe_service_id",
8          "customer_lat":45.395968,
9          "customer_long":-71.135344,
10          "REQUIRED_MEM":4,
11          "REQUIRED_DISK":100,
12          "pnf_id":"some_pnf_id"
13       },
14       "locations":{
15          "customer_loc":{
16             "latitude":{
17                "get_param":"customer_lat"
18             },
19             "longitude":{
20                "get_param":"customer_long"
21             }
22          }
23       },
24       "demands":{
25          "vG":[
26             {
27                "inventory_provider":"aai",
28                "inventory_type":"cloud"
29             }
30          ]
31       },
32       "constraints":{
33         "constraint_vg_customer":{
34             "type":"distance_to_location",
35             "demands":[
36                "vG"
37             ],
38             "properties":{
39                "distance":"< 100 km",
40                "location":"customer_loc"
41             }
42          },
43         "hpa_constraint":{
44             "type":"hpa",
45             "demands":[
46                "vG"
47             ],
48             "properties":{
49                "evaluate":[
50                   {
51                      "id":"vg_1",
52                      "type":"vnfc",
53                      "directives":[
54                          {
55                             "type": "flavor_directives",
56                             "attributes":[
57                                  {
58                                     "attribute_name":"flavor_label_1",
59                                     "attribute_value":""
60                                  }
61                             ]
62                          }
63                      ],
64                      "flavorProperties":[
65                         {
66                            "hpa-feature":"basicCapabilities",
67                            "hpa-version":"v1",
68                            "architecture":"generic",
69                            "mandatory": "False",
70                            "score": "5",
71                            "directives": [],
72                            "hpa-feature-attributes":[
73                               {
74                                  "hpa-attribute-key":"numVirtualCpu",
75                                  "hpa-attribute-value":"4",
76                                  "operator":">="
77                               },
78                               {
79                                  "hpa-attribute-key":"virtualMemSize",
80                                  "hpa-attribute-value":"4",
81                                  "operator":">=",
82                                  "unit":"GB"
83                               }
84                            ]
85                         },
86                         {
87                            "hpa-feature":"numa",
88                            "hpa-version":"v1",
89                            "architecture":"generic",
90                            "mandatory": "False",
91                            "score": "5",
92                            "directives": [],
93                            "hpa-feature-attributes":[
94                               {
95                                  "hpa-attribute-key":"numaNodes",
96                                  "hpa-attribute-value":"2",
97                                  "operator":"="
98                               },
99                               {
100                                  "hpa-attribute-key":"numaCpu-0",
101                                  "hpa-attribute-value":"2",
102                                  "operator":"="
103                               },
104                               {
105                                  "hpa-attribute-key":"numaCpu-1",
106                                  "hpa-attribute-value":"4",
107                                  "operator":"="
108                               },
109                               {
110                                  "hpa-attribute-key":"numaMem-0",
111                                  "hpa-attribute-value":"2",
112                                  "operator":"=",
113                                  "unit":"GB"
114                               },
115                               {
116                                  "hpa-attribute-key":"numaMem-1",
117                                  "hpa-attribute-value":"4",
118                                  "operator":"=",
119                                  "unit":"GB"
120                               }
121                            ]
122                         },
123                         {
124                            "hpa-feature":"cpuPinning",
125                            "hpa-version":"v1",
126                            "architecture":"generic",
127                            "mandatory": "False",
128                            "score": "5",
129                            "directives": [],
130                            "hpa-feature-attributes":[
131                               {
132                                  "hpa-attribute-key":"logicalCpuThreadPinningPolicy",
133                                  "hpa-attribute-value":"prefer",
134                                  "operator":"="
135                               },
136                               {
137                                  "hpa-attribute-key":"logicalCpuPinningPolicy",
138                                  "hpa-attribute-value":"dedicated",
139                                  "operator":"="
140                               }
141                            ]
142                         }
143                      ]
144                   },
145                   {
146                      "id":"vg_2",
147                      "type":"vnfc",
148                      "directives":[
149                        {
150                          "type":"flavor_directives",
151                          "attributes":[
152                            {
153                              "attribute_name":"flavor_label_2",
154                              "attribute_value":""
155                            }
156                          ]
157                        }
158                      ],
159                      "flavorProperties":[
160                         {
161                            "hpa-feature":"basicCapabilities",
162                            "hpa-version":"v1",
163                            "architecture":"generic",
164                            "mandatory": "False",
165                            "score": "5",
166                            "directives":[],
167                            "hpa-feature-attributes":[
168                               {
169                                  "hpa-attribute-key":"numVirtualCpu",
170                                  "hpa-attribute-value":"8",
171                                  "operator":">="
172                               },
173                               {
174                                  "hpa-attribute-key":"virtualMemSize",
175                                  "hpa-attribute-value":"16",
176                                  "operator":">=",
177                                  "unit":"GB"
178                               }
179                            ]
180                         },
181                         {
182                            "hpa-feature":"numa",
183                            "hpa-version":"v1",
184                            "architecture":"generic",
185                            "mandatory": "False",
186                            "score": "5",
187                            "directives":[],
188                            "hpa-feature-attributes":[
189                               {
190                                  "hpa-attribute-key":"numaNodes",
191                                  "hpa-attribute-value":"2",
192                                  "operator":"="
193                               },
194                               {
195                                  "hpa-attribute-key":"numaCpu-0",
196                                  "hpa-attribute-value":"2",
197                                  "operator":"="
198                               },
199                               {
200                                  "hpa-attribute-key":"numaCpu-1",
201                                  "hpa-attribute-value":"4",
202                                  "operator":"="
203                               },
204                               {
205                                  "hpa-attribute-key":"numaMem-0",
206                                  "hpa-attribute-value":"2",
207                                  "operator":"=",
208                                  "unit":"GB"
209                               },
210                               {
211                                  "hpa-attribute-key":"numaMem-1",
212                                  "hpa-attribute-value":"4",
213                                  "operator":"=",
214                                  "unit":"GB"
215                               }
216                            ]
217                         },
218                         {
219                            "hpa-feature":"ovsDpdk",
220                            "hpa-version":"v1",
221                            "architecture":"generic",
222                            "mandatory": "False",
223                            "score": "5",
224                            "directives":[],
225                            "hpa-feature-attributes":[
226                               {
227                                  "hpa-attribute-key":"dataProcessingAccelerationLibrary",
228                                  "hpa-attribute-value":"v18.02",
229                                  "operator":"="
230                               }
231                            ]
232                         }
233                      ]
234                   }
235                ]
236             }
237          }
238       },
239       "optimization":{
240          "minimize":{
241             "sum":[
242                {
243                   "distance_between":[
244                      "customer_loc",
245                      "vG"
246                   ]
247                },
248                {
249                   "distance_between":[
250                      "customer_loc",
251                      "vG"
252                   ]
253                }
254             ]
255          }
256       }
257    },
258    "timeout":5,
259    "limit":3
260 }