blob: bbd62c03771835b07f7edc82ed59982857c12e36 [file] [log] [blame]
Itohan3aa937a2018-11-29 02:02:08 -08001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright 2018 ONAP
4
5vFW with HPA Tutorial: Setting Up and Configuration
6----------------------------------------------------
7
8Description
9~~~~~~~~~~~
10This use case makes modifications to the regular vFW use case in ONAP by giving the VMs certain hardware features (such as SRIOV NIC, CPU pinning, pci passthrough.. etc.) in order to enhance their performance. Multiple cloud regions with flavors that have hpa features are registered with ONAP. We then create policies that specify the hpa requirements of each VM in the use case. When a service instance is created with OOF specified as the homing solution, OOF responds with the homing solution (cloud region) and flavor directives that meet the requirements specified in the policy.
11This tutorial covers enhancements 1 to 5 in Background of https://wiki.onap.org/pages/viewpage.action?pageId=41421112. It focuses on Test Plan 1.
12
13**Useful Links**
14
15`HPA Test Plan Page <https://wiki.onap.org/pages/viewpage.action?pageId=41421112>`_
16
17`HPA Enhancements Page <https://wiki.onap.org/pages/viewpage.action?pageId=34376310>`_
18
19`vFW with HPA Test Status Page <https://wiki.onap.org/display/DW/vFW+with+HPA+Integration+Test+-+Test+Status>`_
20
21
22`Hardware Platform Enablement in ONAP <https://wiki.onap.org/display/DW/Hardware+Platform+Enablement+In+ONAP>`_
23
24
25
26Setting Up and Installation
27~~~~~~~~~~~~~~~~~~~~~~~~~~~
28Install OOM ONAP using the deploy script in the integration repo. Instructions for this can be found in this link https://wiki.onap.org/display/DW/OOM+Component. When the installation is complete (all the pods are either in running or completed state) Do the following;
29
301. Check that all the required components were deployed;
31
32 ``oom-rancher# helm list``
33
342. Check the state of the pods;
35
36 ``oom-rancher# kubectl get pods -n onap``
37
383. Run robot health check
39
40 ``oom-rancher# cd oom/kubernetes/robot``
41
42 ``oom-rancher# ./ete-k8s.sh onap health``
43
44 Ensure all the required components pass the health tests
454. Modify so bpmn configmap to change the so vnf adapter endpoint to v2
46
47 ``oom-rancher# kubectl -n onap edit configmap dev-so-so-bpmn-infra-app-configmap``
48
49 ``- vnf:``
50
51           ``endpoint: http://so-openstack-adapter.onap:8087/services/VnfAdapter``
52
53           ``rest:``
54
55             ``endpoint: http://so-openstack-adapter.onap:8087/services/rest/v1/vnfs``
56  
57 ``+ vnf:``
58
59           ``endpoint: http://so-openstack-adapter.onap:8087/services/VnfAdapter``
60
61           ``rest:``
62
63             ``endpoint: http://so-openstack-adapter.onap:8087/services/rest/v2/vnfs`` 
64
65 Then delete the bpmn pod
66
67 ``oom-rancher# kubectl delete <pod-name> -n onap``
68
695. Run robot healthdist
70
71 ``oom-rancher# ./ete-k8s.sh onap healthdist``
726. Run robot demo init, this initializes the default Demonstration customer and distributes the default models
73
74 ``oom-rancher# ./demo-k8s.sh onap init``
75
767. Create hpa flavors in cloud regions to be registered with ONAP. All hpa flavor names must start with onap. During our tests, 3 cloud regions were registered and we created flavors in each cloud. The flavors match the flavors described in the test plan `here <https://wiki.onap.org/pages/viewpage.action?pageId=41421112>`_.
77
78- **Cloud Region One**
79
80 **Flavor11**
81 ``#nova flavor-create onap.hpa.flavor11 111 8 20 2``
82
83 ``#nova flavor-key onap.hpa.flavor11 set hw:mem_page_size=2048``
84
85 **Flavor12**
86 ``#nova flavor-create onap.hpa.flavor12 112 12 20 2``
87
88 ``#nova flavor-key onap.hpa.flavor12 set hw:mem_page_size=2048``
89
90 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:3 aggr121``
91
92 ``#openstack flavor set onap.hpa.flavor12 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:3``
93
94 **Flavor13**
95 ``#nova flavor-create onap.hpa.flavor13 113 12 20 2``
96
97 ``#nova flavor-key onap.hpa.flavor13 set hw:mem_page_size=2048``
98
99 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:1 aggr131``
100
101 ``#openstack flavor set onap.hpa.flavor13 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:1``
102
103- **Cloud Region Two**
104
105 **Flavor21**
106 ``#nova flavor-create onap.hpa.flavor21 221 8 20 2``
107
108 ``#nova flavor-key onap.hpa.flavor21 set hw:mem_page_size=2048``
109
110 ``#nova flavor-key onap.hpa.flavor21 set hw:cpu_policy=dedicated``
111
112 ``#nova flavor-key onap.hpa.flavor21 set hw:cpu_thread_policy=isolate``
113
114 **Flavor22**
115 ``#nova flavor-create onap.hpa.flavor22 222 12 20 2``
116
117 ``#nova flavor-key onap.hpa.flavor22 set hw:mem_page_size=2048``
118
119 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:2 aggr221``
120
121 ``#openstack flavor set onap.hpa.flavor22 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:2``
122
123 **Flavor23**
124 ``#nova flavor-create onap.hpa.flavor23 223 12 20 2``
125
126 ``#nova flavor-key onap.hpa.flavor23 set hw:mem_page_size=2048``
127
128 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:2 aggr231``
129
130 ``#openstack flavor set onap.hpa.flavor23 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:2``
131
132- **Cloud Region Three**
133
134 **Flavor31**
135 ``#nova flavor-create onap.hpa.flavor31 331 8 20 2``
136
137 ``#nova flavor-key onap.hpa.flavor31 set hw:mem_page_size=2048``
138
139 ``#nova flavor-key onap.hpa.flavor31 set hw:cpu_policy=dedicated``
140
141 ``#nova flavor-key onap.hpa.flavor31 set hw:cpu_thread_policy=isolate``
142
143 **Flavor32**
144 ``#nova flavor-create onap.hpa.flavor32 332 8192 20 2``
145
146 ``#nova flavor-key onap.hpa.flavor32 set hw:mem_page_size=1048576``
147
148 **Flavor33**
149 ``#nova flavor-create onap.hpa.flavor33 333 12 20 2``
150
151 ``#nova flavor-key onap.hpa.flavor33 set hw:mem_page_size=2048``
152
153 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:1 aggr331``
154
155 ``#openstack flavor set onap.hpa.flavor33 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:1``
156
157
1588. Check that the cloud complex has the right values and update if it does not. Required values are;
159
160 "elevation": "example-elevation-val-28399",
161
162 "lata": "example-lata-val-28399",
163
164 "country": "USA",
165
166 "latitude": "32.89948",
167
168 "longitude": "97.045443",
169
170 "postal-code": "00000
171
172
173If an update is needed, the update can be done via rest using curl or postman
174
175::
176
177 curl -X PUT \
178 https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v14/cloud-infrastructure/complexes/complex/clli1 \
179 -H 'Accept: application/json' \
180 -H 'Authorization: Basic QUFJOkFBSQ==' \
181 -H 'Cache-Control: no-cache' \
182 -H 'Content-Type: application/json' \
183 -H 'Postman-Token: 2b272126-aa65-41e6-aa5d-46bc70b9eb4f' \
184 -H 'Real-Time: true' \
185 -H 'X-FromAppId: jimmy-postman' \
186 -H 'X-TransactionId: 9999' \
187 -d '{
188 "physical-location-id": "clli1",
189 "data-center-code": "example-data-center-code-val-5556",
190 "complex-name": "clli1",
191 "identity-url": "example-identity-url-val-56898",
192 "resource-version": "1543284556407",
193 "physical-location-type": "example-physical-location-type-val-7608",
194 "street1": "example-street1-val-34205",
195 "street2": "example-street2-val-99210",
196 "city": "example-city-val-27150",
197 "state": "example-state-val-59487",
198 "postal-code": "00000",
199 "country": "USA",
200 "region": "example-region-val-13893",
201 "latitude": "32.89948",
202 "longitude": "97.045443",
203 "elevation": "example-elevation-val-28399",
204 "lata": "example-lata-val-28399"
205
206 }'
207
2089. Register new cloud regions. This can be done using instructions (Step 1 to Step 3) on this `page <https://onap.readthedocs.io/en/latest/submodules/multicloud/framework.git/docs/multicloud-plugin-windriver/UserGuide-MultiCloud-WindRiver-TitaniumCloud.html#tutorial-onboard-instance-of-wind-river-titanium-cloud>`_. The already existing CloudOwner and cloud complex can be used. If step 3 does not work using the k8s ip and external port. It can be done using the internal ip address and port. Exec into any pod and run the command from the pod.
209
210- Get msb-iag internal ip address and port
211
212 ``oom-rancher# kubectl get services -n onap |grep msb-iag``
213
214- Exec into any pod (oof in this case) and run curl command, you may need to install curl
215
216 ``oom-rancher# kubectl exec dev-oof-oof-6c848594c5-5khps -it -- bash``
217
21810. Put required subscription list into tenant for all the newly added cloud regions. An easy way to do this is to do a get on the default cloud region, copy the tenant information with the subscription. Then paste it in your put command and modify the region id, tenant-id, tenant-name and resource-version.
219
220**GET COMMAND**
221
222::
223
224 curl -X GET \
225 https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID}?depth=all \
226 -H 'Accept: application/json' \
227 -H 'Authorization: Basic QUFJOkFBSQ==' \
228 -H 'Cache-Control: no-cache' \
229 -H 'Content-Type: application/json' \
230 -H 'Postman-Token: 2899359f-871b-4e61-a307-ecf8b3144e3f' \
231 -H 'Real-Time: true' \
232 -H 'X-FromAppId: jimmy-postman' \
233 -H 'X-TransactionId: 9999'
234
235**PUT COMMAND**
236::
237
238 curl -X PUT \
239 https://{{AAI1_PUB_IP}}:{{AAI1_PUB_PORT}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/{{cloud-owner}}/{{cloud-region-id}}/tenants/tenant/{{tenant-id}} \
240 -H 'Accept: application/json' \
241 -H 'Authorization: Basic QUFJOkFBSQ==' \
242 -H 'Cache-Control: no-cache' \
243 -H 'Content-Type: application/json' \
244 -H 'Postman-Token: 2b272126-aa65-41e6-aa5d-46bc70b9eb4f' \
245 -H 'Real-Time: true' \
246 -H 'X-FromAppId: jimmy-postman' \
247 -H 'X-TransactionId: 9999' \
248 -d '{
249 "tenant-id": "709ba629fe194f8699b12f9d6ffd86a0",
250 "tenant-name": "Integration-HPA",
251 "resource-version": "1542650451856",
252 "relationship-list": {
253 "relationship": [
254 {
255 "related-to": "service-subscription",
256 "relationship-label": "org.onap.relationships.inventory.Uses",
257 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL",
258 "relationship-data": [
259 {
260 "relationship-key": "customer.global-customer-id",
261 "relationship-value": "Demonstration"
262 },
263 {
264 "relationship-key": "service-subscription.service-type",
265 "relationship-value": "vFWCL"
266 }
267 ]
268 },
269 {
270 "related-to": "service-subscription",
271 "relationship-label": "org.onap.relationships.inventory.Uses",
272 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/gNB",
273 "relationship-data": [
274 {
275 "relationship-key": "customer.global-customer-id",
276 "relationship-value": "Demonstration"
277 },
278 {
279 "relationship-key": "service-subscription.service-type",
280 "relationship-value": "gNB"
281 }
282 ]
283 },
284 {
285 "related-to": "service-subscription",
286 "relationship-label": "org.onap.relationships.inventory.Uses",
287 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW",
288 "relationship-data": [
289 {
290 "relationship-key": "customer.global-customer-id",
291 "relationship-value": "Demonstration"
292 },
293 {
294 "relationship-key": "service-subscription.service-type",
295 "relationship-value": "vFW"
296 }
297 ]
298 },
299 {
300 "related-to": "service-subscription",
301 "relationship-label": "org.onap.relationships.inventory.Uses",
302 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE",
303 "relationship-data": [
304 {
305 "relationship-key": "customer.global-customer-id",
306 "relationship-value": "Demonstration"
307 },
308 {
309 "relationship-key": "service-subscription.service-type",
310 "relationship-value": "vCPE"
311 }
312 ]
313 },
314 {
315 "related-to": "service-subscription",
316 "relationship-label": "org.onap.relationships.inventory.Uses",
317 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW_HPA",
318 "relationship-data": [
319 {
320 "relationship-key": "customer.global-customer-id",
321 "relationship-value": "Demonstration"
322 },
323 {
324 "relationship-key": "service-subscription.service-type",
325 "relationship-value": "vFW_HPA"
326 }
327 ]
328 },
329 {
330 "related-to": "service-subscription",
331 "relationship-label": "org.onap.relationships.inventory.Uses",
332 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB",
333 "relationship-data": [
334 {
335 "relationship-key": "customer.global-customer-id",
336 "relationship-value": "Demonstration"
337 },
338 {
339 "relationship-key": "service-subscription.service-type",
340 "relationship-value": "vLB"
341 }
342 ]
343 },
344 {
345 "related-to": "service-subscription",
346 "relationship-label": "org.onap.relationships.inventory.Uses",
347 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vIMS",
348 "relationship-data": [
349 {
350 "relationship-key": "customer.global-customer-id",
351 "relationship-value": "Demonstration"
352 },
353 {
354 "relationship-key": "service-subscription.service-type",
355 "relationship-value": "vIMS"
356 }
357 ]
358 }
359 ]
360 }
361 }'
362
363
36411. Onboard the vFW HPA template. The templates can be gotten from the `demo <https://github.com/onap/demo>`_ repo. The heat and env files used are located in demo/heat/vFW_HPA/vFW/. Create a zip file using the files. For onboarding instructions see steps 4 to 9 of `vFWCL instantiation, testing and debugging <https://wiki.onap.org/display/DW/vFWCL+instantiation%2C+testing%2C+and+debuging>`_. Note that in step 5, only one VSP is created. For the VSP the option to submit for testing in step 5cii was not shown. So you can check in and certify the VSP and proceed to step 6.
365
36612. Get the parameters (model info, model invarant id...etc) required to create a service instance via rest. This can be done by creating a service instance via VID as in step 10 of `vFWCL instantiation, testing and debugging <https://wiki.onap.org/display/DW/vFWCL+instantiation%2C+testing%2C+and+debuging>`_. After creating the service instance, exec into the so bpmn pod and look into the /app/logs/bpmn/debug.log file. Search for the service instance and look for its request details. Then populate the parameters required to create a service instance via rest in step 13 below.
367
36813. Create a service instance rest request but do not create service instance yet. Specify OOF as the homing solution and multicloud as the orchestrator. Be sure to use a service instance name that does not exist and populate the parameters with values gotten from step 12.
369
370::
371
372 curl -k -X POST \
373 http://{{k8s}}:30277/onap/so/infra/serviceInstances/v6 \
374 -H 'authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== \
375 -H 'content-type: application/json' \
376
377 -d '{
378
379 "requestDetails":{
380
381 "modelInfo":{
382
383 "modelInvariantId":"b7564cb9-4074-4c9b-95d6-39d4191e80d9",
384
385 "modelType":"service",
386
387 "modelName":"vfw_HPA",
388
389 "modelVersion":"1.0",
390
391 "modelVersionId":"35d184e8-1cba-46e3-9311-a17ace766eb0",
392
393 "modelUuid":"35d184e8-1cba-46e3-9311-a17ace766eb0",
394
395 "modelInvariantUuid":"b7564cb9-4074-4c9b-95d6-39d4191e80d9"
396
397 },
398
399 "requestInfo":{
400
401 "source":"VID",
402
403 "instanceName":"oof-12-homing",
404
405 "suppressRollback":false,
406
407 "requestorId":"demo"
408
409 },
410
411 "subscriberInfo":{
412
413 "globalSubscriberId":"Demonstration"
414
415 },
416
417 "requestParameters":{
418
419 "subscriptionServiceType":"vFW",
420
421 "aLaCarte":true,
422
423 "testApi":"VNF_API",
424
425 "userParams":[
426
427 {
428
429 "name":"Customer_Location",
430
431 "value":{
432
433 "customerLatitude":"32.897480",
434
435 "customerLongitude":"97.040443",
436
437 "customerName":"some_company"
438
439 }
440
441 },
442
443 {
444
445 "name":"Homing_Solution",
446
447 "value":"oof"
448
449 },
450
451 {
452
453 "name":"orchestrator",
454
455 "value":"multicloud"
456
457 }
458
459 ]
460
461 },
462
463 "project":{
464
465 "projectName":"Project-Demonstration"
466
467 },
468
469 "owningEntity":{
470
471 "owningEntityId":"e1564fc9-b9d0-44f9-b5af-953b4aad2f40",
472
473 "owningEntityName":"OE-Demonstration"
474
475 }
476
477 }
478
479 }'
480
48114. Get the resourceModuleName to be used for creating policies. This can be gotten from the CSAR file of the service model created. However, an easy way to get the resourceModuleName is to send the service instance create request in step 13 above. This will fail as there are no policies but you can then go into the bpmn debug.log file and get its value by searching for resourcemodulename.
482
48315. Create policies. For instructions to do this, look in **method 2 (Manual upload)** of `OOF - HPA guide for integration testing <https://wiki.onap.org/display/DW/OOF+-+HPA+guide+for+integration+testing>`_. Put in the correct resouceModuleName. This is located in the resources section of the rest request. For example the resourceModuleName in the distance policy is 7400fd06C75f4a44A68f.
484
48516. Do a get to verify all the polcies have been put in correctly. This can be done by doing an exec into the policy-pdp pod and running the following curl command.
486
487::
488
489 curl -k -v -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'ClientAuth: cHl0aG9uOnRlc3Q=' -H 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' -H 'Environment: TEST' -X POST -d '{"policyName": "OSDF_CASABLANCA.*", "configAttributes": {"policyScope": "us"}}' 'https://pdp:8081/pdp/api/getConfig' | python -m json.tool
490
491To Update a policy, use the following curl command. Modify the policy as required
492
493::
494
495 curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
496 "configBody": "{\"service\":\"hpaPolicy\",\"guard\":\"False\",\"content\":{\"flavorFeatures\":[{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"firewall_flavor_name\"}],\"type\":\"flavor_directives\"}],\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"2\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"numVirtualCpu\"},{\"hpa-attribute-value\":\"8\",\"unit\":\"MB\",\"operator\":\"=\",\"hpa-attribute-key\":\"virtualMemSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"},{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"2\",\"unit\":\"MB\",\"operator\":\"=\",\"hpa-attribute-key\":\"memoryPageSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"hugePages\"},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]},{\"mandatory\":\"False\",\"score\":\"100\",\"directives\":[],\"hpa-version\":\"v1\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"1\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"pciCount\"},{\"hpa-attribute-value\":\"8086\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"pciVendorId\"},{\"hpa-attribute-value\":\"37c9\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"pciDeviceId\"}],\"architecture\":\"vf\",\"hpa-feature\":\"pciePassthrough\"}],\"id\":\"vfw\"},{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"packetgen_flavor_name\"}],\"type\":\"flavor_directives\"}],\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"1\",\"operator\":\">=\",\"hpa-attribute-key\":\"numVirtualCpu\"},{\"hpa-attribute-value\":\"7\",\"unit\":\"GB\",\"operator\":\">=\",\"hpa-attribute-key\":\"virtualMemSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]}],\"id\":\"vgenerator\"},{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"sink_flavor_name\"}],\"type\":\"flavor_directives\"}],\"id\":\"vsink\",\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"directives\":[],\"hpa-version\":\"v1\",\"hpa-feature-attributes\":[],\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"}]}],\"policyType\":\"hpa\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"identity\":\"hpa-vFW\",\"resources\":[\"vFW\",\"A5ece5a02e86450391d6\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFW_1\",\"version\":\"test1\",\"riskType\":\"test\"}",
497 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_1",
498 "policyConfigType": "MicroService",
499 "onapName": "SampleDemo",
500 "policyScope": "OSDF_CASABLANCA"
501 }' 'https://pdp:8081/pdp/api/updatePolicy'
502
503
504To delete a policy, use two commands below to delete from PDP and PAP
505
506**DELETE POLICY INSIDE PDP**
507
508::
509
510 curl -k -v -H 'Content-Type: application/json' \
511 -H 'Accept: application/json' \
512 -H 'ClientAuth: cHl0aG9uOnRlc3Q=' \
513 -H 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' \
514 -H 'Environment: TEST' \
515 -X DELETE \
516 -d '{"policyName": "OSDF_CASABLANCA.Config_MS_vnfPolicy_vFWHPA.1.xml","policyComponent":"PDP","policyType":"MicroService","pdpGroup":"default"}' https://pdp:8081/pdp/api/deletePolicy
517
518
519**DELETE POLICY INSIDE PAP**
520
521::
522
523 curl -k -v -H 'Content-Type: application/json' \
524 -H 'Accept: application/json' \
525 -H 'ClientAuth: cHl0aG9uOnRlc3Q=' \
526 -H 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' \
527 -H 'Environment: TEST' \
528 -X DELETE \
529 -d '{"policyName": "OSDF_CASABLANCA.Config_MS_vnfPolicy_vFWHPA.1.xml","policyComponent":"PAP","policyType":"Optimization","deleteCondition":"ALL"}' https://pdp:8081/pdp/api/deletePolicy
530
531Below are the 3 HPA policies for test cases in the `test plan <https://wiki.onap.org/pages/viewpage.action?pageId=41421112>`_
532
533**Test 1 (Basic)**
534
535Create Policy
536
537::
538
539 curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
540 "configBody": "{\"service\":\"hpaPolicy\",\"guard\":\"False\",\"content\":{\"flavorFeatures\":[{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"firewall_flavor_name\"}],\"type\":\"flavor_directives\"}],\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"2\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"numVirtualCpu\"},{\"hpa-attribute-value\":\"8\",\"unit\":\"MB\",\"operator\":\"=\",\"hpa-attribute-key\":\"virtualMemSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"},{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"2\",\"unit\":\"MB\",\"operator\":\"=\",\"hpa-attribute-key\":\"memoryPageSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"hugePages\"},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]},{\"mandatory\":\"False\",\"score\":\"100\",\"directives\":[],\"hpa-version\":\"v1\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"isolate\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\"},{\"hpa-attribute-value\":\"dedicated\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"logicalCpuPinningPolicy\"}],\"architecture\":\"generic\",\"hpa-feature\":\"cpuPinning\"}],\"id\":\"vfw\"},{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"packetgen_flavor_name\"}],\"type\":\"flavor_directives\"}],\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"1\",\"operator\":\">=\",\"hpa-attribute-key\":\"numVirtualCpu\"},{\"hpa-attribute-value\":\"7\",\"unit\":\"GB\",\"operator\":\">=\",\"hpa-attribute-key\":\"virtualMemSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]}],\"id\":\"vgenerator\"},{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"sink_flavor_name\"}],\"type\":\"flavor_directives\"}],\"id\":\"vsink\",\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"directives\":[],\"hpa-version\":\"v1\",\"hpa-feature-attributes\":[],\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"}]}],\"policyType\":\"hpa\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"identity\":\"hpa-vFW\",\"resources\":[\"vFW\",\"VfwHpa\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFWHPA_1\",\"version\":\"test1\",\"riskType\":\"test\"}",
541 "policyName": "OSDF_CASABLANCA.hpa_policy_vFWHPA_1",
542 "policyConfigType": "MicroService",
543 "onapName": "SampleDemo",
544 "policyScope": "OSDF_CASABLANCA"
545 }' 'https://pdp:8081/pdp/api/createPolicy'
546
547
548Push Policy
549
550::
551
552 curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
553 "pdpGroup": "default",
554 "policyName": "OSDF_CASABLANCA.hpa_policy_vFWHPA_1",
555 "policyType": "MicroService"
556 }' 'https://pdp:8081/pdp/api/pushPolicy'
557
558
559
560
561**Test 2: (to test SRIOV-NIC feature) (to ensure that right cloud-region is selected based on score)**
562
563Create Policy
564
565::
566
567 curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
568 "configBody": "{\"service\":\"hpaPolicy\",\"guard\":\"False\",\"content\":{\"flavorFeatures\":[{\"id\":\"vfw\",\"type\":\"vnfc\",\"directives\":[{\"type\":\"flavor_directives\",\"attributes\":[{\"attribute_name\":\"firewall_flavor_name\",\"attribute_value\":\"\"}]}],\"flavorProperties\":[{\"hpa-feature\":\"sriovNICNetwork\",\"hpa-version\":\"v1\",\"architecture\":\"intel\",\"mandatory\":\"True\",\"directives\":[{\"type\":\"sriovNICNetwork_directives\",\"attributes\":[{\"attribute_name\":\"vfw_private_0_port_vnic_type\",\"attribute_value\":\"direct\"}]}],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"1\",\"operator\":\"=\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"154C\",\"operator\":\"=\"},{\"hpa-attribute-key\":\"physicalNetwork\",\"hpa-attribute-value\":\"private-1\",\"operator\":\"=\"}]}]},{\"id\":\"vgenerator\",\"type\":\"vnfc\",\"directives\":[{\"type\":\"flavor_directives\",\"attributes\":[{\"attribute_name\":\"packetgen_flavor_name\",\"attribute_value\":\"\"}]}],\"flavorProperties\":[{\"hpa-feature\":\"sriovNICNetwork\",\"hpa-version\":\"v1\",\"architecture\":\"intel\",\"mandatory\":\"True\",\"directives\":[{\"type\":\"sriovNICNetwork_directives\",\"attributes\":[{\"attribute_name\":\"vpg_private_0_port_vnic_type\",\"attribute_value\":\"direct\"}]}],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"3\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"154C\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"physicalNetwork\",\"hpa-attribute-value\":\"shared-1\",\"operator\":\"=\"}]}]},{\"id\":\"vsink\",\"type\":\"vnfc\",\"directives\":[{\"type\":\"flavor_directives\",\"attributes\":[{\"attribute_name\":\"sink_flavor_name\",\"attribute_value\":\"\"}]}],\"flavorProperties\":[{\"hpa-feature\":\"sriovNICNetwork\",\"hpa-version\":\"v1\",\"architecture\":\"intel\",\"mandatory\":\"True\",\"directives\":[{\"type\":\"sriovNICNetwork_directives\",\"attributes\":[{\"attribute_name\":\"vsn_private_0_port_vnic_type\",\"attribute_value\":\"direct\"}]}],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"1\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"154C\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"physicalNetwork\",\"hpa-attribute-value\":\"private-1\",\"operator\":\"=\"}]}]}],\"policyType\":\"hpa\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"identity\":\"hpa-vFW\",\"resources\":[\"vFW\",\"A5ece5a02e86450391d6\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFW_2\",\"version\":\"test1\",\"riskType\":\"test\"}",
569 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_2",
570 "policyConfigType": "MicroService",
571 "onapName": "SampleDemo",
572 "policyScope": "OSDF_CASABLANCA"
573 }' 'https://pdp:8081/pdp/api/createPolicy'
574
575
576Push Policy
577
578::
579
580 curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
581 "pdpGroup": "default",
582 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_2",
583 "policyType": "MicroService"
584 }' 'https://pdp:8081/pdp/api/pushPolicy'
585
586
587**Test 3 (to ensure that right cloud-region is selected based on score)**
588
589Create Policy
590
591::
592
593 curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
594 "configBody": "{\"service\":\"hpaPolicy\",\"guard\":\"False\",\"content\":{\"flavorFeatures\":[{\"id\":\"vfw\",\"type\":\"vnfc\",\"directives\":[{\"type\":\"flavor_directives\",\"attributes\":[{\"attribute_name\":\"firewall_flavor_name\",\"attribute_value\":\"\"}]}],\"flavorProperties\":[{\"hpa-feature\":\"sriovNICNetwork\",\"hpa-version\":\"v1\",\"architecture\":\"intel\",\"mandatory\":\"False\",\"score\":\"100\",\"directives\":[{\"type\":\"sriovNICNetwork_directives\",\"attributes\":[{\"attribute_name\":\"vfw_private_0_port_vnic_type\",\"attribute_value\":\"direct\"}]}],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"1\",\"operator\":\"=\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"154C\",\"operator\":\"=\"},{\"hpa-attribute-key\":\"physicalNetwork\",\"hpa-attribute-value\":\"shared-1\",\"operator\":\"=\"}]},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"hugePages\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"memoryPageSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"basicCapabilities\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"8\",\"operator\":\"=\",\"unit\":\"MB\"}]}]},{\"id\":\"vgenerator\",\"type\":\"vnfc\",\"directives\":[{\"type\":\"flavor_directives\",\"attributes\":[{\"attribute_name\":\"packetgen_flavor_name\",\"attribute_value\":\"\"}]}],\"flavorProperties\":[{\"hpa-feature\":\"hugePages\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"False\",\"score\":\"200\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"memoryPageSize\",\"hpa-attribute-value\":\"1\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"basicCapabilities\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"1\",\"operator\":\">=\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"GB\"}]}]},{\"id\":\"vsink\",\"type\":\"vnfc\",\"directives\":[{\"type\":\"flavor_directives\",\"attributes\":[{\"attribute_name\":\"sink_flavor_name\",\"attribute_value\":\"\"}]}],\"flavorProperties\":[{\"hpa-feature\":\"basicCapabilities\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[]}]}],\"policyType\":\"hpa\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"identity\":\"hpa-vFW\",\"resources\":[\"vFW\",\"A5ece5a02e86450391d6\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFW_3\",\"version\":\"test1\",\"riskType\":\"test\"}",
595 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_3",
596 "policyConfigType": "MicroService",
597 "onapName": "SampleDemo",
598 "policyScope": "OSDF_CASABLANCA"
599 }' 'https://pdp:8081/pdp/api/createPolicy'
600
601Push Policy
602
603::
604
605 curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
606 "pdpGroup": "default",
607 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_3",
608 "policyType": "MicroService"
609 }' 'https://pdp:8081/pdp/api/pushPolicy'
610
61117. Create Service Instance using step 13 above
612
61318. Check bpmn logs to ensure that OOF sent homing response and flavor directives.
614
61519. Create vnf using VID as in 10f and 10g in `vFWCL instantiation, testing and debugging <https://wiki.onap.org/display/DW/vFWCL+instantiation%2C+testing%2C+and+debuging>`_.
616
61720. Do SDNC Preload. Instrcutions for this can be found in this `video <https://wiki.onap.org/display/DW/Running+the+ONAP+Demos?preview=/1015891/16010290/vFW_closed_loop.mp4>`_ (Fast forward to 3:55 in the video). The contents of my preload file are shown below;
618
619::
620
621 {
622 "input": {
623 "request-information": {
624 "notification-url": "openecomp.org",
625 "order-number": "1",
626 "order-version": "1",
627 "request-action": "PreloadVNFRequest",
628 "request-id": "test"
629 },
630 "sdnc-request-header": {
631 "svc-action": "reserve",
632 "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
633 "svc-request-id": "test"
634 },
635 "vnf-topology-information": {
636 "vnf-assignments": {
637 "availability-zones": [],
638 "vnf-networks": [],
639 "vnf-vms": []
640 },
641
642
643 "vnf-parameters": [
644 {
645 "vnf-parameter-name": "vfw_image_name",
646 "vnf-parameter-value": "ubuntu-16.04"
647 },
648 {
649 "vnf-parameter-name": "firewall_flavor_name",
650 "vnf-parameter-value": "m1.large"
651 },
652 {
653 "vnf-parameter-name": "sink_flavor_name",
654 "vnf-parameter-value": "m1.medium"
655 },
656 {
657 "vnf-parameter-name": "packetgen_flavor_name",
658 "vnf-parameter-value": "m1.large"
659 },
660 {
661 "vnf-parameter-name": "public_net_id",
662 "vnf-parameter-value": "external"
663 },
664 {
665 "vnf-parameter-name": "unprotected_private_net_id",
666 "vnf-parameter-value": "unprotected_private_net"
667 },
668 {
669 "vnf-parameter-name": "protected_private_net_id",
670 "vnf-parameter-value": "protected_private_net"
671 },
672 {
673 "vnf-parameter-name": "onap_private_net_id",
674 "vnf-parameter-value": "oam_onap_vnf_test"
675 },
676 {
677 "vnf-parameter-name": "onap_private_subnet_id",
678 "vnf-parameter-value": "oam_onap_vnf_test"
679 },
680 {
681 "vnf-parameter-name": "unprotected_private_net_cidr",
682 "vnf-parameter-value": "192.168.10.0/24"
683 },
684 {
685 "vnf-parameter-name": "protected_private_net_cidr",
686 "vnf-parameter-value": "192.168.20.0/24"
687 },
688 {
689 "vnf-parameter-name": "onap_private_net_cidr",
690 "vnf-parameter-value": "10.0.0.0/16"
691 },
692 {
693 "vnf-parameter-name": "vfw_private_ip_0",
694 "vnf-parameter-value": "192.168.10.100"
695 },
696 {
697 "vnf-parameter-name": "vfw_private_ip_1",
698 "vnf-parameter-value": "192.168.20.100"
699 },
700 {
701 "vnf-parameter-name": "vfw_private_ip_2",
702 "vnf-parameter-value": "10.0.100.1"
703 },
704 {
705 "vnf-parameter-name": "vpg_private_ip_0",
706 "vnf-parameter-value": "192.168.10.200"
707 },
708 {
709 "vnf-parameter-name": "vpg_private_ip_1",
710 "vnf-parameter-value": "10.0.100.2"
711 },
712 {
713 "vnf-parameter-name": "vsn_private_ip_0",
714 "vnf-parameter-value": "192.168.20.250"
715 },
716 {
717 "vnf-parameter-name": "vsn_private_ip_1",
718 "vnf-parameter-value": "10.0.100.3"
719 },
720
721 {
722 "vnf-parameter-name": "vfw_name_0",
723 "vnf-parameter-value": "vfw"
724 },
725 {
726 "vnf-parameter-name": "vpg_name_0",
727 "vnf-parameter-value": "vpktgen"
728 },
729 {
730 "vnf-parameter-name": "vsn_name_0",
731 "vnf-parameter-value": "vsink"
732 },
733 {
734 "vnf-parameter-name": "vfw_private_0_port_vnic_type",
735 "vnf-parameter-value": "normal"
736 },
737 {
738 "vnf-parameter-name": "vfw_private_1_port_vnic_type",
739 "vnf-parameter-value": "normal"
740 },
741 {
742 "vnf-parameter-name": "vfw_private_2_port_vnic_type",
743 "vnf-parameter-value": "normal"
744 },
745 {
746 "vnf-parameter-name": "vpg_private_0_port_vnic_type",
747 "vnf-parameter-value": "normal"
748 },
749 {
750 "vnf-parameter-name": "vpg_private_1_port_vnic_type",
751 "vnf-parameter-value": "normal"
752 },
753 {
754 "vnf-parameter-name": "vsn_private_0_port_vnic_type",
755 "vnf-parameter-value": "normal"
756 },
757 {
758 "vnf-parameter-name": "vsn_private_1_port_vnic_type",
759 "vnf-parameter-value": "normal"
760 },
761 {
762 "vnf-parameter-name": "vf_module_id",
763 "vnf-parameter-value": "VfwHpa..base_vfw..module-0"
764 },
765 {
766 "vnf-parameter-name": "sec_group",
767 "vnf-parameter-value": "default"
768 },
769 {
770 "vnf-parameter-name": "sdnc_model_name",
771 "vnf-parameter-value": ""
772 },
773 {
774 "vnf-parameter-name": "sdnc_model_version",
775 "vnf-parameter-value": ""
776 },
777 {
778 "vnf-parameter-name": "sdnc_artifact_name",
779 "vnf-parameter-value": ""
780 },
781
782 {
783 "vnf-parameter-name": "oof_directives",
784 "vnf-parameter-value": "{\"directives\": [{\"id\": \"vfw\", \"type\": \"vnfc\", \"directives\": [{\"attributes\": [{\"attribute_name\": \"firewall_flavor_name\", \"attribute_value\": \"onap.hpa.flavor31\"}, {\"attribute_name\": \"flavorId\", \"attribute_value\": \"2297339f-6a89-4808-a78f-68216091f904\"}, {\"attribute_name\": \"flavorId\", \"attribute_value\": \"2297339f-6a89-4808-a78f-68216091f904\"}, {\"attribute_name\": \"flavorId\", \"attribute_value\": \"2297339f-6a89-4808-a78f-68216091f904\"}], \"type\": \"flavor_directives\"}]}, {\"id\": \"vgenerator\", \"type\": \"vnfc\", \"directives\": [{\"attributes\": [{\"attribute_name\": \"packetgen_flavor_name\", \"attribute_value\": \"onap.hpa.flavor32\"}, {\"attribute_name\": \"flavorId\", \"attribute_value\": \"2297339f-6a89-4808-a78f-68216091f904\"}], \"type\": \"flavor_directives\"}]}, {\"id\": \"vsink\", \"type\": \"vnfc\", \"directives\": [{\"attributes\": [{\"attribute_name\": \"sink_flavor_name\", \"attribute_value\": \"onap.large\"}, {\"attribute_name\": \"flavorId\", \"attribute_value\": \"2297339f-6a89-4808-a78f-68216091f904\"}], \"type\": \"flavor_directives\"}]}]}"
785 },
786
787 {
788 "vnf-parameter-name": "sdnc_directives",
789 "vnf-parameter-value": "{}"
790 },
791
792 {
793 "vnf-parameter-name": "template_type",
794 "vnf-parameter-value": "heat"
795 }
796
797
798 ],
799 "vnf-topology-identifier": {
800 "generic-vnf-name": "oof-12-vnf-3",
801 "generic-vnf-type": "vfw_hpa 0",
802 "service-type": "6b17354c-0fae-4491-b62e-b41619929c54",
803 "vnf-name": "vfwhpa_stack",
804 "vnf-type": "VfwHpa..base_vfw..module-0"
805
806 }
807 }
808 }}
809
810
811Change parameters based on your environment.
812
813**Note**
814
815::
816
817 "generic-vnf-name": "oof-12-vnf-3", <-- NAME GIVEN TO VNF
818 "generic-vnf-type": "vfw_hpa 0", <-- can be found on VNF dialog screen get the part of the VNF-TYPE after the '/'
819 "service-type": "6b17354c-0fae-4491-b62e-b41619929c54", <-- same as Service Instance ID
820 "vnf-name": "vfwhpa_stack", <-- name to be given to the vf module
821 "vnf-type": "VfwHpa..base_vfw..module-0" <-- can be found on the VID - VF Module dialog screen - Model Name
822
82321. Create vf module (11g of `vFWCL instantiation, testing and debugging <https://wiki.onap.org/display/DW/vFWCL+instantiation%2C+testing%2C+and+debuging>`_). If everything worked properly, you should see the stack created in your VIM(WR titanium cloud openstack in this case).