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