blob: 87661c12bd315e30d789b41395202995834fcafe [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
helenc878a794a8e2018-11-28 21:01:55 -08005.. _docs_vfw_hpa:
6
Itohan3aa937a2018-11-29 02:02:08 -08007vFW with HPA Tutorial: Setting Up and Configuration
8----------------------------------------------------
9
10Description
11~~~~~~~~~~~
Eric Multanen8301c4b2018-11-29 05:37:07 -080012This 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.
Itohan3aa937a2018-11-29 02:02:08 -080013This tutorial covers enhancements 1 to 5 in Background of https://wiki.onap.org/pages/viewpage.action?pageId=41421112. It focuses on Test Plan 1.
14
15**Useful Links**
16
17`HPA Test Plan Page <https://wiki.onap.org/pages/viewpage.action?pageId=41421112>`_
18
19`HPA Enhancements Page <https://wiki.onap.org/pages/viewpage.action?pageId=34376310>`_
20
21`vFW with HPA Test Status Page <https://wiki.onap.org/display/DW/vFW+with+HPA+Integration+Test+-+Test+Status>`_
22
23
24`Hardware Platform Enablement in ONAP <https://wiki.onap.org/display/DW/Hardware+Platform+Enablement+In+ONAP>`_
25
26
27
28Setting Up and Installation
29~~~~~~~~~~~~~~~~~~~~~~~~~~~
Eric Multanen8301c4b2018-11-29 05:37:07 -080030Some fixes for HPA support were made subsequent to the release of the Casablanca images. Several updated docker images need to be used to utilize the fixes. The details of the docker images that need to be used and the issues that are fixed are described at this link https://wiki.onap.org/display/DW/Docker+image+updates+for+HPA+vFW+testing
31
32Instructions for updating the manifest of ONAP docker images can be found here: https://onap.readthedocs.io/en/casablanca/submodules/integration.git/docs/#deploying-an-updated-docker-manifest
33
Itohan3aa937a2018-11-29 02:02:08 -080034Install 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;
35
Eric Multanen8301c4b2018-11-29 05:37:07 -080036
Itohan3aa937a2018-11-29 02:02:08 -0800371. Check that all the required components were deployed;
38
39 ``oom-rancher# helm list``
40
412. Check the state of the pods;
42
43 ``oom-rancher# kubectl get pods -n onap``
44
453. Run robot health check
46
47 ``oom-rancher# cd oom/kubernetes/robot``
48
49 ``oom-rancher# ./ete-k8s.sh onap health``
50
51 Ensure all the required components pass the health tests
Eric Multanen8301c4b2018-11-29 05:37:07 -0800524. Modify the SO bpmn configmap to change the SO vnf adapter endpoint to v2
Itohan3aa937a2018-11-29 02:02:08 -080053
54 ``oom-rancher# kubectl -n onap edit configmap dev-so-so-bpmn-infra-app-configmap``
55
56 ``- vnf:``
57
58           ``endpoint: http://so-openstack-adapter.onap:8087/services/VnfAdapter``
59
60           ``rest:``
61
62             ``endpoint: http://so-openstack-adapter.onap:8087/services/rest/v1/vnfs``
63  
64 ``+ vnf:``
65
66           ``endpoint: http://so-openstack-adapter.onap:8087/services/VnfAdapter``
67
68           ``rest:``
69
70             ``endpoint: http://so-openstack-adapter.onap:8087/services/rest/v2/vnfs`` 
71
72 Then delete the bpmn pod
73
74 ``oom-rancher# kubectl delete <pod-name> -n onap``
75
765. Run robot healthdist
77
78 ``oom-rancher# ./ete-k8s.sh onap healthdist``
796. Run robot demo init, this initializes the default Demonstration customer and distributes the default models
80
81 ``oom-rancher# ./demo-k8s.sh onap init``
82
Eric Multanen8301c4b2018-11-29 05:37:07 -0800837. 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>`_.
Itohan3aa937a2018-11-29 02:02:08 -080084
85- **Cloud Region One**
86
87 **Flavor11**
88 ``#nova flavor-create onap.hpa.flavor11 111 8 20 2``
89
90 ``#nova flavor-key onap.hpa.flavor11 set hw:mem_page_size=2048``
91
92 **Flavor12**
93 ``#nova flavor-create onap.hpa.flavor12 112 12 20 2``
94
95 ``#nova flavor-key onap.hpa.flavor12 set hw:mem_page_size=2048``
96
97 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:3 aggr121``
98
99 ``#openstack flavor set onap.hpa.flavor12 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:3``
100
101 **Flavor13**
102 ``#nova flavor-create onap.hpa.flavor13 113 12 20 2``
103
104 ``#nova flavor-key onap.hpa.flavor13 set hw:mem_page_size=2048``
105
106 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:1 aggr131``
107
108 ``#openstack flavor set onap.hpa.flavor13 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:1``
109
110- **Cloud Region Two**
111
112 **Flavor21**
113 ``#nova flavor-create onap.hpa.flavor21 221 8 20 2``
114
115 ``#nova flavor-key onap.hpa.flavor21 set hw:mem_page_size=2048``
116
117 ``#nova flavor-key onap.hpa.flavor21 set hw:cpu_policy=dedicated``
118
119 ``#nova flavor-key onap.hpa.flavor21 set hw:cpu_thread_policy=isolate``
120
121 **Flavor22**
122 ``#nova flavor-create onap.hpa.flavor22 222 12 20 2``
123
124 ``#nova flavor-key onap.hpa.flavor22 set hw:mem_page_size=2048``
125
126 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:2 aggr221``
127
128 ``#openstack flavor set onap.hpa.flavor22 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:2``
129
130 **Flavor23**
131 ``#nova flavor-create onap.hpa.flavor23 223 12 20 2``
132
133 ``#nova flavor-key onap.hpa.flavor23 set hw:mem_page_size=2048``
134
135 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:2 aggr231``
136
137 ``#openstack flavor set onap.hpa.flavor23 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-private-1:2``
138
139- **Cloud Region Three**
140
141 **Flavor31**
142 ``#nova flavor-create onap.hpa.flavor31 331 8 20 2``
143
144 ``#nova flavor-key onap.hpa.flavor31 set hw:mem_page_size=2048``
145
146 ``#nova flavor-key onap.hpa.flavor31 set hw:cpu_policy=dedicated``
147
148 ``#nova flavor-key onap.hpa.flavor31 set hw:cpu_thread_policy=isolate``
149
150 **Flavor32**
151 ``#nova flavor-create onap.hpa.flavor32 332 8192 20 2``
152
153 ``#nova flavor-key onap.hpa.flavor32 set hw:mem_page_size=1048576``
154
155 **Flavor33**
156 ``#nova flavor-create onap.hpa.flavor33 333 12 20 2``
157
158 ``#nova flavor-key onap.hpa.flavor33 set hw:mem_page_size=2048``
159
160 ``#openstack aggregate create --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:1 aggr331``
161
162 ``#openstack flavor set onap.hpa.flavor33 --property aggregate_instance_extra_specs:sriov_nic=sriov-nic-intel-8086-154C-shared-1:1``
163
164
1658. Check that the cloud complex has the right values and update if it does not. Required values are;
166
167 "elevation": "example-elevation-val-28399",
168
169 "lata": "example-lata-val-28399",
170
171 "country": "USA",
172
173 "latitude": "32.89948",
174
175 "longitude": "97.045443",
176
177 "postal-code": "00000
178
179
180If an update is needed, the update can be done via rest using curl or postman
181
182::
183
184 curl -X PUT \
185 https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v14/cloud-infrastructure/complexes/complex/clli1 \
186 -H 'Accept: application/json' \
187 -H 'Authorization: Basic QUFJOkFBSQ==' \
188 -H 'Cache-Control: no-cache' \
189 -H 'Content-Type: application/json' \
190 -H 'Postman-Token: 2b272126-aa65-41e6-aa5d-46bc70b9eb4f' \
191 -H 'Real-Time: true' \
192 -H 'X-FromAppId: jimmy-postman' \
193 -H 'X-TransactionId: 9999' \
194 -d '{
195 "physical-location-id": "clli1",
196 "data-center-code": "example-data-center-code-val-5556",
197 "complex-name": "clli1",
198 "identity-url": "example-identity-url-val-56898",
199 "resource-version": "1543284556407",
200 "physical-location-type": "example-physical-location-type-val-7608",
201 "street1": "example-street1-val-34205",
202 "street2": "example-street2-val-99210",
203 "city": "example-city-val-27150",
204 "state": "example-state-val-59487",
205 "postal-code": "00000",
206 "country": "USA",
207 "region": "example-region-val-13893",
208 "latitude": "32.89948",
209 "longitude": "97.045443",
210 "elevation": "example-elevation-val-28399",
211 "lata": "example-lata-val-28399"
212
213 }'
214
2159. 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.
216
217- Get msb-iag internal ip address and port
218
219 ``oom-rancher# kubectl get services -n onap |grep msb-iag``
220
221- Exec into any pod (oof in this case) and run curl command, you may need to install curl
222
223 ``oom-rancher# kubectl exec dev-oof-oof-6c848594c5-5khps -it -- bash``
224
22510. 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.
226
227**GET COMMAND**
228
229::
230
231 curl -X GET \
232 https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID}?depth=all \
233 -H 'Accept: application/json' \
234 -H 'Authorization: Basic QUFJOkFBSQ==' \
235 -H 'Cache-Control: no-cache' \
236 -H 'Content-Type: application/json' \
237 -H 'Postman-Token: 2899359f-871b-4e61-a307-ecf8b3144e3f' \
238 -H 'Real-Time: true' \
239 -H 'X-FromAppId: jimmy-postman' \
240 -H 'X-TransactionId: 9999'
241
242**PUT COMMAND**
243::
244
245 curl -X PUT \
246 https://{{AAI1_PUB_IP}}:{{AAI1_PUB_PORT}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/{{cloud-owner}}/{{cloud-region-id}}/tenants/tenant/{{tenant-id}} \
247 -H 'Accept: application/json' \
248 -H 'Authorization: Basic QUFJOkFBSQ==' \
249 -H 'Cache-Control: no-cache' \
250 -H 'Content-Type: application/json' \
251 -H 'Postman-Token: 2b272126-aa65-41e6-aa5d-46bc70b9eb4f' \
252 -H 'Real-Time: true' \
253 -H 'X-FromAppId: jimmy-postman' \
254 -H 'X-TransactionId: 9999' \
255 -d '{
256 "tenant-id": "709ba629fe194f8699b12f9d6ffd86a0",
257 "tenant-name": "Integration-HPA",
258 "resource-version": "1542650451856",
259 "relationship-list": {
260 "relationship": [
261 {
262 "related-to": "service-subscription",
263 "relationship-label": "org.onap.relationships.inventory.Uses",
264 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFWCL",
265 "relationship-data": [
266 {
267 "relationship-key": "customer.global-customer-id",
268 "relationship-value": "Demonstration"
269 },
270 {
271 "relationship-key": "service-subscription.service-type",
272 "relationship-value": "vFWCL"
273 }
274 ]
275 },
276 {
277 "related-to": "service-subscription",
278 "relationship-label": "org.onap.relationships.inventory.Uses",
279 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/gNB",
280 "relationship-data": [
281 {
282 "relationship-key": "customer.global-customer-id",
283 "relationship-value": "Demonstration"
284 },
285 {
286 "relationship-key": "service-subscription.service-type",
287 "relationship-value": "gNB"
288 }
289 ]
290 },
291 {
292 "related-to": "service-subscription",
293 "relationship-label": "org.onap.relationships.inventory.Uses",
294 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW",
295 "relationship-data": [
296 {
297 "relationship-key": "customer.global-customer-id",
298 "relationship-value": "Demonstration"
299 },
300 {
301 "relationship-key": "service-subscription.service-type",
302 "relationship-value": "vFW"
303 }
304 ]
305 },
306 {
307 "related-to": "service-subscription",
308 "relationship-label": "org.onap.relationships.inventory.Uses",
309 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE",
310 "relationship-data": [
311 {
312 "relationship-key": "customer.global-customer-id",
313 "relationship-value": "Demonstration"
314 },
315 {
316 "relationship-key": "service-subscription.service-type",
317 "relationship-value": "vCPE"
318 }
319 ]
320 },
321 {
322 "related-to": "service-subscription",
323 "relationship-label": "org.onap.relationships.inventory.Uses",
324 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW_HPA",
325 "relationship-data": [
326 {
327 "relationship-key": "customer.global-customer-id",
328 "relationship-value": "Demonstration"
329 },
330 {
331 "relationship-key": "service-subscription.service-type",
332 "relationship-value": "vFW_HPA"
333 }
334 ]
335 },
336 {
337 "related-to": "service-subscription",
338 "relationship-label": "org.onap.relationships.inventory.Uses",
339 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB",
340 "relationship-data": [
341 {
342 "relationship-key": "customer.global-customer-id",
343 "relationship-value": "Demonstration"
344 },
345 {
346 "relationship-key": "service-subscription.service-type",
347 "relationship-value": "vLB"
348 }
349 ]
350 },
351 {
352 "related-to": "service-subscription",
353 "relationship-label": "org.onap.relationships.inventory.Uses",
354 "related-link": "/aai/v14/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vIMS",
355 "relationship-data": [
356 {
357 "relationship-key": "customer.global-customer-id",
358 "relationship-value": "Demonstration"
359 },
360 {
361 "relationship-key": "service-subscription.service-type",
362 "relationship-value": "vIMS"
363 }
364 ]
365 }
366 ]
367 }
368 }'
369
370
37111. 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.
372
Eric Multanen8301c4b2018-11-29 05:37:07 -080037312. 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.
Itohan3aa937a2018-11-29 02:02:08 -0800374
37513. 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.
376
377::
378
379 curl -k -X POST \
380 http://{{k8s}}:30277/onap/so/infra/serviceInstances/v6 \
381 -H 'authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== \
382 -H 'content-type: application/json' \
383
384 -d '{
385
386 "requestDetails":{
387
388 "modelInfo":{
389
390 "modelInvariantId":"b7564cb9-4074-4c9b-95d6-39d4191e80d9",
391
392 "modelType":"service",
393
394 "modelName":"vfw_HPA",
395
396 "modelVersion":"1.0",
397
398 "modelVersionId":"35d184e8-1cba-46e3-9311-a17ace766eb0",
399
400 "modelUuid":"35d184e8-1cba-46e3-9311-a17ace766eb0",
401
402 "modelInvariantUuid":"b7564cb9-4074-4c9b-95d6-39d4191e80d9"
403
404 },
405
406 "requestInfo":{
407
408 "source":"VID",
409
410 "instanceName":"oof-12-homing",
411
412 "suppressRollback":false,
413
414 "requestorId":"demo"
415
416 },
417
418 "subscriberInfo":{
419
420 "globalSubscriberId":"Demonstration"
421
422 },
423
424 "requestParameters":{
425
426 "subscriptionServiceType":"vFW",
427
428 "aLaCarte":true,
429
430 "testApi":"VNF_API",
431
432 "userParams":[
433
434 {
435
436 "name":"Customer_Location",
437
438 "value":{
439
440 "customerLatitude":"32.897480",
441
442 "customerLongitude":"97.040443",
443
444 "customerName":"some_company"
445
446 }
447
448 },
449
450 {
451
452 "name":"Homing_Solution",
453
454 "value":"oof"
455
456 },
457
458 {
459
460 "name":"orchestrator",
461
462 "value":"multicloud"
463
464 }
465
466 ]
467
468 },
469
470 "project":{
471
472 "projectName":"Project-Demonstration"
473
474 },
475
476 "owningEntity":{
477
478 "owningEntityId":"e1564fc9-b9d0-44f9-b5af-953b4aad2f40",
479
480 "owningEntityName":"OE-Demonstration"
481
482 }
483
484 }
485
486 }'
487
48814. 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.
489
49015. 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.
491
49216. 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.
493
494::
495
496 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
497
498To Update a policy, use the following curl command. Modify the policy as required
499
500::
501
502 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 '{
503 "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\"}",
504 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_1",
505 "policyConfigType": "MicroService",
506 "onapName": "SampleDemo",
507 "policyScope": "OSDF_CASABLANCA"
508 }' 'https://pdp:8081/pdp/api/updatePolicy'
509
510
511To delete a policy, use two commands below to delete from PDP and PAP
512
513**DELETE POLICY INSIDE PDP**
514
515::
516
517 curl -k -v -H 'Content-Type: application/json' \
518 -H 'Accept: application/json' \
519 -H 'ClientAuth: cHl0aG9uOnRlc3Q=' \
520 -H 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' \
521 -H 'Environment: TEST' \
522 -X DELETE \
523 -d '{"policyName": "OSDF_CASABLANCA.Config_MS_vnfPolicy_vFWHPA.1.xml","policyComponent":"PDP","policyType":"MicroService","pdpGroup":"default"}' https://pdp:8081/pdp/api/deletePolicy
524
525
526**DELETE POLICY INSIDE PAP**
527
528::
529
530 curl -k -v -H 'Content-Type: application/json' \
531 -H 'Accept: application/json' \
532 -H 'ClientAuth: cHl0aG9uOnRlc3Q=' \
533 -H 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' \
534 -H 'Environment: TEST' \
535 -X DELETE \
536 -d '{"policyName": "OSDF_CASABLANCA.Config_MS_vnfPolicy_vFWHPA.1.xml","policyComponent":"PAP","policyType":"Optimization","deleteCondition":"ALL"}' https://pdp:8081/pdp/api/deletePolicy
537
538Below are the 3 HPA policies for test cases in the `test plan <https://wiki.onap.org/pages/viewpage.action?pageId=41421112>`_
539
540**Test 1 (Basic)**
541
542Create Policy
543
544::
545
546 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 '{
547 "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\"}",
548 "policyName": "OSDF_CASABLANCA.hpa_policy_vFWHPA_1",
549 "policyConfigType": "MicroService",
550 "onapName": "SampleDemo",
551 "policyScope": "OSDF_CASABLANCA"
552 }' 'https://pdp:8081/pdp/api/createPolicy'
553
554
555Push Policy
556
557::
558
559 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 '{
560 "pdpGroup": "default",
561 "policyName": "OSDF_CASABLANCA.hpa_policy_vFWHPA_1",
562 "policyType": "MicroService"
563 }' 'https://pdp:8081/pdp/api/pushPolicy'
564
565
566
567
568**Test 2: (to test SRIOV-NIC feature) (to ensure that right cloud-region is selected based on score)**
569
570Create Policy
571
572::
573
574 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 '{
575 "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\"}",
576 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_2",
577 "policyConfigType": "MicroService",
578 "onapName": "SampleDemo",
579 "policyScope": "OSDF_CASABLANCA"
580 }' 'https://pdp:8081/pdp/api/createPolicy'
581
582
583Push Policy
584
585::
586
587 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 '{
588 "pdpGroup": "default",
589 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_2",
590 "policyType": "MicroService"
591 }' 'https://pdp:8081/pdp/api/pushPolicy'
592
593
594**Test 3 (to ensure that right cloud-region is selected based on score)**
595
596Create Policy
597
598::
599
600 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 '{
601 "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\"}",
602 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_3",
603 "policyConfigType": "MicroService",
604 "onapName": "SampleDemo",
605 "policyScope": "OSDF_CASABLANCA"
606 }' 'https://pdp:8081/pdp/api/createPolicy'
607
608Push Policy
609
610::
611
612 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 '{
613 "pdpGroup": "default",
614 "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_3",
615 "policyType": "MicroService"
616 }' 'https://pdp:8081/pdp/api/pushPolicy'
617
61817. Create Service Instance using step 13 above
619
62018. Check bpmn logs to ensure that OOF sent homing response and flavor directives.
621
62219. 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>`_.
623
Eric Multanen8301c4b2018-11-29 05:37:07 -080062420. Do SDNC Preload. Instructions 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;
Itohan3aa937a2018-11-29 02:02:08 -0800625
626::
627
628 {
629 "input": {
630 "request-information": {
631 "notification-url": "openecomp.org",
632 "order-number": "1",
633 "order-version": "1",
634 "request-action": "PreloadVNFRequest",
635 "request-id": "test"
636 },
637 "sdnc-request-header": {
638 "svc-action": "reserve",
639 "svc-notification-url": "http://openecomp.org:8080/adapters/rest/SDNCNotify",
640 "svc-request-id": "test"
641 },
642 "vnf-topology-information": {
643 "vnf-assignments": {
644 "availability-zones": [],
645 "vnf-networks": [],
646 "vnf-vms": []
647 },
648
649
650 "vnf-parameters": [
651 {
652 "vnf-parameter-name": "vfw_image_name",
653 "vnf-parameter-value": "ubuntu-16.04"
654 },
655 {
656 "vnf-parameter-name": "firewall_flavor_name",
657 "vnf-parameter-value": "m1.large"
658 },
659 {
660 "vnf-parameter-name": "sink_flavor_name",
661 "vnf-parameter-value": "m1.medium"
662 },
663 {
664 "vnf-parameter-name": "packetgen_flavor_name",
665 "vnf-parameter-value": "m1.large"
666 },
667 {
668 "vnf-parameter-name": "public_net_id",
669 "vnf-parameter-value": "external"
670 },
671 {
672 "vnf-parameter-name": "unprotected_private_net_id",
673 "vnf-parameter-value": "unprotected_private_net"
674 },
675 {
676 "vnf-parameter-name": "protected_private_net_id",
677 "vnf-parameter-value": "protected_private_net"
678 },
679 {
680 "vnf-parameter-name": "onap_private_net_id",
681 "vnf-parameter-value": "oam_onap_vnf_test"
682 },
683 {
684 "vnf-parameter-name": "onap_private_subnet_id",
685 "vnf-parameter-value": "oam_onap_vnf_test"
686 },
687 {
688 "vnf-parameter-name": "unprotected_private_net_cidr",
689 "vnf-parameter-value": "192.168.10.0/24"
690 },
691 {
692 "vnf-parameter-name": "protected_private_net_cidr",
693 "vnf-parameter-value": "192.168.20.0/24"
694 },
695 {
696 "vnf-parameter-name": "onap_private_net_cidr",
697 "vnf-parameter-value": "10.0.0.0/16"
698 },
699 {
700 "vnf-parameter-name": "vfw_private_ip_0",
701 "vnf-parameter-value": "192.168.10.100"
702 },
703 {
704 "vnf-parameter-name": "vfw_private_ip_1",
705 "vnf-parameter-value": "192.168.20.100"
706 },
707 {
708 "vnf-parameter-name": "vfw_private_ip_2",
709 "vnf-parameter-value": "10.0.100.1"
710 },
711 {
712 "vnf-parameter-name": "vpg_private_ip_0",
713 "vnf-parameter-value": "192.168.10.200"
714 },
715 {
716 "vnf-parameter-name": "vpg_private_ip_1",
717 "vnf-parameter-value": "10.0.100.2"
718 },
719 {
720 "vnf-parameter-name": "vsn_private_ip_0",
721 "vnf-parameter-value": "192.168.20.250"
722 },
723 {
724 "vnf-parameter-name": "vsn_private_ip_1",
725 "vnf-parameter-value": "10.0.100.3"
726 },
727
728 {
729 "vnf-parameter-name": "vfw_name_0",
730 "vnf-parameter-value": "vfw"
731 },
732 {
733 "vnf-parameter-name": "vpg_name_0",
734 "vnf-parameter-value": "vpktgen"
735 },
736 {
737 "vnf-parameter-name": "vsn_name_0",
738 "vnf-parameter-value": "vsink"
739 },
740 {
741 "vnf-parameter-name": "vfw_private_0_port_vnic_type",
742 "vnf-parameter-value": "normal"
743 },
744 {
745 "vnf-parameter-name": "vfw_private_1_port_vnic_type",
746 "vnf-parameter-value": "normal"
747 },
748 {
749 "vnf-parameter-name": "vfw_private_2_port_vnic_type",
750 "vnf-parameter-value": "normal"
751 },
752 {
753 "vnf-parameter-name": "vpg_private_0_port_vnic_type",
754 "vnf-parameter-value": "normal"
755 },
756 {
757 "vnf-parameter-name": "vpg_private_1_port_vnic_type",
758 "vnf-parameter-value": "normal"
759 },
760 {
761 "vnf-parameter-name": "vsn_private_0_port_vnic_type",
762 "vnf-parameter-value": "normal"
763 },
764 {
765 "vnf-parameter-name": "vsn_private_1_port_vnic_type",
766 "vnf-parameter-value": "normal"
767 },
768 {
769 "vnf-parameter-name": "vf_module_id",
770 "vnf-parameter-value": "VfwHpa..base_vfw..module-0"
771 },
772 {
773 "vnf-parameter-name": "sec_group",
774 "vnf-parameter-value": "default"
775 },
776 {
777 "vnf-parameter-name": "sdnc_model_name",
778 "vnf-parameter-value": ""
779 },
780 {
781 "vnf-parameter-name": "sdnc_model_version",
782 "vnf-parameter-value": ""
783 },
784 {
785 "vnf-parameter-name": "sdnc_artifact_name",
786 "vnf-parameter-value": ""
787 },
788
789 {
790 "vnf-parameter-name": "oof_directives",
791 "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\"}]}]}"
792 },
793
794 {
795 "vnf-parameter-name": "sdnc_directives",
796 "vnf-parameter-value": "{}"
797 },
798
799 {
800 "vnf-parameter-name": "template_type",
801 "vnf-parameter-value": "heat"
802 }
803
804
805 ],
806 "vnf-topology-identifier": {
807 "generic-vnf-name": "oof-12-vnf-3",
808 "generic-vnf-type": "vfw_hpa 0",
809 "service-type": "6b17354c-0fae-4491-b62e-b41619929c54",
810 "vnf-name": "vfwhpa_stack",
811 "vnf-type": "VfwHpa..base_vfw..module-0"
812
813 }
814 }
815 }}
816
817
818Change parameters based on your environment.
819
820**Note**
821
822::
823
824 "generic-vnf-name": "oof-12-vnf-3", <-- NAME GIVEN TO VNF
825 "generic-vnf-type": "vfw_hpa 0", <-- can be found on VNF dialog screen get the part of the VNF-TYPE after the '/'
826 "service-type": "6b17354c-0fae-4491-b62e-b41619929c54", <-- same as Service Instance ID
827 "vnf-name": "vfwhpa_stack", <-- name to be given to the vf module
828 "vnf-type": "VfwHpa..base_vfw..module-0" <-- can be found on the VID - VF Module dialog screen - Model Name
829
Eric Multanen8301c4b2018-11-29 05:37:07 -080083021. 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).