3 "id": "c57da515.f74988",
5 "name": "sdwan-vnf-topology-operation-device-activate",
10 "z": "48050f50.e2132",
14 "id": "e16a751b.7b48a8",
15 "type": "service-logic",
16 "name": "GENERIC-RESOURCE-API 1.2.1-SNAPSHOT",
17 "module": "GENERIC-RESOURCE-API",
18 "version": "1.2.1-SNAPSHOT",
20 "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='1.2.1-SNAPSHOT'>",
22 "x": 251.2857666015625,
23 "y": 132.0002670288086,
24 "z": "48050f50.e2132",
32 "id": "22a66427.5103ec",
36 "x": 172.00006103515625,
37 "y": 69.76215744018555,
38 "z": "48050f50.e2132",
46 "id": "5e9c748a.d0c93c",
48 "name": "block : atomic",
49 "xml": "<block atomic=\"true\">",
52 "x": 246.66673278808594,
53 "y": 411.42884254455566,
54 "z": "48050f50.e2132",
75 "id": "c60faf33.f797b",
76 "type": "returnSuccess",
77 "name": "return success",
78 "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
80 "x": 646.3334732055664,
81 "y": 1056.0956745147705,
82 "z": "48050f50.e2132",
86 "id": "164a289d.b889e7",
88 "name": "set vnf-level-oper-status to Active",
89 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
91 "x": 727.813533782959,
92 "y": 863.4328231811523,
93 "z": "48050f50.e2132",
97 "id": "b4b11b51.f47008",
99 "name": "copy input data to service data",
100 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-information.' value='`$vnf-topology-operation-input.vnf-information.`' />\n",
102 "x": 705.6667251586914,
103 "y": 919.4289989471436,
104 "z": "48050f50.e2132",
108 "id": "49141d65.bdcea4",
110 "name": "make sure this VNF doesn't exist already",
113 "x": 1443.8572311401367,
114 "y": 634.9527101516724,
115 "z": "48050f50.e2132",
119 "id": "3c7b9f2b.d2464",
121 "name": "save deviceInstance configuration in AAI",
122 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='device' \n key='device.id = $vnf-topology-operation-input.vnf-information.vnf-id' >\n<parameter name='id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='device-id' value='$deviceResp[0].id' />\n<parameter name='operational-status' value='Active' />",
125 "x": 730.0002212524414,
126 "y": 969.3179988861084,
127 "z": "48050f50.e2132",
133 "id": "e3b9d3fc.f582d",
135 "name": "method sdwan-vnf-topology-operation-device-activate",
136 "xml": "<method rpc='sdwan-vnf-topology-operation-device-activate' mode='sync'>\n",
139 "x": 263.00006103515625,
140 "y": 226.3484992980957,
141 "z": "48050f50.e2132",
149 "id": "138d258a.ddadba",
151 "name": "set vnfId and vnf-object-path",
152 "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-information.vnf-id + '/vnf-data/'` \" />",
154 "x": 709.0001754760742,
155 "y": 812.348635673523,
156 "z": "48050f50.e2132",
160 "id": "64ab23e7.432f0c",
162 "name": "execute RestApiCallNode Create Devcie Instance",
163 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-device.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v3/devices'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"put\"/>\n<parameter name=\"responsePrefix\" value=\"deviceResp\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />\n\n\n<!--execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-wan-port.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"wanPortResp\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" /-->",
166 "x": 784.4446868896484,
167 "y": 639.1265163421631,
168 "z": "48050f50.e2132",
177 "id": "971b776.085e288",
179 "name": "execute RestApiCallNode Get token",
180 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
183 "x": 738.4446105957031,
184 "y": 509.1263904571533,
185 "z": "48050f50.e2132",
194 "id": "f5a9152f.d977a8",
197 "xml": "<outcome value='success'>\n",
200 "x": 970.4446105957031,
201 "y": 489.1263904571533,
202 "z": "48050f50.e2132",
210 "id": "12711b8c.b16b14",
213 "xml": "<outcome value='failure'>\n",
216 "x": 962.6946105957031,
217 "y": 530.7692737579346,
218 "z": "48050f50.e2132",
226 "id": "3cccbb3c.73ecb4",
228 "name": "set token-id",
229 "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
231 "x": 1107.4446105957031,
232 "y": 489.1263904571533,
233 "z": "48050f50.e2132",
237 "id": "3e406e18.5253e2",
244 "x": 1088.7781066894531,
245 "y": 531.0153064727783,
246 "z": "48050f50.e2132",
252 "id": "647f2905.b3b168",
254 "name": "Do Nothing",
257 "x": 1350.333652496338,
258 "y": 331.9041233062744,
259 "z": "48050f50.e2132",
263 "id": "a8bad102.6b5e9",
265 "name": "block : atomic",
266 "xml": "<block atomic=\"true\">",
270 "x": 1211.1111526489258,
271 "y": 609.0153045654297,
272 "z": "48050f50.e2132",
278 "id": "e9b5eb58.3f04d8",
279 "type": "returnFailure",
280 "name": "return failure",
281 "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing Activate Device rest api\" />\n",
283 "x": 1212.5557327270508,
284 "y": 659.570837020874,
285 "z": "48050f50.e2132",
289 "id": "4a034411.478adc",
292 "xml": "<outcome value='failure'>\n",
295 "x": 1059.555576324463,
296 "y": 662.5707912445068,
297 "z": "48050f50.e2132",
305 "id": "fe651cbe.71dae",
308 "xml": "<outcome value='success'>\n",
311 "x": 1059.0000915527344,
312 "y": 606.2375030517578,
313 "z": "48050f50.e2132",
321 "id": "88ab4e5f.36358",
323 "name": "set deviceId to service data",
324 "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value=\"deviceId\" />\n<!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$deviceResp[0].id`' /-->\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n",
326 "x": 715.0003280639648,
327 "y": 764.3488826751709,
328 "z": "48050f50.e2132",
332 "id": "7e5552be.6be08c",
334 "name": "URL needs to confirm.",
337 "x": 763.0001525878906,
338 "y": 581.3486194610596,
339 "z": "48050f50.e2132",
343 "id": "62f12a96.37bf64",
345 "name": "AAI resource need to update",
348 "x": 1041.0001754760742,
349 "y": 923.348635673523,
350 "z": "48050f50.e2132",
354 "id": "58df9113.78ab9",
355 "type": "get-resource",
356 "name": "get-resource esr-thirdparty-sdnc",
357 "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = SDWAN-Controller AND \n\t\t depth = '1'\"\n pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
360 "x": 733.0002746582031,
361 "y": 413.34861183166504,
362 "z": "48050f50.e2132",
372 "id": "a6d8f866.73e908",
375 "xml": "<outcome value='success'>\n",
378 "x": 974.0003318786621,
379 "y": 338.3485860824585,
380 "z": "48050f50.e2132",
388 "id": "133ac586.e3a64a",
390 "name": "set controller data",
391 "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n",
393 "x": 1223.5003852844238,
394 "y": 294.348575592041,
395 "z": "48050f50.e2132",
399 "id": "7fc0e78d.a01498",
402 "xml": "<outcome value='not-found'>\n",
405 "x": 965.4911689758301,
406 "y": 386.92263412475586,
407 "z": "48050f50.e2132",
415 "id": "6099fe20.b764e",
416 "type": "returnFailure",
417 "name": "return failure",
418 "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
420 "x": 1139.0625801086426,
421 "y": 375.20837020874023,
422 "z": "48050f50.e2132",
426 "id": "1501ba2b.428996",
429 "xml": "<outcome value='Other'>\n",
432 "x": 957.8241767883301,
433 "y": 428.2559471130371,
434 "z": "48050f50.e2132",
442 "id": "49a6b499.06dbac",
443 "type": "returnFailure",
444 "name": "return failure",
445 "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
447 "x": 1145.5967330932617,
448 "y": 423.69513988494873,
449 "z": "48050f50.e2132",
453 "id": "b2aff25d.5a4e",
455 "name": "review and test req",
458 "x": 741.0002212524414,
459 "y": 729.3487091064453,
460 "z": "48050f50.e2132",
464 "id": "61725e4c.10868",
466 "name": "tmp.thirdparty-sdnc-id to be hardcoded here?",
469 "x": 731.0042877197266,
470 "y": 369.3525629043579,
471 "z": "48050f50.e2132",
475 "id": "4d7e6631.03a558",
477 "name": "save service relationship in AAI",
478 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"device\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/devices/device/' + $vnf-topology-operation-input.vnf-information.vnf-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"device.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\" />",
481 "x": 704.0003967285156,
482 "y": 1016.0955476760864,
483 "z": "48050f50.e2132",
489 "id": "2a9fc936.08f4c6",
492 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"Provided alloted resource length\"/>\n<parameter name=\"field3\" value=\"'parameters length'\"/>\n<parameter name=\"field4\" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`'/>\n\n\n\n",
495 "x": 678.0000762939453,
496 "y": 291.0151786804199,
497 "z": "48050f50.e2132",
503 "id": "15d0a117.420b6f",
505 "name": "for vidx..service-data.vnfs.vnf_length[]",
506 "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
509 "x": 766.031364440918,
510 "y": 177.0312786102295,
511 "z": "48050f50.e2132",
519 "id": "1b896cda.b979e3",
526 "x": 1014.3809585571289,
527 "y": 177.57134628295898,
528 "z": "48050f50.e2132",
536 "id": "a706d238.291a",
537 "type": "switchNode",
538 "name": "switch vnfid found",
539 "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
542 "x": 1168.4605560302734,
543 "y": 177.28142833709717,
544 "z": "48050f50.e2132",
552 "id": "ea1b1425.d6abb8",
554 "name": "block : atomic",
555 "xml": "<block atomic=\"true\">",
558 "x": 1462.0580673217773,
559 "y": 178.5817413330078,
560 "z": "48050f50.e2132",
570 "id": "5082e995.a70f58",
571 "type": "outcomeTrue",
573 "xml": "<outcome value='true'>\n",
576 "x": 1323.4125480651855,
577 "y": 178.1741075515747,
578 "z": "48050f50.e2132",
586 "id": "65c6f7a.c67d608",
588 "name": "set vnf-request-input.",
589 "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n",
591 "x": 1703.3909225463867,
592 "y": 134.58180141448975,
593 "z": "48050f50.e2132",
597 "id": "65194b17.7753d4",
599 "name": "set tmp.vidx and ctx.vnf-data",
600 "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
602 "x": 1730.9446334838867,
603 "y": 87.92416572570801,
604 "z": "48050f50.e2132",
608 "id": "47f60422.f643ac",
610 "name": "call sdwan-get-device-param",
611 "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-device-param' mode='sync' >\n",
614 "x": 1708.0313720703125,
615 "y": 197.03127193450928,
616 "z": "48050f50.e2132",
622 "id": "34088ab3.22cba6",
623 "type": "switchNode",
624 "name": "switch tmp.vidx ",
625 "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
630 "z": "48050f50.e2132",
638 "id": "f352fc21.fd854",
641 "xml": "<outcome value=''>\n",
644 "x": 844.4598922729492,
645 "y": 237.60266017913818,
646 "z": "48050f50.e2132",
654 "id": "d74e2e0c.835e1",
655 "type": "returnFailure",
656 "name": "return failure",
657 "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
659 "x": 993.8886184692383,
660 "y": 238.74557781219482,
661 "z": "48050f50.e2132",
665 "id": "96fd10aa.3117f",
667 "name": "execute Properties",
668 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n",
673 "z": "48050f50.e2132",