diff options
Diffstat (limited to 'platform-logic/generic-resource-api/src')
18 files changed, 9495 insertions, 2688 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_pnf-topology-operation-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_pnf-topology-operation-assign.json new file mode 100644 index 00000000..2e3a1c2e --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_pnf-topology-operation-assign.json @@ -0,0 +1,424 @@ +[
+ {
+ "id": "d3b3a7ea.d04d08",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 133.3333282470703,
+ "y": 79.63588523864746,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "46bb10f7.5c3fb"
+ ]
+ ]
+ },
+ {
+ "id": "46bb10f7.5c3fb",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 248.61903381347656,
+ "y": 121.54066467285156,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "11b944cd.c96c5b"
+ ]
+ ]
+ },
+ {
+ "id": "11b944cd.c96c5b",
+ "type": "method",
+ "name": "method pnf-topology-operation-assign",
+ "xml": "<method rpc='pnf-topology-operation-assign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 243.92864990234375,
+ "y": 165.55255317687988,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "ce6b8a58.b8d3e8"
+ ]
+ ]
+ },
+ {
+ "id": "7e923496.314c4c",
+ "type": "comment",
+ "name": "pnf-topology-operation-assign",
+ "info": "",
+ "comments": "",
+ "x": 535.5948638916016,
+ "y": 41.38888931274414,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "2c8dd484.c334bc",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$pnf-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 627.2143096923828,
+ "y": 309.0287160873413,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "e97259d0.1af158",
+ "413f5d48.571fc4"
+ ]
+ ]
+ },
+ {
+ "id": "e97259d0.1af158",
+ "type": "outcome",
+ "name": "CreatePnfInstance",
+ "xml": "<outcome value='CreatePnfInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 880.9286041259766,
+ "y": 286.1715974807739,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "f6bc9eb4.5cc37"
+ ]
+ ]
+ },
+ {
+ "id": "413f5d48.571fc4",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 842.9285697937012,
+ "y": 331.88592529296875,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "514d78e9.baa838"
+ ]
+ ]
+ },
+ {
+ "id": "f6bc9eb4.5cc37",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1065.785732269287,
+ "y": 286.17162704467773,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "514d78e9.baa838",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"If svc-action is 'assign' then request-action must be 'CreatePnfInstance'\" />\n",
+ "comments": "",
+ "x": 1082.9285774230957,
+ "y": 331.8858833312988,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "4388ff9d.ce7d6",
+ "type": "get-resource",
+ "name": "get-resource VF_MODEL",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODEL WHERE customization_uuid = $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid'\n pfx='db.vf-model'>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 639.5476150512695,
+ "y": 400.17158603668213,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "512ab575.220ccc",
+ "3a1614d2.3eacec"
+ ]
+ ]
+ },
+ {
+ "id": "6dc29919.0f2208",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"`'No model found for VF customization UUID ' + $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`\" />\n",
+ "comments": "",
+ "x": 1080.9760932922363,
+ "y": 423.60007190704346,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "512ab575.220ccc",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 840.3333129882812,
+ "y": 380.55242347717285,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "d5d2d14c.f67aa"
+ ]
+ ]
+ },
+ {
+ "id": "3a1614d2.3eacec",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 848.9047431945801,
+ "y": 424.83813667297363,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "6dc29919.0f2208"
+ ]
+ ]
+ },
+ {
+ "id": "d5d2d14c.f67aa",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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 reading VF_MODEL table\" />\n",
+ "comments": "",
+ "x": 1080.333293914795,
+ "y": 378.695330619812,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "95465986.653a28",
+ "type": "execute",
+ "name": "execute PropertiesNode",
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 635.1190948486328,
+ "y": 182.314471244812,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ce6b8a58.b8d3e8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 353.41272735595703,
+ "y": 309.5079708099365,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "2c8dd484.c334bc",
+ "4388ff9d.ce7d6",
+ "95465986.653a28",
+ "6cdfcbff.124fe4",
+ "4f7127f2.481f58"
+ ]
+ ]
+ },
+ {
+ "id": "6cdfcbff.124fe4",
+ "type": "switchNode",
+ "name": "switch input cloud-owner",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-request-input.cloud-owner`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 635.8333511352539,
+ "y": 237.55254077911377,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "fbe3ca5c.624b78",
+ "12f9e0f5.d15d1f"
+ ]
+ ]
+ },
+ {
+ "id": "fbe3ca5c.624b78",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 819.1667251586914,
+ "y": 207.55252933502197,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "c50e0e6c.80923"
+ ]
+ ]
+ },
+ {
+ "id": "12f9e0f5.d15d1f",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 818.9286308288574,
+ "y": 248.5050230026245,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "6843bdbc.1eb674"
+ ]
+ ]
+ },
+ {
+ "id": "c50e0e6c.80923",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 954.1666793823242,
+ "y": 205.88586902618408,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6843bdbc.1eb674",
+ "type": "set",
+ "name": "set prop.cloud-region.cloud-owner",
+ "xml": "<set>\n<parameter name='prop.cloud-region.cloud-owner' value='`$pnf-topology-operation-input.pnf-request-input.cloud-owner`' />\n",
+ "comments": "",
+ "x": 1035.8333358764648,
+ "y": 247.55255031585693,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "940a3bec.b79db8",
+ "type": "call",
+ "name": "call self-serve-pnf-assign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-pnf-assign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 848.5553359985352,
+ "y": 596.4128832817078,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "ee11637d.64cc5"
+ ]
+ ]
+ },
+ {
+ "id": "22ef4f33.3ca9c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"`'Failed to create self-serve assignment for pnf with pnf-id=' + $pnf-topology-operation-input.pnf-details.pnf-id + ' with error: ' + $error-message`\" />\n",
+ "comments": "",
+ "x": 1232.6267127990723,
+ "y": 596.4128336906433,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "d7499e88.a3c54",
+ "type": "comment",
+ "name": "SELF-SERVE FORK",
+ "info": "",
+ "comments": "",
+ "x": 758.174690246582,
+ "y": 547.6151220798492,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "ee11637d.64cc5",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1053.8529167175293,
+ "y": 595.9009146690369,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "22ef4f33.3ca9c"
+ ]
+ ]
+ },
+ {
+ "id": "8085154e.65e6a8",
+ "type": "returnSuccess",
+ "name": "return success",
+ "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",
+ "comments": "",
+ "x": 820.9642715454102,
+ "y": 750.5674510002136,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "4326ce02.3a255",
+ "type": "set",
+ "name": "set pnf-level-oper-status to PendingCreate",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.order-status' value='PendingCreate' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.last-rpc-action' value='`$pnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.last-action' value='`$pnf-topology-operation-input.request-information.request-action`' />",
+ "comments": "",
+ "x": 959.0277328491211,
+ "y": 649.15491771698,
+ "z": "6dfe2c1.a0003d4",
+ "wires": []
+ },
+ {
+ "id": "b05b3263.f3526",
+ "type": "execute",
+ "name": "printContext",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-pnf-assign.log' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 810.8689994812012,
+ "y": 698.3447003364563,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4f7127f2.481f58",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 599.535530090332,
+ "y": 667.8531589508057,
+ "z": "6dfe2c1.a0003d4",
+ "wires": [
+ [
+ "940a3bec.b79db8",
+ "8085154e.65e6a8",
+ "b05b3263.f3526"
+ ]
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_pnf-topology-operation.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_pnf-topology-operation.json new file mode 100644 index 00000000..95599658 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_pnf-topology-operation.json @@ -0,0 +1,302 @@ +[
+ {
+ "id": "a75a636d.6f381",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 151.42859649658203,
+ "y": 90.00000190734863,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "bc77da8a.d3eb38"
+ ]
+ ]
+ },
+ {
+ "id": "bc77da8a.d3eb38",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 265.7143020629883,
+ "y": 130.2381134033203,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "5d578276.4bfefc"
+ ]
+ ]
+ },
+ {
+ "id": "5d578276.4bfefc",
+ "type": "method",
+ "name": "method pnf-topology-operation",
+ "xml": "<method rpc='pnf-topology-operation' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 217.8572235107422,
+ "y": 169.99999618530273,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "8685d57b.911a08"
+ ]
+ ]
+ },
+ {
+ "id": "24fd3171.4300ae",
+ "type": "comment",
+ "name": "pnf-topology-operation",
+ "info": "",
+ "comments": "",
+ "x": 545.7734527587891,
+ "y": 37.58634567260742,
+ "z": "304db441.66b4dc",
+ "wires": []
+ },
+ {
+ "id": "8685d57b.911a08",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 234.02387237548828,
+ "y": 376.26495265960693,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "53481fdc.accfe",
+ "142ac2ac.46ecad",
+ "1bd90137.06db9f"
+ ]
+ ]
+ },
+ {
+ "id": "53481fdc.accfe",
+ "type": "returnSuccess",
+ "name": "return success",
+ "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",
+ "comments": "",
+ "x": 519.380973815918,
+ "y": 530.7146434783936,
+ "z": "304db441.66b4dc",
+ "wires": []
+ },
+ {
+ "id": "142ac2ac.46ecad",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 529.4285430908203,
+ "y": 374.4761962890625,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "19927cce.f2a7f3",
+ "9c8ad773.ef9d68",
+ "a0c10c00.06af18",
+ "4205ab8c.75bdf4",
+ "5cc63376.4006fc",
+ "bec05d4a.4c7b6"
+ ]
+ ]
+ },
+ {
+ "id": "19927cce.f2a7f3",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 726.8094863891602,
+ "y": 268.5239009857178,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "ff0b4bca.7ccaa8"
+ ]
+ ]
+ },
+ {
+ "id": "9c8ad773.ef9d68",
+ "type": "outcome",
+ "name": "unassign",
+ "xml": "<outcome value='unassign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 730.8571090698242,
+ "y": 398.7146244049072,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "34401634.f821aa"
+ ]
+ ]
+ },
+ {
+ "id": "4205ab8c.75bdf4",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 724.142744064331,
+ "y": 484.3332748413086,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "fa0f4334.3fb5"
+ ]
+ ]
+ },
+ {
+ "id": "fa0f4334.3fb5",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"`$pnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n",
+ "comments": "",
+ "x": 910.3331890106201,
+ "y": 484.3333396911621,
+ "z": "304db441.66b4dc",
+ "wires": []
+ },
+ {
+ "id": "1bd90137.06db9f",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:validate-pnf-input",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-pnf-input' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 633.8452301025391,
+ "y": 227.38104057312012,
+ "z": "304db441.66b4dc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ff0b4bca.7ccaa8",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:pnf-topology-operation-assign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-assign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1068.9523391723633,
+ "y": 268.0953617095947,
+ "z": "304db441.66b4dc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "90a49ca8.b5074",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:pnf-topology-operation-deactivate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-deactivate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1080.2856063842773,
+ "y": 352.4287099838257,
+ "z": "304db441.66b4dc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "34401634.f821aa",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:pnf-topology-operation-unassign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-unassign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1075.952205657959,
+ "y": 398.42875576019287,
+ "z": "304db441.66b4dc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a0c10c00.06af18",
+ "type": "outcome",
+ "name": "deactivate",
+ "xml": "<outcome value='deactivate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 735.9522476196289,
+ "y": 353.09538555145264,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "90a49ca8.b5074"
+ ]
+ ]
+ },
+ {
+ "id": "38e4cbe2.ef1884",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:pnf-topology-operation-activate",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-activate' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1073.0951843261719,
+ "y": 309.9999933242798,
+ "z": "304db441.66b4dc",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "5cc63376.4006fc",
+ "type": "outcome",
+ "name": "activate",
+ "xml": "<outcome value='activate'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 729.7618255615234,
+ "y": 310.66666889190674,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "38e4cbe2.ef1884"
+ ]
+ ]
+ },
+ {
+ "id": "bec05d4a.4c7b6",
+ "type": "outcome",
+ "name": "changeassign",
+ "xml": "<outcome value='changeassign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 745.7143363952637,
+ "y": 441.42855644226074,
+ "z": "304db441.66b4dc",
+ "wires": [
+ [
+ "27aa457b.765b8a"
+ ]
+ ]
+ },
+ {
+ "id": "27aa457b.765b8a",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:pnf-topology-operation-changeassign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-changeassign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1086.5237045288086,
+ "y": 441.1427230834961,
+ "z": "304db441.66b4dc",
+ "wires": [
+ []
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-assign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-assign.json new file mode 100644 index 00000000..2c57c178 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-assign.json @@ -0,0 +1,1375 @@ +[
+ {
+ "id": "ecff213c.e8aaa",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 137.5,
+ "y": 90,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "23b17adc.1c80e6"
+ ]
+ ]
+ },
+ {
+ "id": "e6160663.8edf48",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 167.9761962890625,
+ "y": 212.2777862548828,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "f97d0f53.e9029",
+ "2d2db8c6.748ba8",
+ "ff2d06ee.623348",
+ "ca8257f6.464808",
+ "b9417a96.c89598",
+ "97cbe59f.102fe8",
+ "71acdeef.4b572",
+ "b26b3f10.8cd93",
+ "2c0f97dd.67d808",
+ "192a8a0a.311bd6"
+ ]
+ ]
+ },
+ {
+ "id": "7bdd8af6.d4d404",
+ "type": "method",
+ "name": "method self-serve-pnf-assign",
+ "xml": "<method rpc='self-serve-pnf-assign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 254.26190948486328,
+ "y": 144.70635509490967,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "e6160663.8edf48"
+ ]
+ ]
+ },
+ {
+ "id": "23b17adc.1c80e6",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 412.73819732666016,
+ "y": 90.19049263000488,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "7bdd8af6.d4d404"
+ ]
+ ]
+ },
+ {
+ "id": "2d2db8c6.748ba8",
+ "type": "switchNode",
+ "name": "switch pnf-parameters-data.param_length",
+ "xml": "<switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 449.0357971191406,
+ "y": 1492.5120153427124,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "eb4e37ba.25e208"
+ ]
+ ]
+ },
+ {
+ "id": "eb4e37ba.25e208",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 711.0358276367188,
+ "y": 1492.5120153427124,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "ed282b71.ede0f8"
+ ]
+ ]
+ },
+ {
+ "id": "21ad94d1.be148c",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:self-serve-pnf-ra-assignment",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-pnf-ra-assignment' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1226.3214874267578,
+ "y": 1542.0834465026855,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "ffcba76.e3a6658"
+ ]
+ ]
+ },
+ {
+ "id": "afb8d713.9ea788",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to get RA assignments: ' + $error-message`\" />\n",
+ "comments": "",
+ "x": 1698.0357284545898,
+ "y": 1541.6548500061035,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "6f90ee45.cde4f",
+ "type": "for",
+ "name": "foreach pnf-parameters-data.param[]",
+ "xml": "<for index='pidx' start='0' end='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 681.3574600219727,
+ "y": 1800.0120840072632,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "c123dce6.984a6",
+ "a008f4ce.816ac8"
+ ]
+ ]
+ },
+ {
+ "id": "f97d0f53.e9029",
+ "type": "set",
+ "name": "set ss.capability.execution-order[]",
+ "xml": "<set>\n<parameter name='ss.capability.execution-order[0]' value='aai-get' />\n<parameter name='ss.capability.execution-order[1]' value='generate-name' />\n<parameter name='ss.capability.execution-order[2]' value='alts-entitlement-assign' />\n<parameter name='ss.capability.execution-order[3]' value='alts-license-assign' />\n<parameter name='ss.capability.execution-order[4]' value='vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[5]' value='mS-vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[6]' value='eipam-ip-assignment' />\n<parameter name='ss.capability.execution-order[7]' value='eipam-create-pool' />\n<parameter name='ss.capability.execution-order[8]' value='netbox-ip-assign' />\n<parameter name='ss.capability.execution-order[9]' value='mac-address-assign' />\n<parameter name='ss.capability.execution-order[10]' value='mS-mac-address-assign' />\n<parameter name='ss.capability.execution-order[11]' value='create-vpe-pool' />\n<parameter name='ss.capability.execution-order[12]' value='unresolved-composite-data' />\n<parameter name='ss.capability.execution-order[13]' value='aai-pnf-put' />\n<parameter name='ss.capability.execution-order_length' value='14' />\n",
+ "comments": "",
+ "x": 430.02384185791016,
+ "y": 1271.0001401901245,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "ff2d06ee.623348",
+ "type": "for",
+ "name": "foreach capability[]",
+ "xml": "<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 381.14300537109375,
+ "y": 1644.4049034118652,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "34d7033c.1d850c",
+ "bcdcac9e.1dcf8",
+ "6f90ee45.cde4f",
+ "7e8acf11.757ce"
+ ]
+ ]
+ },
+ {
+ "id": "a008f4ce.816ac8",
+ "type": "switchNode",
+ "name": "switch capability-name",
+ "xml": "<switch test='`$ss.capability-name == $tmp.param.capability-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 985.7502822875977,
+ "y": 1845.6548767089844,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "fbc7d0d6.d0f9a"
+ ]
+ ]
+ },
+ {
+ "id": "fbc7d0d6.d0f9a",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1176.2502822875977,
+ "y": 1845.9048767089844,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "1d5ac87a.53fd58"
+ ]
+ ]
+ },
+ {
+ "id": "ffcba76.e3a6658",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1543.8928337097168,
+ "y": 1541.5120401382446,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "afb8d713.9ea788"
+ ]
+ ]
+ },
+ {
+ "id": "34d7033c.1d850c",
+ "type": "set",
+ "name": "set ss.capability-name",
+ "xml": "<set>\n<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />\n<!--\nss.capability.execution-order[]\n-->",
+ "comments": "",
+ "x": 637.5000610351562,
+ "y": 1644.3573551177979,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "c123dce6.984a6",
+ "type": "set",
+ "name": "tmp.param.capability-name",
+ "xml": "<set>\n<parameter name='tmp.param.capability-name' \n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />",
+ "comments": "",
+ "x": 997.107307434082,
+ "y": 1800.2620868682861,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "bcdcac9e.1dcf8",
+ "type": "set",
+ "name": "set ss.capability-action = assign",
+ "xml": "<set>\n<parameter name='ss.capability-action' value='assign' />\n",
+ "comments": "",
+ "x": 666.2142028808594,
+ "y": 1691.2739391326904,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "7e8acf11.757ce",
+ "type": "set",
+ "name": "set capability-dg with 'self-serve-' + capability-name",
+ "xml": "<set>\n<parameter name='ss.capability-dg' value=\"`'self-serve-' + $ss.capability.execution-order[$cidx]`\" />\n",
+ "comments": "",
+ "x": 728.7262954711914,
+ "y": 1744.7501831054688,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "ca8257f6.464808",
+ "type": "set",
+ "name": "set sdnc-generated-cloud-resources = true",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.sdnc-generated-cloud-resources' value='true' />\n",
+ "comments": "",
+ "x": 458.9881362915039,
+ "y": 1324.7501487731934,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "9217be7a.bbdb1",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 715.428539276123,
+ "y": 605.4643030166626,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "3723f166.b9d03e",
+ "74858ef1.51481",
+ "a4d6abfb.adbf88",
+ "7c366e89.adcd7",
+ "16c17b92.58b8f4",
+ "2ef35e2.ce87ea2",
+ "25981633.c7dc4a",
+ "152546f0.c6dac9",
+ "6f7c97df.b99708"
+ ]
+ ]
+ },
+ {
+ "id": "3723f166.b9d03e",
+ "type": "set",
+ "name": "set pnf-topology data",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-topology-identifier-structure.pnf-id'\n value='`$pnf-topology-operation-input.pnf-details.pnf-id`' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-topology-identifier-structure.pnf-type'\n value='`$pnf-topology-operation-input.pnf-details.pnf-type`' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.tenant'\n value='`$pnf-topology-operation-input.pnf-request-input.tenant`' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.aic-cloud-region'\n value='`$pnf-topology-operation-input.pnf-request-input.aic-cloud-region`' />",
+ "comments": "",
+ "x": 930.9284820556641,
+ "y": 606.523811340332,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "ca44a755.ad1c68",
+ "type": "set",
+ "name": "set pnf-parameters-data",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.'\n value='pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.' />\n",
+ "comments": "",
+ "x": 1117.3217163085938,
+ "y": 1492.380844116211,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "a4d6abfb.adbf88",
+ "type": "set",
+ "name": "set pnf-level-oper-status to PendingCreate",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.order-status' value='PendingCreate' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.last-rpc-action' value='`$pnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.last-action' value='`$pnf-topology-operation-input.request-information.request-action`' />\n",
+ "comments": "",
+ "x": 996.2184371948242,
+ "y": 1180.504020690918,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "74858ef1.51481",
+ "type": "set",
+ "name": "copy input data",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.sdnc-request-header.'\n value='$pnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.request-information.'\n value='$pnf-topology-operation-input.request-information.' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.'\n value='$pnf-topology-operation-input.service-information.' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.'\n value='$pnf-topology-operation-input.pnf-details.' />\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.'\n value='$pnf-topology-operation-input.pnf-request-input.' />",
+ "comments": "",
+ "x": 913.5953521728516,
+ "y": 1130.3096599578857,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "b0cbcbbb.b2c498",
+ "type": "set",
+ "name": "set from DB",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-invariant-uuid'\n value='`$db.pnf-model.invariant-uuid`' />",
+ "comments": "",
+ "x": 1327.9286727905273,
+ "y": 718.8810405731201,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "7c366e89.adcd7",
+ "type": "switchNode",
+ "name": "switch input model-invariant-uuid",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-invariant-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 968.7857475280762,
+ "y": 741.7054843902588,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "ae90c040.3cc39",
+ "5f2c6ed0.29635"
+ ]
+ ]
+ },
+ {
+ "id": "ae90c040.3cc39",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1177.4524192810059,
+ "y": 718.8484477996826,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "b0cbcbbb.b2c498"
+ ]
+ ]
+ },
+ {
+ "id": "5f2c6ed0.29635",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1178.881015777588,
+ "y": 763.1340389251709,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "f383b18b.bfab9"
+ ]
+ ]
+ },
+ {
+ "id": "f383b18b.bfab9",
+ "type": "set",
+ "name": "set from input",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-invariant-uuid'\n value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-invariant-uuid`' />",
+ "comments": "",
+ "x": 1333.1667518615723,
+ "y": 762.5626111030579,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "4d3a329b.f2f90c",
+ "type": "set",
+ "name": "set from DB",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-uuid'\n value='`$db.pnf-model.uuid`' />",
+ "comments": "",
+ "x": 1328.8809432983398,
+ "y": 807.419716835022,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "16c17b92.58b8f4",
+ "type": "switchNode",
+ "name": "switch input model-uuid",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 938.4047660827637,
+ "y": 830.2442216873169,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "59c0725a.54805c",
+ "bfa95def.afc74"
+ ]
+ ]
+ },
+ {
+ "id": "59c0725a.54805c",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1178.4047393798828,
+ "y": 807.3871536254883,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "4d3a329b.f2f90c"
+ ]
+ ]
+ },
+ {
+ "id": "bfa95def.afc74",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1179.8333358764648,
+ "y": 851.6727447509766,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "f2189dfb.909da"
+ ]
+ ]
+ },
+ {
+ "id": "f2189dfb.909da",
+ "type": "set",
+ "name": "set from input",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-uuid'\n value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-uuid`' />",
+ "comments": "",
+ "x": 1334.1190719604492,
+ "y": 851.1013169288635,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "24e86468.e8cd5c",
+ "type": "set",
+ "name": "set from DB",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-version'\n value='`$db.pnf-model.version`' />",
+ "comments": "",
+ "x": 1326.0238761901855,
+ "y": 896.2769241333008,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "2ef35e2.ce87ea2",
+ "type": "switchNode",
+ "name": "switch input model-version",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-version`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 949.5476379394531,
+ "y": 919.1013689041138,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "9b0d0090.c86a6",
+ "43470848.9d99c8"
+ ]
+ ]
+ },
+ {
+ "id": "9b0d0090.c86a6",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1175.547622680664,
+ "y": 896.2443313598633,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "24e86468.e8cd5c"
+ ]
+ ]
+ },
+ {
+ "id": "43470848.9d99c8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1176.976219177246,
+ "y": 940.5299224853516,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "1db4f705.93ccc9"
+ ]
+ ]
+ },
+ {
+ "id": "1db4f705.93ccc9",
+ "type": "set",
+ "name": "set from input",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-version'\n value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-version`' />\n",
+ "comments": "",
+ "x": 1331.2619552612305,
+ "y": 939.9584946632385,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "1dc78c79.a450c4",
+ "type": "set",
+ "name": "set from DB",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-name'\n value='`$db.pnf-model.name`' />\n",
+ "comments": "",
+ "x": 1326.0238761901855,
+ "y": 983.4197463989258,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "25981633.c7dc4a",
+ "type": "switchNode",
+ "name": "switch input model-name",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 944.5476379394531,
+ "y": 1006.2441911697388,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "443be686.54dde8",
+ "f6a73c6d.1c44a"
+ ]
+ ]
+ },
+ {
+ "id": "443be686.54dde8",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1175.547622680664,
+ "y": 983.3871536254883,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "1dc78c79.a450c4"
+ ]
+ ]
+ },
+ {
+ "id": "f6a73c6d.1c44a",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1176.976219177246,
+ "y": 1027.6727447509766,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "963f984e.4e1598"
+ ]
+ ]
+ },
+ {
+ "id": "963f984e.4e1598",
+ "type": "set",
+ "name": "set from input",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-name'\n value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-name`' />\n",
+ "comments": "",
+ "x": 1331.2619552612305,
+ "y": 1027.1013169288635,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "152546f0.c6dac9",
+ "type": "set",
+ "name": "set pnf-id",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-id'\n value='`$pnf-topology-operation-input.pnf-details.pnf-id`' />\n",
+ "comments": "",
+ "x": 894.9047088623047,
+ "y": 658.0388488769531,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "6f7c97df.b99708",
+ "type": "set",
+ "name": "set model-customization-uuid",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-customization-uuid' \n value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`' />\n",
+ "comments": "",
+ "x": 957.3332252502441,
+ "y": 1079.0863952636719,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "b26b3f10.8cd93",
+ "type": "switchNode",
+ "name": "switch service-data.pnfs.pnf_length",
+ "xml": "<switch test='`$service-data.pnfs.pnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 441.58329010009766,
+ "y": 292.4285001754761,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "548784a8.6fc1bc",
+ "97bdaa3b.0e9cb8",
+ "f611eac6.477cc8"
+ ]
+ ]
+ },
+ {
+ "id": "548784a8.6fc1bc",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 683.7976760864258,
+ "y": 230.98793125152588,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "d33ee57f.a3ecb8"
+ ]
+ ]
+ },
+ {
+ "id": "1c98dcd.f3b3f23",
+ "type": "set",
+ "name": "set pnf-index=0",
+ "xml": "<set>\n<parameter name='pnf-index' value='0' />\n",
+ "comments": "",
+ "x": 1019.083381652832,
+ "y": 230.48800563812256,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "97bdaa3b.0e9cb8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 684.976203918457,
+ "y": 352.607120513916,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "231e0e98.80a622"
+ ]
+ ]
+ },
+ {
+ "id": "6ac25c2c.af1c14",
+ "type": "switchNode",
+ "name": "switch resource-resolution-data.status",
+ "xml": "<switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$pidx].resource-resolution-data.status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 843.3693580627441,
+ "y": 2105.3293199539185,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "3502dbdf.32a874",
+ "cc3acc09.1c768"
+ ]
+ ]
+ },
+ {
+ "id": "3502dbdf.32a874",
+ "type": "other",
+ "name": "PENDING",
+ "xml": "<outcome value='PENDING'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1112.7265739440918,
+ "y": 2105.3292760849,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "829e3fb9.d93a7"
+ ]
+ ]
+ },
+ {
+ "id": "cc3acc09.1c768",
+ "type": "other",
+ "name": "FAILED",
+ "xml": "<outcome value='FAILED'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1106.2623901367188,
+ "y": 2156.2936067581177,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "829e3fb9.d93a7"
+ ]
+ ]
+ },
+ {
+ "id": "829e3fb9.d93a7",
+ "type": "call",
+ "name": "call ss.capability-dg",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1321.3811225891113,
+ "y": 2157.0554580688477,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "3962ddfe.4c5df2",
+ "3e772b22.e1c734"
+ ]
+ ]
+ },
+ {
+ "id": "bdafebf6.f2fbb8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`\" />\n",
+ "comments": "",
+ "x": 1888.9286193847656,
+ "y": 2413.532018661499,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "3962ddfe.4c5df2",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1506.2736320495605,
+ "y": 2157.055519104004,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "c929724.d0d769"
+ ]
+ ]
+ },
+ {
+ "id": "c929724.d0d769",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1669.5477485656738,
+ "y": 2156.3650598526,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "bdafebf6.f2fbb8",
+ "b6818d14.aad68",
+ "ae39be90.d76b7",
+ "60ef7bf2.fa7a14",
+ "e7c0edc.af4641"
+ ]
+ ]
+ },
+ {
+ "id": "ae39be90.d76b7",
+ "type": "execute",
+ "name": "generate ss-pnf url replace service-instance-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.ss-pnf-assignments`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-pnf-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.service-instance-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1992.8808403015137,
+ "y": 2209.88161945343,
+ "z": "37882b3b.b21224",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "e7c0edc.af4641",
+ "type": "execute",
+ "name": "execute RestApiCallNode - PUT pnf",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.ss.pnf.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-pnf-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ss-pnf\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1962.3451347351074,
+ "y": 2312.7388410568237,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "2aae309b.44db4",
+ "6c63be99.6e9df"
+ ]
+ ]
+ },
+ {
+ "id": "2aae309b.44db4",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2236.9388008117676,
+ "y": 2366.736994743347,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "47b71a3e.97bf84"
+ ]
+ ]
+ },
+ {
+ "id": "6c63be99.6e9df",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2229.3674354553223,
+ "y": 2313.237014770508,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "47b71a3e.97bf84"
+ ]
+ ]
+ },
+ {
+ "id": "b6818d14.aad68",
+ "type": "set",
+ "name": "set pf data for restapi-call-node",
+ "xml": "<set>\n<parameter name='pf.pnf-id'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-id`' />\n<parameter name='pf.pnf-data.sdnc-request-header.'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.sdnc-request-header.`' />\n<parameter name='pf.pnf-data.request-information.'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.request-information.`' />\n<parameter name='pf.pnf-data.service-information.'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.`' />\n<parameter name='pf.pnf-data.pnf-details.'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.`' />\n<parameter name='pf.pnf-data.pnf-topology.'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.`' />\n<parameter name='pf.pnf-data.pnf-level-oper-status.'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.`' />\n<parameter name='pf.pnf-data.pnf-request-input.pnf-input-parameters.'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.pnf-input-parameters.`' />\n<parameter name='pf.pnf-data.pnf-request-input.request-version'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.request-version`' />\n<parameter name='pf.pnf-data.pnf-request-input.pnf-name'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.pnf-name`' />\n<parameter name='pf.pnf-data.pnf-request-input.tenant'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.tenant`' />\n<parameter name='pf.pnf-data.pnf-request-input.aic-cloud-region'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.aic-cloud-region`' />\n<parameter name='pf.pnf-data.pnf-request-input.aic-clli'\n value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.aic-clli`' />",
+ "comments": "",
+ "x": 1945.3331413269043,
+ "y": 2155.976131439209,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "60ef7bf2.fa7a14",
+ "type": "execute",
+ "name": "generate ss-pnf url - replace pnf-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-pnf-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-pnf-url\"/>\n <parameter name=\"target\" value=\"{pnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.pnfs.pnf[$pnf-index].pnf-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1957.16654586792,
+ "y": 2260.69038772583,
+ "z": "37882b3b.b21224",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "97cbe59f.102fe8",
+ "type": "execute",
+ "name": "printContext",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-pnf-assign.log' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 344.42456817626953,
+ "y": 2600.920820236206,
+ "z": "37882b3b.b21224",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b9417a96.c89598",
+ "type": "set",
+ "name": "set ss.capability-type = pnf",
+ "xml": "<set>\n<parameter name='ss.capability-type' value='pnf' />\n",
+ "comments": "",
+ "x": 409.89292907714844,
+ "y": 1375.5357942581177,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "ed282b71.ede0f8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 875.8927993774414,
+ "y": 1492.892912864685,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "ca44a755.ad1c68",
+ "21ad94d1.be148c",
+ "31272402.ad905c"
+ ]
+ ]
+ },
+ {
+ "id": "b109eefc.1d872",
+ "type": "for",
+ "name": "for each existing PNF",
+ "xml": "<for index='idx' start='0' end='`$service-data.pnfs.pnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1032.0357284545898,
+ "y": 352.78579807281494,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "b986a80e.96c248"
+ ]
+ ]
+ },
+ {
+ "id": "b986a80e.96c248",
+ "type": "switchNode",
+ "name": "switch pnf-id: input vs service-data",
+ "xml": "<switch test='`$pf-topology-operation-input.pnf-details.pnf-id == $service-data.pnfs.pnf[$idx].pnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1309.321434020996,
+ "y": 352.85728549957275,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "cb09cf77.62df4"
+ ]
+ ]
+ },
+ {
+ "id": "cb09cf77.62df4",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1532.1072006225586,
+ "y": 352.4287576675415,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "747e7c3c.174b44"
+ ]
+ ]
+ },
+ {
+ "id": "747e7c3c.174b44",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1664.5714530944824,
+ "y": 352.46431827545166,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "2a95ccf.7794434",
+ "8c6ecdd5.9e28b",
+ "4b25e8bd.e53158"
+ ]
+ ]
+ },
+ {
+ "id": "2a95ccf.7794434",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 1832.464241027832,
+ "y": 438.4642963409424,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "923b1ffd.af18b",
+ "type": "set",
+ "name": "set new pnf_length = 1",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf_length' value='1' />\n",
+ "comments": "",
+ "x": 1042.642951965332,
+ "y": 275.82148838043213,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "8c6ecdd5.9e28b",
+ "type": "set",
+ "name": "set pnf-index = idx",
+ "xml": "<set>\n<parameter name='pnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1863.0357971191406,
+ "y": 395.2499752044678,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "71acdeef.4b572",
+ "type": "set",
+ "name": "set is-new-pnf = true",
+ "xml": "<set>\n<parameter name='is-new-pnf' value='true' />\n",
+ "comments": "",
+ "x": 395.8929214477539,
+ "y": 212.32144355773926,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "4b25e8bd.e53158",
+ "type": "set",
+ "name": "set is-new-pnf = false",
+ "xml": "<set>\n<parameter name='is-new-pnf' value='false' />\n",
+ "comments": "",
+ "x": 1871.0714836120605,
+ "y": 351.9643201828003,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "231e0e98.80a622",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 822.2500228881836,
+ "y": 352.2500162124634,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "b109eefc.1d872",
+ "12659093.1463bf"
+ ]
+ ]
+ },
+ {
+ "id": "12659093.1463bf",
+ "type": "switchNode",
+ "name": "switch is-new-pnf",
+ "xml": "<switch test='`$is-new-pnf`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1019.7500152587891,
+ "y": 438.8214178085327,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "273b5e8f.735eb2"
+ ]
+ ]
+ },
+ {
+ "id": "273b5e8f.735eb2",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1199.6071701049805,
+ "y": 438.39286518096924,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "35d2b6f5.5b532a"
+ ]
+ ]
+ },
+ {
+ "id": "d33ee57f.a3ecb8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 837.7499923706055,
+ "y": 230.99999713897705,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "1c98dcd.f3b3f23",
+ "923b1ffd.af18b"
+ ]
+ ]
+ },
+ {
+ "id": "f611eac6.477cc8",
+ "type": "other",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 682.2499923706055,
+ "y": 290.7499990463257,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "d33ee57f.a3ecb8"
+ ]
+ ]
+ },
+ {
+ "id": "2c0f97dd.67d808",
+ "type": "switchNode",
+ "name": "switch is-new-pnf",
+ "xml": "<switch test='`$is-new-pnf`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 383.75000381469727,
+ "y": 606.2500057220459,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "a0d4e067.649e6"
+ ]
+ ]
+ },
+ {
+ "id": "a0d4e067.649e6",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 563.6071586608887,
+ "y": 605.8214530944824,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "9217be7a.bbdb1"
+ ]
+ ]
+ },
+ {
+ "id": "42f65de7.c91174",
+ "type": "set",
+ "name": "set new pnf_length++",
+ "xml": "<set>\n<parameter name='service-data.pnfs.pnf_length' value='`$service-data.pnfs.pnf_length + 1`' />\n",
+ "comments": "",
+ "x": 1547.5,
+ "y": 485,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "35d2b6f5.5b532a",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1345.4999771118164,
+ "y": 437.99996185302734,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "42f65de7.c91174",
+ "5e6b2c5e.23b7b4"
+ ]
+ ]
+ },
+ {
+ "id": "5e6b2c5e.23b7b4",
+ "type": "set",
+ "name": "set pnf-index = pnf_length",
+ "xml": "<set>\n<parameter name='pnf-index' value='`$service-data.pnfs.pnf_length`' />\n",
+ "comments": "",
+ "x": 1556.9999809265137,
+ "y": 437.49996185302734,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "47b71a3e.97bf84",
+ "type": "set",
+ "name": "set error-message",
+ "xml": "<set>\n<parameter name=\"error-message\" value=\"Failed to persist self-serve pnf assignments during assign in MD-SAL\" />",
+ "comments": "",
+ "x": 2449.285758972168,
+ "y": 2312.107021331787,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "1d5ac87a.53fd58",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 577.5000228881836,
+ "y": 2105.142770767212,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "6ac25c2c.af1c14",
+ "cb3f6813.5ca268"
+ ]
+ ]
+ },
+ {
+ "id": "cb3f6813.5ca268",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 741.7857627868652,
+ "y": 2481.4284267425537,
+ "z": "37882b3b.b21224",
+ "wires": []
+ },
+ {
+ "id": "3e772b22.e1c734",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1517.5000228881836,
+ "y": 2277.5000324249268,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "7440700b.da7e"
+ ]
+ ]
+ },
+ {
+ "id": "7440700b.da7e",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'EXECUTION DONE: ' + $ss.capability-dg`\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1661.2500228881836,
+ "y": 2276.2500324249268,
+ "z": "37882b3b.b21224",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "31272402.ad905c",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"DONE with pnf-ra-assigment\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1054.1071319580078,
+ "y": 1592.5000228881836,
+ "z": "37882b3b.b21224",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "45a102ef.9c38fc",
+ "type": "execute",
+ "name": "execute PropertiesNode",
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 817.5000381469727,
+ "y": 1432.4286422729492,
+ "z": "37882b3b.b21224",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "192a8a0a.311bd6",
+ "type": "switchNode",
+ "name": "switch prop.controller.user",
+ "xml": "<switch test='`$prop.controller.user`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 406.21427372523704,
+ "y": 1432.8572630201065,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "98f24d4.445dfb"
+ ]
+ ]
+ },
+ {
+ "id": "98f24d4.445dfb",
+ "type": "failure",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 606.0713691711426,
+ "y": 1432.428677558899,
+ "z": "37882b3b.b21224",
+ "wires": [
+ [
+ "45a102ef.9c38fc"
+ ]
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.json new file mode 100644 index 00000000..616ca732 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.json @@ -0,0 +1,1074 @@ +[
+ {
+ "id": "81013586.72b878",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 152.5,
+ "y": 73.75,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "16d29a69.fd75d6"
+ ]
+ ]
+ },
+ {
+ "id": "16d29a69.fd75d6",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 428.5,
+ "y": 74.75,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "fb8a3acf.eacc88"
+ ]
+ ]
+ },
+ {
+ "id": "fb8a3acf.eacc88",
+ "type": "method",
+ "name": "self-serve-pnf-ra-assignment",
+ "xml": "<method rpc='self-serve-pnf-ra-assignment' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 745.5,
+ "y": 74.75,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "11ad89b0.4aa4c6"
+ ]
+ ]
+ },
+ {
+ "id": "11ad89b0.4aa4c6",
+ "type": "block",
+ "name": "block atomic",
+ "xml": "<block atomic=\"true\">\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 241.66664123535156,
+ "y": 155.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "6a8abb82.762c24",
+ "d5ddf680.bc1228",
+ "d7d846c4.3b1898",
+ "62bc77a8.9608f8",
+ "ef795e5f.2b62e",
+ "cd9ccb1d.ad27d8",
+ "e4653dfe.029a3",
+ "ed802b4f.e3de88",
+ "4ae0bbb3.7d20c4",
+ "3049bbb0.b6b734",
+ "9eebb178.0f2de",
+ "507cc1d.a43bf4",
+ "22187a30.f13be6",
+ "c7fb6ab.3a33598",
+ "7905fcc3.ff7874"
+ ]
+ ]
+ },
+ {
+ "id": "d5ddf680.bc1228",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n <parameter name=\"request-id\" value=\"`$tmp.return.generate.pnf-se-serv-uuid`\"/>\n <parameter name=\"resource-type\" value=\"`$pnf-topology-operation-input.pnf-details.pnf-type`\" /> \n <parameter name=\"resource-id\" value=\"`$pnf-topology-operation-input.pnf-details.pnf-id`\" /> \n <parameter name=\"action-name\" value=\"resource-assignment\"/> \n <parameter name=\"responsePrefix\" value=\"raAssign\" />\n",
+ "comments": "",
+ "x": 427.4166603088379,
+ "y": 199.83333015441895,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "1893855c.d16e5b",
+ "type": "get-resource",
+ "name": "get-resource VF_MODEL",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODEL WHERE customization_uuid = $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid'\n pfx='db1.vf-model'>\n \n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 966.3094635009766,
+ "y": 591.3689861297607,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "a87dd4cc.178e18",
+ "ba66fea4.81fad",
+ "c6434f37.1962d"
+ ]
+ ]
+ },
+ {
+ "id": "a87dd4cc.178e18",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1211.3095626831055,
+ "y": 540.654709815979,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "ab46b2b3.a771c"
+ ]
+ ]
+ },
+ {
+ "id": "ab46b2b3.a771c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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 reading VF_MODEL table\" />\n",
+ "comments": "",
+ "x": 1384.3095626831055,
+ "y": 539.654709815979,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "879b8f8b.c19ed",
+ "type": "set",
+ "name": "set tmp.sdnc-model-name, tmp.sdnc-model-version, tmp.sdnc-artifact-name",
+ "xml": "<set>\n<parameter name='tmp.sdnc-model-name' value='`$db1.vf-model.sdnc-model-name`' />\n<parameter name='tmp.sdnc-model-version' value='`$db1.vf-model.sdnc-model-version`' />\n<parameter name='tmp.sdnc-artifact-name' value='`$db1.vf-model.sdnc-artifact-name`' />\n\n\n\n\n",
+ "comments": "",
+ "x": 1586.7380638122559,
+ "y": 640.797513961792,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "c7b5dfc8.8b235",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"`'No VF_MODEL found where customization_uuid = ' + $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`\" />\n",
+ "comments": "",
+ "x": 1386.3095626831055,
+ "y": 588.654709815979,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "ef795e5f.2b62e",
+ "type": "switchNode",
+ "name": "switch: model info == NULL",
+ "xml": "<switch test=\"`$tmp.sdnc-model-name == '' or $tmp.sdnc-model-version == '' or $tmp.sdnc-artifact-name == ''`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 487.30946350097656,
+ "y": 592.3689861297607,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "e98bb0b9.b2422"
+ ]
+ ]
+ },
+ {
+ "id": "ba66fea4.81fad",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1217.3095626831055,
+ "y": 589.654709815979,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "c7b5dfc8.8b235"
+ ]
+ ]
+ },
+ {
+ "id": "e98bb0b9.b2422",
+ "type": "outcome",
+ "name": "true",
+ "xml": "<outcome value='true'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 736.3094635009766,
+ "y": 592.3689861297607,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "1893855c.d16e5b"
+ ]
+ ]
+ },
+ {
+ "id": "62bc77a8.9608f8",
+ "type": "for",
+ "name": "for pnf-topology-operation-input",
+ "xml": "<for silentFailure='true' index='i' start='0' end='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param_length`' >",
+ "comments": "",
+ "outputs": 1,
+ "x": 503.16664123535156,
+ "y": 392.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "72f58635.66b448"
+ ]
+ ]
+ },
+ {
+ "id": "72f58635.66b448",
+ "type": "block",
+ "name": "block atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 725.1666412353516,
+ "y": 391.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "86d3f258.93e3b"
+ ]
+ ]
+ },
+ {
+ "id": "d041de83.d9577",
+ "type": "set",
+ "name": "set tmp.sdnc-model-name",
+ "xml": "<set>\n<parameter name='tmp.sdnc-model-name' value='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value`' />\n",
+ "comments": "",
+ "x": 1376.1666412353516,
+ "y": 324.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "2a96bf97.393f3",
+ "type": "outcome",
+ "name": "sdnc_model_name",
+ "xml": "<outcome value='sdnc_model_name'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1122.1666412353516,
+ "y": 324.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "d041de83.d9577"
+ ]
+ ]
+ },
+ {
+ "id": "86d3f258.93e3b",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].name`'>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 884.1666412353516,
+ "y": 391.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "2a96bf97.393f3",
+ "ff1ab59.1eb4148",
+ "733b67e2.c4f3c8",
+ "e6ecce71.c3cfb"
+ ]
+ ]
+ },
+ {
+ "id": "ff1ab59.1eb4148",
+ "type": "outcome",
+ "name": "sdnc_model_version",
+ "xml": "<outcome value='sdnc_model_version'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1125.1666412353516,
+ "y": 370.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "9cc66f84.f4ee2"
+ ]
+ ]
+ },
+ {
+ "id": "733b67e2.c4f3c8",
+ "type": "outcome",
+ "name": "sdnc_artifact_name",
+ "xml": "<outcome value='sdnc_artifact_name'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1124.1666412353516,
+ "y": 419.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "f2663e84.97046"
+ ]
+ ]
+ },
+ {
+ "id": "9cc66f84.f4ee2",
+ "type": "set",
+ "name": "set tmp.sdnc-model-version",
+ "xml": "<set>\n<parameter name='tmp.sdnc-model-version' value='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value`' />\n\n",
+ "comments": "",
+ "x": 1380.1666412353516,
+ "y": 370.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "f2663e84.97046",
+ "type": "set",
+ "name": "set tmp.sdnc-artifact-name",
+ "xml": "<set>\n<parameter name='tmp.sdnc-artifact-name' value='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value`' />\n\n",
+ "comments": "",
+ "x": 1376.1666412353516,
+ "y": 419.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "ab5de2cd.b8552",
+ "type": "set",
+ "name": "set name-value other JsonString",
+ "xml": "<set>\n<parameter name=\"tmp.config-name-value-other-payload\" value=\"`$tmp.config-name-value-other-payload + '"' + $pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].name + '":"' + $pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value + '",'`\"/>\n\n",
+ "comments": "",
+ "x": 1293.416648864746,
+ "y": 470.58335041999817,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "e6ecce71.c3cfb",
+ "type": "outcome",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1084.166648864746,
+ "y": 468.6547546386719,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "ab5de2cd.b8552"
+ ]
+ ]
+ },
+ {
+ "id": "cd9ccb1d.ad27d8",
+ "type": "set",
+ "name": "set configAssignment JsonString",
+ "xml": "<set>\n<parameter name=\"tmp.config-name-value-payload4\" value=\"`$tmp.config-name-value-other-payload + '"service-instance-id":"' + $pnf-topology-operation-input.service-information.service-instance-id + '",'`\"/>\n<parameter name=\"tmp.config-name-value-payload5\" value=\"`$tmp.config-name-value-payload4 + '"pnf-model-customization-uuid":"' + $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid + '",'`\"/>\n<parameter name=\"tmp.config-name-value-payload6\" value=\"`$tmp.config-name-value-payload5 + '"pnf-id":"' + $pnf-topology-operation-input.pnf-details.pnf-id + '",'`\"/>\n<parameter name=\"tmp.config-name-value-payload7\" value=\"`$tmp.config-name-value-payload6 + '"aic-cloud-region":"' + $pnf-topology-operation-input.pnf-request-input.aic-cloud-region + '"'`\"/>\n<parameter name=\"tmp.json-payload\" value=\"`'{' + $tmp.config-name-value-payload7 + '}'`\" />",
+ "comments": "",
+ "x": 497.16664123535156,
+ "y": 711.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "e4653dfe.029a3",
+ "type": "execute",
+ "name": "execute BlueprintProcessingClient",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest'>\n <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />\n <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />\n <parameter name='action' value='`$action-name`' />\n <parameter name='mode' value='sync' />\n <parameter name='force' value='false' />\n <parameter name='ttl' value='0' />\n <parameter name='prefix' value='`$responsePrefix`' />\n <parameter name='payload' value=\"`'{\n "resource-assignment-request": {\n "template-prefix": [\n "' + $tmp.sdnc-artifact-name + '"\n ],\n "resource-assignment-properties": \n ' + $tmp.json-payload + '\n }\n}'`\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 504.83331298828125,
+ "y": 865.75,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "e9f0b05a.ea9a7",
+ "9906e0de.d8aa9"
+ ]
+ ]
+ },
+ {
+ "id": "e9f0b05a.ea9a7",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 744.8333129882812,
+ "y": 839.75,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "f76d9cc.08daa6"
+ ]
+ ]
+ },
+ {
+ "id": "f76d9cc.08daa6",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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 from BlueprintProcessingClient\" />\n",
+ "comments": "",
+ "x": 926.8333129882812,
+ "y": 860.75,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "4ae0bbb3.7d20c4",
+ "type": "for",
+ "name": "for resource-accumulator-resolved-data loop",
+ "xml": "<for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.resource-accumulator-resolved-data_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 529.1666412353516,
+ "y": 1083.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "f7dcae4c.80d6"
+ ]
+ ]
+ },
+ {
+ "id": "a560f52e.73b478",
+ "type": "set",
+ "name": "set from resource-accumulator-resolved-data",
+ "xml": "<set>\n\t<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'/>\n\t<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>\n\t<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.capability-name`' value='RA Resolved'/>\n\t<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.status`' value='SUCCESS'/>\n",
+ "comments": "",
+ "x": 1759.1666412353516,
+ "y": 1135.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "3049bbb0.b6b734",
+ "type": "for",
+ "name": "for capability-data",
+ "xml": "<for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.capability-data_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 454.16664123535156,
+ "y": 1425.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "c321b6db.f91618"
+ ]
+ ]
+ },
+ {
+ "id": "c321b6db.f91618",
+ "type": "for",
+ "name": "for key-mapping",
+ "xml": "<for silentFailure='true' index='j' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping_length`' >",
+ "comments": "",
+ "outputs": 1,
+ "x": 663.1666412353516,
+ "y": 1425.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "4bdfbe92.58a07"
+ ]
+ ]
+ },
+ {
+ "id": "ed802b4f.e3de88",
+ "type": "execute",
+ "name": "execute jsonStringToCtx",
+ "xml": "<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"jsonStringToCtx\">\n\t<parameter name=\"source\" value=\"`'raAssign.payload.resource-assignment-params.' + $tmp.sdnc-artifact-name`\" />\n\t<parameter name=\"outputPath\" value=\"jsonContextPrefix\" />\n\t<parameter name=\"isEscaped\" value=\"false\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 473.16664123535156,
+ "y": 1004.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6a8abb82.762c24",
+ "type": "execute",
+ "name": "execute generateUUID",
+ "xml": " <execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"generateUUID\" > \n <parameter name=\"ctx-destination\" value=\"tmp.return.generate.pnf-se-serv-uuid\" /> \n ",
+ "comments": "",
+ "outputs": 1,
+ "x": 479.16664123535156,
+ "y": 155.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "da110978.037e18"
+ ]
+ ]
+ },
+ {
+ "id": "da110978.037e18",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 657.1666412353516,
+ "y": 153.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "25f8a570.76c1ea"
+ ]
+ ]
+ },
+ {
+ "id": "25f8a570.76c1ea",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"generateUUID is failed\" />\n",
+ "comments": "",
+ "x": 804.1666412353516,
+ "y": 154.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "b8f9dea4.7ec9d",
+ "type": "for",
+ "name": "for pnf-parameters-data.param[]",
+ "xml": "<for silentFailure='true' index='cnt' start='0' end='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1502.1666412353516,
+ "y": 1084.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "9d5dafdb.8e745"
+ ]
+ ]
+ },
+ {
+ "id": "f7dcae4c.80d6",
+ "type": "block",
+ "name": "block atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 808.1666412353516,
+ "y": 1084.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "4b875a14.db0584",
+ "a6645a90.aff8b8",
+ "ac27262.137afd8"
+ ]
+ ]
+ },
+ {
+ "id": "d7d846c4.3b1898",
+ "type": "switchNode",
+ "name": "switch pnf-parameters-data.param_length",
+ "xml": "<switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 531.1666412353516,
+ "y": 253.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "270f1448.0f808c",
+ "df2ab314.6f53a"
+ ]
+ ]
+ },
+ {
+ "id": "270f1448.0f808c",
+ "type": "outcome",
+ "name": "null",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 769.1666412353516,
+ "y": 221.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "bc1bcfe4.47473"
+ ]
+ ]
+ },
+ {
+ "id": "df2ab314.6f53a",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 768.1666412353516,
+ "y": 285.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "6ae0c2e2.e112ec"
+ ]
+ ]
+ },
+ {
+ "id": "bc1bcfe4.47473",
+ "type": "set",
+ "name": "set pre service param len as 0",
+ "xml": "<set>\n <parameter name='highnum' value='0' />\n <parameter name='prehighnum' value='0'/>\n",
+ "comments": "",
+ "x": 982.1666412353516,
+ "y": 221.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "6ae0c2e2.e112ec",
+ "type": "set",
+ "name": "set pre service param len",
+ "xml": "<set>\n <parameter name='highnum' value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' />\n <parameter name='prehighnum' value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' />",
+ "comments": "",
+ "x": 967.1666412353516,
+ "y": 285.0833339691162,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "9d5dafdb.8e745",
+ "type": "switchNode",
+ "name": "switch param[].name - input vs. jsonContextPrefix",
+ "xml": "<switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$cnt].name == $jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1881.1666412353516,
+ "y": 1084.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "d54adb3d.c51348"
+ ]
+ ]
+ },
+ {
+ "id": "d54adb3d.c51348",
+ "type": "not-found",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2165.1666412353516,
+ "y": 1084.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "bf4269c.812a398"
+ ]
+ ]
+ },
+ {
+ "id": "bf4269c.812a398",
+ "type": "set",
+ "name": "set for existing param name",
+ "xml": "<set>\n<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$cnt].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>\n<parameter name='tmp.mso.param.found' value='true' />\n",
+ "comments": "",
+ "x": 2375.1666412353516,
+ "y": 1084.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "ac27262.137afd8",
+ "type": "switchNode",
+ "name": "switch tmp.mso.param.found",
+ "xml": "<switch test='`$tmp.mso.param.found`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1050.1666412353516,
+ "y": 1136.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "80869ef9.b42b6"
+ ]
+ ]
+ },
+ {
+ "id": "80869ef9.b42b6",
+ "type": "not-found",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1284.1666412353516,
+ "y": 1135.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "aa6d15b3.b54808"
+ ]
+ ]
+ },
+ {
+ "id": "4b875a14.db0584",
+ "type": "set",
+ "name": "set for existing param name",
+ "xml": "<set>\n<parameter name='tmp.mso.param.found' value='false' />\n",
+ "comments": "",
+ "x": 1031.6666412353516,
+ "y": 1022.5833282470703,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "a6645a90.aff8b8",
+ "type": "switchNode",
+ "name": "switch check length > 0",
+ "xml": "<switch test='`$prehighnum > 0`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1026.6666412353516,
+ "y": 1084.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "3e9847d7.a9a428"
+ ]
+ ]
+ },
+ {
+ "id": "3e9847d7.a9a428",
+ "type": "not-found",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1273.6666412353516,
+ "y": 1084.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "b8f9dea4.7ec9d"
+ ]
+ ]
+ },
+ {
+ "id": "b72432c2.1cb81",
+ "type": "for",
+ "name": "for payload",
+ "xml": "<for silentFailure='true' index='k' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length`' >",
+ "comments": "",
+ "outputs": 1,
+ "x": 1845.1666412353516,
+ "y": 1443.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "8a6d87a5.167378"
+ ]
+ ]
+ },
+ {
+ "id": "993132bf.1fc03",
+ "type": "set",
+ "name": "set resource-key",
+ "xml": "<set>\n<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-name`'/>\n<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-value`'/>\n\n",
+ "comments": "",
+ "x": 2194.1666412353516,
+ "y": 1379.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "92dd255a.846018",
+ "type": "set",
+ "name": "set output-data ",
+ "xml": "<set>\n<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-name`'/>\n<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-value`'/>\n<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.capability-name`' value='`$jsonContextPrefix.capability-data[$i].capability-name`'/>\n<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.status`' value='PENDING'/>\n<parameter name='num' value='0' />",
+ "comments": "",
+ "x": 1418.1666412353516,
+ "y": 1323.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "4bdfbe92.58a07",
+ "type": "for",
+ "name": "for output-key-mapping",
+ "xml": "<for silentFailure='true' index='l' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping_length`' >",
+ "comments": "",
+ "outputs": 1,
+ "x": 886.1666412353516,
+ "y": 1425.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "c7cc9512.4faa18"
+ ]
+ ]
+ },
+ {
+ "id": "c7cc9512.4faa18",
+ "type": "block",
+ "name": "block atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1137.1666412353516,
+ "y": 1425.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "92dd255a.846018",
+ "17ff9631.56b25a",
+ "72c5b1f7.aa391",
+ "69144068.7c5f8"
+ ]
+ ]
+ },
+ {
+ "id": "17ff9631.56b25a",
+ "type": "set",
+ "name": "set length",
+ "xml": "<set>\n\t<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' value='`$highnum + 1`'/>\n",
+ "comments": "",
+ "x": 1406.1666412353516,
+ "y": 1461.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "9906e0de.d8aa9",
+ "type": "failure",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 749.8333129882812,
+ "y": 901.75,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "f76d9cc.08daa6"
+ ]
+ ]
+ },
+ {
+ "id": "72c5b1f7.aa391",
+ "type": "switchNode",
+ "name": "switch payload_length",
+ "xml": "<switch test=\"`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length == ''`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1442.1666412353516,
+ "y": 1394.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "4ffaaf1f.506fd",
+ "797447ba.d290d8"
+ ]
+ ]
+ },
+ {
+ "id": "4ffaaf1f.506fd",
+ "type": "outcome",
+ "name": "true",
+ "xml": "<outcome value='true'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1663.1666412353516,
+ "y": 1325.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "797447ba.d290d8",
+ "type": "other",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1670.1666412353516,
+ "y": 1443.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "b72432c2.1cb81"
+ ]
+ ]
+ },
+ {
+ "id": "c6434f37.1962d",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1213.4523658752441,
+ "y": 640.6546821594238,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "879b8f8b.c19ed"
+ ]
+ ]
+ },
+ {
+ "id": "831efa97.1c0588",
+ "type": "set",
+ "name": "set length",
+ "xml": "<set>\n\t<parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>\n",
+ "comments": "",
+ "x": 2183.1666412353516,
+ "y": 1443.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "da21f5c1.b6dc88",
+ "type": "set",
+ "name": "increment length",
+ "xml": "<set>\n\t<parameter name='num' value='`$num + 1`' />\n",
+ "comments": "",
+ "x": 2201.1666412353516,
+ "y": 1517.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "69144068.7c5f8",
+ "type": "set",
+ "name": "increment length",
+ "xml": "<set>\n\t<parameter name='highnum' value='`$highnum + 1`' />\n\n",
+ "comments": "",
+ "x": 1427.1666412353516,
+ "y": 1528.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "aa6d15b3.b54808",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1461.1666412353516,
+ "y": 1134.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "a560f52e.73b478",
+ "2dccbddc.c39b12"
+ ]
+ ]
+ },
+ {
+ "id": "2dccbddc.c39b12",
+ "type": "set",
+ "name": "increment length",
+ "xml": "<set>\n\t<parameter name='highnum' value='`$highnum + 1`' />\n",
+ "comments": "",
+ "x": 1676.1666412353516,
+ "y": 1194.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "8a6d87a5.167378",
+ "type": "block",
+ "name": "block atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 2001.1666412353516,
+ "y": 1444.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ [
+ "993132bf.1fc03",
+ "831efa97.1c0588",
+ "da21f5c1.b6dc88"
+ ]
+ ]
+ },
+ {
+ "id": "9eebb178.0f2de",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"BEFORE BlueprintProcessingClient\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 427.4999809265137,
+ "y": 787.083324432373,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "507cc1d.a43bf4",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"AFTER BlueprintProcessingClient\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 424.1666488647461,
+ "y": 942.0833320617676,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "c7fb6ab.3a33598",
+ "type": "execute",
+ "name": "printContext",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='`$pathname`' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 432.50000762939453,
+ "y": 1746.2500267028809,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "22187a30.f13be6",
+ "type": "set",
+ "name": "set pathname",
+ "xml": "<set>\n<parameter name='pathname' \n\tvalue=\"`'/var/tmp/ss-pnf-ra-assignment-' + \n\t$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.pnf-id + '.log'`\" />\n",
+ "comments": "",
+ "x": 438.75000762939453,
+ "y": 1693.7500247955322,
+ "z": "2b4129e2.7e3f56",
+ "wires": []
+ },
+ {
+ "id": "7905fcc3.ff7874",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"DONE: pnf-ra-assignment\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 416.25000381469727,
+ "y": 1647.5000247955322,
+ "z": "2b4129e2.7e3f56",
+ "wires": [
+ []
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json index 7511ed2f..3b3cbb28 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.json @@ -1,691 +1,585 @@ -[ - { - "id": "6215fee5.bddad", - "type": "dgstart", - "name": "DGSTART", - "outputs": 1, - "x": 136.66665649414062, - "y": 49.999996185302734, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "e0abbbb4.1691a8" - ] - ] - }, - { - "id": "c0b04192.50c06", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic='true'>", - "atomic": "true", - "comments": "", - "outputs": 1, - "x": 180.39286041259766, - "y": 162.7777862548828, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "c39465f2.9d0ab8", - "9ba3908c.b3993", - "9c2ed3b1.7a9c5", - "21cbbc15.66ca44", - "65e92b38.4daee4" - ] - ] - }, - { - "id": "7d5065be.a2599c", - "type": "method", - "name": "method self-serve-vf-module-unassign", - "xml": "<method rpc='self-serve-vf-module-unassign' mode='sync'>\n", - "comments": "", - "outputs": 1, - "x": 253.4285659790039, - "y": 104.7063512802124, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "c0b04192.50c06" - ] - ] - }, - { - "id": "e0abbbb4.1691a8", - "type": "service-logic", - "name": "GENERIC-RESOURCE-API ${project.version}", - "module": "GENERIC-RESOURCE-API", - "version": "${project.version}", - "comments": "", - "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='${project.version}'>", - "outputs": 1, - "x": 411.9048538208008, - "y": 50.19048881530762, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "7d5065be.a2599c" - ] - ] - }, - { - "id": "8fa17821.c8c998", - "type": "switchNode", - "name": "switch resource-resolution-data.status", - "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`'>\n", - "comments": "", - "outputs": 1, - "x": 505.2027587890625, - "y": 762.6786947250366, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "5b5326aa.c9a828", - "6d9494a.3f2206c", - "862297c.bf59968" - ] - ] - }, - { - "id": "5b5326aa.c9a828", - "type": "other", - "name": "SUCCESS", - "xml": "<outcome value='SUCCESS'>\n", - "comments": "", - "outputs": 1, - "x": 782.9053001403809, - "y": 763.0476579666138, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "9fffaa92.3e94f8" - ] - ] - }, - { - "id": "c39465f2.9d0ab8", - "type": "for", - "name": "foreach capability-order[]", - "xml": "<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >\n", - "comments": "", - "outputs": 1, - "x": 430.8452911376953, - "y": 250.03567695617676, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "f837bbd3.874678", - "b931e6cb.da94c8", - "d21e6f1d.1016c", - "89534d93.1f285" - ] - ] - }, - { - "id": "9fffaa92.3e94f8", - "type": "call", - "name": "call ss.capability-dg", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 988.0240325927734, - "y": 762.8095092773438, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "fc60047e.9fb338" - ] - ] - }, - { - "id": "f837bbd3.874678", - "type": "set", - "name": "ss.capability-name", - "xml": "<set>\n<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />\n\n<!--\nss.capability.execution-order\n-->", - "comments": "", - "x": 699.2023468017578, - "y": 249.98812866210938, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "b931e6cb.da94c8", - "type": "set", - "name": "set ss.capability.action = unassign", - "xml": "<set>\n<parameter name='ss.capability-action' value='unassign' />\n", - "comments": "", - "x": 747.9164886474609, - "y": 296.90471267700195, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "fc60047e.9fb338", - "type": "failure", - "name": "failure", - "xml": "<outcome value='failure'>\n", - "comments": "", - "outputs": 1, - "x": 1172.9165420532227, - "y": 762.8095703125, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "a1d1bb97.069c18" - ] - ] - }, - { - "id": "89534d93.1f285", - "type": "set", - "name": "set capability-dg", - "xml": "<set>\n<parameter name='ss.capability-dg' value=\"`'self-serve-' + $ss.capability.execution-order[$cidx]`\" />\n", - "comments": "", - "x": 696.678596496582, - "y": 344.13096809387207, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "21cbbc15.66ca44", - "type": "execute", - "name": "printContext", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-vf-unassign.log' />\n", - "comments": "", - "outputs": 1, - "x": 378.7739944458008, - "y": 1376.5357284545898, - "z": "6680f8ca.ebffb8", - "wires": [ - [] - ] - }, - { - "id": "9ba3908c.b3993", - "type": "set", - "name": "set ss.capability.execution-order[]", - "xml": "<set>\n<parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />\n<parameter name='ss.capability.execution-order[1]' value='mS-mac-address-assign' />\n<parameter name='ss.capability.execution-order[2]' value='eipam-ip-assign' />\n<parameter -name='ss.capability.execution-order[3]' value='netbox-ip-assign' />\n<parameter name='ss.capability.execution-order[4]' value='vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[5]' value='mS-vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[6]' value='alts-license-assign' />\n<parameter name='ss.capability.execution-order[7]' value='alts-entitlement-assign' />\n<parameter name='ss.capability.execution-order[8]' value='generate-name' />\n<parameter name='ss.capability.execution-order_length' value='9' />", - "comments": "", - "x": 455.9166946411133, - "y": 163, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "9e65963.9a3dd68", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`\" />\n", - "comments": "", - "x": 1555.4166564941406, - "y": 1117.9999961853027, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "a1d1bb97.069c18", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic='true'>", - "atomic": "true", - "comments": "", - "outputs": 1, - "x": 1337.035789489746, - "y": 763.3329639434814, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "9e65963.9a3dd68", - "4247535f.a8b05c", - "fbdfcf9e.431bd", - "28c4a99d.6f10c6", - "b86c7b66.596838", - "ac551aca.87f3c8" - ] - ] - }, - { - "id": "4247535f.a8b05c", - "type": "execute", - "name": "execute RestApiCallNode - PUT vf-module", - "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vfmodule.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vfmodule-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ss-vfmodule\" />\n\n", - "comments": "", - "outputs": 1, - "x": 1652.5832290649414, - "y": 1019.7069234848022, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "fa9ef1c0.afa1e", - "45457ce5.ba3554" - ] - ] - }, - { - "id": "fa9ef1c0.afa1e", - "type": "not-found", - "name": "not-found", - "xml": "<outcome value='not-found'>\n", - "comments": "", - "outputs": 1, - "x": 1927.1768951416016, - "y": 1073.7050771713257, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "56d2d025.0c556" - ] - ] - }, - { - "id": "45457ce5.ba3554", - "type": "failure", - "name": "failure", - "xml": "<outcome value='failure'>\n", - "comments": "", - "outputs": 1, - "x": 1919.6055297851562, - "y": 1020.2050971984863, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "56d2d025.0c556" - ] - ] - }, - { - "id": "56d2d025.0c556", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 2121.7378540039062, - "y": 1019.8493518829346, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "726d654.997219c" - ] - ] - }, - { - "id": "726d654.997219c", - "type": "configure", - "name": "set error-message", - "xml": "<set>\n<parameter name=\"error-message\" value=\"Failed to persist self-serve vf-module assignments during unassign in MD-SAL\" />\n", - "comments": "", - "outputs": 1, - "x": 2340.0236206054688, - "y": 1019.9922151565552, - "z": "6680f8ca.ebffb8", - "wires": [ - [] - ] - }, - { - "id": "fbdfcf9e.431bd", - "type": "set", - "name": "set vf data for restapi-call-node", - "xml": "<set>\n<parameter name='vf.vf-module-id'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />\n<parameter name='vf.vf-module-data.sdnc-request-header.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.`' />\n<parameter name='vf.vf-module-data.request-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.`' />\n<parameter name='vf.vf-module-data.service-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.`' />\n<parameter name='vf.vf-module-data.vnf-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.`' />\n<parameter name='vf.vf-module-data.vf-module-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.`' />\n<parameter name='vf.vf-module-data.vf-module-topology.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.`' />\n<parameter name='vf.vf-module-data.vf-module-level-oper-status.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.vf-module-input-parameters.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-input-parameters.`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.request-version'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.request-version`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.vf-module-name'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-name`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.tenant'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.tenant`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.aic-cloud-region'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-cloud-region`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.aic-clli'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-clli`' />", - "comments": "", - "x": 1614.0952529907227, - "y": 763.8249406814575, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "28c4a99d.6f10c6", - "type": "execute", - "name": "generate ss-vfmodule url replace service-instance-id", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.ss-vfmodule-assignments`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vfmodule-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.service-instance-id`\"/>\n", - "comments": "", - "outputs": 1, - "x": 1680.345199584961, - "y": 811.8249855041504, - "z": "6680f8ca.ebffb8", - "wires": [ - [] - ] - }, - { - "id": "b86c7b66.596838", - "type": "execute", - "name": "generate ss-vfmodule url - replace vnf-id", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-vfmodule-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vfmodule-url\"/>\n <parameter name=\"target\" value=\"{vnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.vnf-id`\"/>\n", - "comments": "", - "outputs": 1, - "x": 1644.6308975219727, - "y": 859.8839025497437, - "z": "6680f8ca.ebffb8", - "wires": [ - [] - ] - }, - { - "id": "ac551aca.87f3c8", - "type": "execute", - "name": "generate ss-vfmodule url - replace vf-module-id", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-vfmodule-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vfmodule-url\"/>\n <parameter name=\"target\" value=\"{vf-module-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`\"/>\n", - "comments": "", - "outputs": 1, - "x": 1666.5715713500977, - "y": 909.8004026412964, - "z": "6680f8ca.ebffb8", - "wires": [ - [] - ] - }, - { - "id": "9c2ed3b1.7a9c5", - "type": "set", - "name": "set ss.capability-type = vf-module", - "xml": "<set>\n<parameter name='ss.capability-type' value='vf-module' />\n", - "comments": "", - "x": 456.52378845214844, - "y": 206.00000667572021, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "6d9494a.3f2206c", - "type": "other", - "name": "DELETED", - "xml": "<outcome value='DELETED'>\n", - "comments": "", - "outputs": 1, - "x": 781.6666564941406, - "y": 859.642879486084, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "d7a7bd94.ef4ff" - ] - ] - }, - { - "id": "c4930fe.fd50af", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to unassign self-serve vf-module assignments because the status for ' + $ss.capability-name + ' is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`\"/>", - "comments": "", - "x": 1132.4047012329102, - "y": 1027.1905879974365, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "d7a7bd94.ef4ff", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", - "comments": "", - "outputs": 1, - "x": 938.1666488647461, - "y": 859.6428680419922, - "z": "6680f8ca.ebffb8", - "wires": [ - [] - ] - }, - { - "id": "862297c.bf59968", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 771.7380523681641, - "y": 991.8571815490723, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "4834af54.75b2c" - ] - ] - }, - { - "id": "ffba3e5c.b7c54", - "type": "record", - "name": "record", - "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`\"/>\n<parameter name=\"field2\" value=\"`'SS: ss.capability-name: ' + $ss.capability-name`\"/>\n", - "comments": "", - "outputs": 1, - "x": 1112.0239181518555, - "y": 951.1905632019043, - "z": "6680f8ca.ebffb8", - "wires": [ - [] - ] - }, - { - "id": "4834af54.75b2c", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic='true'>", - "atomic": "true", - "comments": "", - "outputs": 1, - "x": 939.4523468017578, - "y": 991.8572330474854, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "ffba3e5c.b7c54", - "c4930fe.fd50af" - ] - ] - }, - { - "id": "d21e6f1d.1016c", - "type": "for", - "name": "foreach vf-module-parameters.param[]", - "xml": "<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >\n", - "comments": "", - "outputs": 1, - "x": 765.6665954589844, - "y": 395.5952453613281, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "36153975.73d276", - "2926b6d0.39b40a" - ] - ] - }, - { - "id": "36153975.73d276", - "type": "switchNode", - "name": "switch capability-name param vs. execution", - "xml": "<switch test='`$ss.capability-name == $tmp.param.capability-name`'>\n", - "comments": "", - "outputs": 1, - "x": 1138.0594177246094, - "y": 441.2380380630493, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "b81d1a56.666918" - ] - ] - }, - { - "id": "b81d1a56.666918", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1401.5594177246094, - "y": 441.4880380630493, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "8fa17821.c8c998" - ] - ] - }, - { - "id": "2926b6d0.39b40a", - "type": "set", - "name": "tmp.param.capability-name", - "xml": "<set>\n<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />\n", - "comments": "", - "x": 1087.4164428710938, - "y": 395.8452482223511, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "4adf8877.8b7b48", - "type": "for", - "name": "for each vf module", - "xml": "<for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n", - "comments": "", - "outputs": 1, - "x": 1000.8887634277344, - "y": 1207.142822265625, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "794c2919.51d0e8" - ] - ] - }, - { - "id": "70cab900.ea1ee8", - "type": "comment", - "name": "Remove VF Module from service data", - "info": "", - "comments": "", - "x": 350.7142639160156, - "y": 1162.3812627792358, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "794c2919.51d0e8", - "type": "set", - "name": "move vf module to remove one", - "xml": "<set>\n\t<parameter name=\"tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx].\" value=\"$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].\" />\n\t\n", - "comments": "", - "x": 1244.4798965454102, - "y": 1207.1667881011963, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "65e92b38.4daee4", - "type": "switchNode", - "name": "switch vf-module_length", - "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n", - "comments": "", - "outputs": 1, - "x": 418.1466827392578, - "y": 1218.4844932556152, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "586a0bd3.b18144", - "bc68084b.283918" - ] - ] - }, - { - "id": "586a0bd3.b18144", - "type": "outcome", - "name": "1", - "xml": "<outcome value='1'>\n", - "comments": "", - "outputs": 1, - "x": 613.4800491333008, - "y": 1169.389100074768, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "ed8959f0.36d8a8" - ] - ] - }, - { - "id": "ed8959f0.36d8a8", - "type": "set", - "name": "Remove vf modules", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.\" value=\"\"/>\n\n", - "comments": "", - "x": 785.4798202514648, - "y": 1169.3892192840576, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "bc68084b.283918", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 612.1468048095703, - "y": 1263.1509094238281, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "caf3c8d0.bea748" - ] - ] - }, - { - "id": "7578e2bc.143aac", - "type": "set", - "name": "set new vf module length", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length\" value=\"`$lastidx`\"/>\n\n\t\n", - "comments": "", - "x": 1019.7762985229492, - "y": 1334.8652992248535, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "d8df61bf.20743", - "type": "set", - "name": "Remove the last vf module in the list", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx].\" value=\"\"/>\n", - "comments": "", - "x": 1055.4799118041992, - "y": 1290.9764366149902, - "z": "6680f8ca.ebffb8", - "wires": [] - }, - { - "id": "caf3c8d0.bea748", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 769.3847351074219, - "y": 1263.3889112472534, - "z": "6680f8ca.ebffb8", - "wires": [ - [ - "4adf8877.8b7b48", - "d8df61bf.20743", - "7578e2bc.143aac", - "c6fed918.aacf78" - ] - ] - }, - { - "id": "c6fed918.aacf78", - "type": "set", - "name": "set lastidx", - "xml": "<set>\n<parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />\n", - "comments": "EIPAM plug-in needs this attribute set with this name", - "x": 973.6190795898438, - "y": 1247.3811359405518, - "z": "6680f8ca.ebffb8", - "wires": [] - } -] +[
+ {
+ "id": "f4eaa017.b9ee4",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 178.57142639160156,
+ "y": 112.85714721679688,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "2d27338b.de495c"
+ ]
+ ]
+ },
+ {
+ "id": "afdc6297.d95d7",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 222.2976303100586,
+ "y": 225.63493728637695,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "63928540.2e035c",
+ "152fb44f.398a1c",
+ "7e8b2d63.3d0eb4",
+ "66438caf.b1a744",
+ "a9448525.0bfff8"
+ ]
+ ]
+ },
+ {
+ "id": "9785e3bb.501df",
+ "type": "method",
+ "name": "method self-serve-vf-module-unassign",
+ "xml": "<method rpc='self-serve-vf-module-unassign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 295.33333587646484,
+ "y": 167.56350231170654,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "afdc6297.d95d7"
+ ]
+ ]
+ },
+ {
+ "id": "2d27338b.de495c",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 453.8096237182617,
+ "y": 113.04763984680176,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "9785e3bb.501df"
+ ]
+ ]
+ },
+ {
+ "id": "63bc9da4.98ff04",
+ "type": "switchNode",
+ "name": "switch resource-resolution-data.status",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1050.4407969883505,
+ "y": 728.8692181450979,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "28267bea.6aece4",
+ "9ea4d273.b523b"
+ ]
+ ]
+ },
+ {
+ "id": "28267bea.6aece4",
+ "type": "other",
+ "name": "SUCCESS",
+ "xml": "<outcome value='SUCCESS'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1328.1433383396688,
+ "y": 729.238181386675,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "403ed1e6.64a47"
+ ]
+ ]
+ },
+ {
+ "id": "63928540.2e035c",
+ "type": "for",
+ "name": "foreach capability-order[]",
+ "xml": "<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 472.32149505615234,
+ "y": 352.892822265625,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "9a52858d.de8a98",
+ "5dd7ca05.5c7154",
+ "49b42a30.241904",
+ "389a0c55.fb0c94"
+ ]
+ ]
+ },
+ {
+ "id": "403ed1e6.64a47",
+ "type": "call",
+ "name": "call ss.capability-dg",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1533.2620707920614,
+ "y": 729.000032697405,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "6c757b17.2c3204",
+ "c9a54438.9d50a8"
+ ]
+ ]
+ },
+ {
+ "id": "9a52858d.de8a98",
+ "type": "set",
+ "name": "ss.capability-name",
+ "xml": "<set>\n<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />\n\n<!--\nss.capability.execution-order\n-->",
+ "comments": "",
+ "x": 740.6785507202148,
+ "y": 352.8452739715576,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "5dd7ca05.5c7154",
+ "type": "set",
+ "name": "set ss.capability.action = unassign",
+ "xml": "<set>\n<parameter name='ss.capability-action' value='unassign' />\n",
+ "comments": "",
+ "x": 789.392692565918,
+ "y": 399.7618579864502,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "6c757b17.2c3204",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1718.1545802525106,
+ "y": 729.0000937325613,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "1e50a1c0.ca957e"
+ ]
+ ]
+ },
+ {
+ "id": "389a0c55.fb0c94",
+ "type": "set",
+ "name": "set capability-dg",
+ "xml": "<set>\n<parameter name='ss.capability-dg' value=\"`'self-serve-' + $ss.capability.execution-order[$cidx]`\" />\n",
+ "comments": "",
+ "x": 738.1548004150391,
+ "y": 446.9881134033203,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "66438caf.b1a744",
+ "type": "execute",
+ "name": "printContext",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-vf-unassign.log' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 459.25020599365234,
+ "y": 1311.773832321167,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "152fb44f.398a1c",
+ "type": "set",
+ "name": "set ss.capability.execution-order[]",
+ "xml": "<set>\n<parameter name='ss.capability.execution-order[0]' value='mS-mac-address-assign' />\n<parameter name='ss.capability.execution-order[1]' value='mac-address-assign' />\n<parameter name='ss.capability.execution-order[2]' value='netbox-ip-assign' />\n<parameter name='ss.capability.execution-order[3]' value='eipam-ip-assignment' />\n<parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[5]' value='vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[6]' value='alts-license-assign' />\n<parameter name='ss.capability.execution-order[7]' value='alts-entitlement-assign' />\n<parameter name='ss.capability.execution-order[8]' value='generate-name' />\n<parameter name='ss.capability.execution-order_length' value='9' />",
+ "comments": "",
+ "x": 497.8214645385742,
+ "y": 225.85715103149414,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "57b30e91.cce25",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`\" />\n",
+ "comments": "",
+ "x": 2100.6546946934286,
+ "y": 1084.190519605364,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "1e50a1c0.ca957e",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1882.273827689034,
+ "y": 729.5234873635427,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "57b30e91.cce25",
+ "42fe0aff.60ba94",
+ "17081e14.468d22",
+ "8dd9156e.18bf28",
+ "e4eb9ed4.4d1cf",
+ "9aa77744.b645d8"
+ ]
+ ]
+ },
+ {
+ "id": "42fe0aff.60ba94",
+ "type": "execute",
+ "name": "execute RestApiCallNode - PUT vf-module",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vfmodule.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vfmodule-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ss-vfmodule\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2197.8212672642294,
+ "y": 985.8974469048635,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "3f7bc9ac.1f6ae6",
+ "b9b97982.05b048"
+ ]
+ ]
+ },
+ {
+ "id": "3f7bc9ac.1f6ae6",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2472.4149333408895,
+ "y": 1039.895600591387,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "c10fe69a.3e62c8"
+ ]
+ ]
+ },
+ {
+ "id": "b9b97982.05b048",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2464.8435679844442,
+ "y": 986.3956206185476,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "c10fe69a.3e62c8"
+ ]
+ ]
+ },
+ {
+ "id": "c10fe69a.3e62c8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 2666.9758922031942,
+ "y": 986.0398753029958,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "e1be1552.1aebd8"
+ ]
+ ]
+ },
+ {
+ "id": "e1be1552.1aebd8",
+ "type": "configure",
+ "name": "set error-message",
+ "xml": "<set>\n<parameter name=\"error-message\" value=\"Failed to persist self-serve vf-module assignments during unassign in MD-SAL\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2885.2616588047567,
+ "y": 986.1827385766164,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "17081e14.468d22",
+ "type": "set",
+ "name": "set vf data for restapi-call-node",
+ "xml": "<set>\n<parameter name='vf.vf-module-id'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />\n<parameter name='vf.vf-module-data.sdnc-request-header.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.`' />\n<parameter name='vf.vf-module-data.request-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.`' />\n<parameter name='vf.vf-module-data.service-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.`' />\n<parameter name='vf.vf-module-data.vnf-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.`' />\n<parameter name='vf.vf-module-data.vf-module-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.`' />\n<parameter name='vf.vf-module-data.vf-module-topology.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.`' />\n<parameter name='vf.vf-module-data.vf-module-level-oper-status.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.vf-module-input-parameters.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-input-parameters.`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.request-version'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.request-version`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.vf-module-name'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-name`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.tenant'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.tenant`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.aic-cloud-region'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-cloud-region`' />\n<parameter name='vf.vf-module-data.vf-module-request-input.aic-clli'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-clli`' />",
+ "comments": "",
+ "x": 2159.3332911900106,
+ "y": 730.0154641015188,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "8dd9156e.18bf28",
+ "type": "execute",
+ "name": "generate ss-vfmodule url replace service-instance-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.ss-vfmodule-assignments`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vfmodule-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.service-instance-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2225.583237784249,
+ "y": 778.0155089242116,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "e4eb9ed4.4d1cf",
+ "type": "execute",
+ "name": "generate ss-vfmodule url - replace vnf-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-vfmodule-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vfmodule-url\"/>\n <parameter name=\"target\" value=\"{vnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.vnf-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2189.8689357212606,
+ "y": 826.0744259698049,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9aa77744.b645d8",
+ "type": "execute",
+ "name": "generate ss-vfmodule url - replace vf-module-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-vfmodule-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vfmodule-url\"/>\n <parameter name=\"target\" value=\"{vf-module-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2211.8096095493856,
+ "y": 875.9909260613576,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7e8b2d63.3d0eb4",
+ "type": "set",
+ "name": "set ss.capability-type = vf-module",
+ "xml": "<set>\n<parameter name='ss.capability-type' value='vf-module' />\n",
+ "comments": "",
+ "x": 498.4285583496094,
+ "y": 268.85715770721436,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "9ea4d273.b523b",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1315.7261159739319,
+ "y": 781.7977116448537,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "fd5a91b8.f7a29"
+ ]
+ ]
+ },
+ {
+ "id": "fd5a91b8.f7a29",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`\"/>\n<parameter name=\"field2\" value=\"`'SS: ss.capability-name: ' + $ss.capability-name`\"/>\n<parameter name=\"field3\" value=\"`'SS: tmp.param.capability-name: ' + $tmp.param.capability-name`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1464.7619741282288,
+ "y": 782.1310923440114,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "49b42a30.241904",
+ "type": "for",
+ "name": "foreach vf-module-parameters.param[]",
+ "xml": "<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 807.1427993774414,
+ "y": 498.45239067077637,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "ff16d805.d2f948",
+ "d94d2835.4b35b8"
+ ]
+ ]
+ },
+ {
+ "id": "ff16d805.d2f948",
+ "type": "switchNode",
+ "name": "switch capability-name param vs. execution",
+ "xml": "<switch test='`$ss.capability-name == $tmp.param.capability-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1179.5356216430664,
+ "y": 544.0951833724976,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "f1afd266.1d837"
+ ]
+ ]
+ },
+ {
+ "id": "f1afd266.1d837",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1443.0356216430664,
+ "y": 544.3451833724976,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "14a0144f.03fb3c"
+ ]
+ ]
+ },
+ {
+ "id": "d94d2835.4b35b8",
+ "type": "set",
+ "name": "tmp.param.capability-name",
+ "xml": "<set>\n<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />\n",
+ "comments": "",
+ "x": 1128.8926467895508,
+ "y": 498.7023935317993,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "14a0144f.03fb3c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 748.0951625279017,
+ "y": 728.0952647072927,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "f49db851.8e73b8",
+ "63bc9da4.98ff04"
+ ]
+ ]
+ },
+ {
+ "id": "f49db851.8e73b8",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 943.428539276123,
+ "y": 1162.047595024109,
+ "z": "f6d2fe28.17718",
+ "wires": []
+ },
+ {
+ "id": "c9a54438.9d50a8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1738.5714530944824,
+ "y": 934.1071586608887,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "ec71a1e5.73bd2"
+ ]
+ ]
+ },
+ {
+ "id": "ec71a1e5.73bd2",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'DONE: ' + $ss.capability-dg`\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1882.3214530944824,
+ "y": 932.8571586608887,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fd2f49e7.d02308",
+ "type": "execute",
+ "name": "execute PropertiesNode",
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 887.7143456595286,
+ "y": 309.99998337881925,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a9448525.0bfff8",
+ "type": "switchNode",
+ "name": "switch prop.controller.user",
+ "xml": "<switch test='`$prop.controller.user`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 476.42858123779297,
+ "y": 310.42860412597656,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "b256cdf4.5509e"
+ ]
+ ]
+ },
+ {
+ "id": "b256cdf4.5509e",
+ "type": "failure",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 676.2856766836985,
+ "y": 310.00001866476896,
+ "z": "f6d2fe28.17718",
+ "wires": [
+ [
+ "fd2f49e7.d02308"
+ ]
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-unassign.json index 68b63508..a5fe752b 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-unassign.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_self-serve-vnf-unassign.json @@ -1,664 +1,570 @@ -[ - { - "id": "a6385a9d.53bbd8", - "type": "dgstart", - "name": "DGSTART", - "outputs": 1, - "x": 210, - "y": 41.42857360839844, - "z": "50509cff.314024", - "wires": [ - [ - "68771f71.1c988" - ] - ] - }, - { - "id": "c2830c02.352ca", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic='true'>", - "atomic": "true", - "comments": "", - "outputs": 1, - "x": 253.72620391845703, - "y": 160.20636367797852, - "z": "50509cff.314024", - "wires": [ - [ - "7a7eb5ea.d9c27c", - "cadde72f.768658", - "61da759.184e28c", - "8603e753.202d08", - "ee44abff.0a52c8" - ] - ] - }, - { - "id": "df83a576.0a03c8", - "type": "method", - "name": "method self-serve-vnf-unassign", - "xml": "<method rpc='self-serve-vnf-unassign' mode='sync'>\n", - "comments": "", - "outputs": 1, - "x": 326.7619094848633, - "y": 96.1349287033081, - "z": "50509cff.314024", - "wires": [ - [ - "c2830c02.352ca" - ] - ] - }, - { - "id": "68771f71.1c988", - "type": "service-logic", - "name": "GENERIC-RESOURCE-API ${project.version}", - "module": "GENERIC-RESOURCE-API", - "version": "${project.version}", - "comments": "", - "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='${project.version}'>", - "outputs": 1, - "x": 485.23819732666016, - "y": 41.61906623840332, - "z": "50509cff.314024", - "wires": [ - [ - "df83a576.0a03c8" - ] - ] - }, - { - "id": "d04042ce.4a948", - "type": "for", - "name": "foreach vnf-parameters-data.param[]", - "xml": "<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >\n", - "comments": "", - "outputs": 1, - "x": 842.4645538330078, - "y": 386.1309928894043, - "z": "50509cff.314024", - "wires": [ - [ - "bcabf14.e18d21", - "5506226b.04018c" - ] - ] - }, - { - "id": "20db9a83.47e506", - "type": "switchNode", - "name": "switch resource-resolution-data.status", - "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`'>\n", - "comments": "", - "outputs": 1, - "x": 579.1789703369141, - "y": 782.9287061691284, - "z": "50509cff.314024", - "wires": [ - [ - "af96cd32.20d99", - "8025d892.0ac388", - "acbf2cb7.1041" - ] - ] - }, - { - "id": "af96cd32.20d99", - "type": "other", - "name": "SUCCESS", - "xml": "<outcome value='SUCCESS'>\n", - "comments": "", - "outputs": 1, - "x": 854.5719718933105, - "y": 783.6429615020752, - "z": "50509cff.314024", - "wires": [ - [ - "cd65f121.8b137" - ] - ] - }, - { - "id": "7a7eb5ea.d9c27c", - "type": "for", - "name": "foreach capability-order[]", - "xml": "<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >\n", - "comments": "", - "outputs": 1, - "x": 508.0357894897461, - "y": 241.32139778137207, - "z": "50509cff.314024", - "wires": [ - [ - "697d23ef.8a2fbc", - "5b9beee2.2b424", - "d04042ce.4a948", - "9b2708ec.431508" - ] - ] - }, - { - "id": "bcabf14.e18d21", - "type": "switchNode", - "name": "switch param capability-name == execution", - "xml": "<switch test='`$ss.capability-name == $tmp.param.capability-name`'>\n", - "comments": "", - "outputs": 1, - "x": 1198.3574676513672, - "y": 429.85712242126465, - "z": "50509cff.314024", - "wires": [ - [ - "4c332048.14e83" - ] - ] - }, - { - "id": "4c332048.14e83", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 1461.8574676513672, - "y": 430.10712242126465, - "z": "50509cff.314024", - "wires": [ - [ - "20db9a83.47e506" - ] - ] - }, - { - "id": "cd65f121.8b137", - "type": "call", - "name": "call ss.capability-dg", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 1059.6907043457031, - "y": 783.4048128128052, - "z": "50509cff.314024", - "wires": [ - [ - "7c9a62de.b663cc" - ] - ] - }, - { - "id": "697d23ef.8a2fbc", - "type": "set", - "name": "ss.capability-name", - "xml": "<set>\n<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />\n\n<!--\nss.capability.execution-order[]\n-->\n", - "comments": "", - "x": 788.3928451538086, - "y": 241.2738494873047, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "5506226b.04018c", - "type": "set", - "name": "tmp.param.capability-name", - "xml": "<set>\n<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />\n", - "comments": "", - "x": 1147.7144927978516, - "y": 384.4643325805664, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "5b9beee2.2b424", - "type": "set", - "name": "set ss.capability.action = unassign", - "xml": "<set>\n<parameter name='ss.capability-action' value='unassign' />\n", - "comments": "", - "x": 835.1069869995117, - "y": 288.19043350219727, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "7c9a62de.b663cc", - "type": "failure", - "name": "failure", - "xml": "<outcome value='failure'>\n", - "comments": "", - "outputs": 1, - "x": 1244.5832138061523, - "y": 783.4048738479614, - "z": "50509cff.314024", - "wires": [ - [ - "5ae85112.18d99" - ] - ] - }, - { - "id": "9b2708ec.431508", - "type": "set", - "name": "set capability-dg", - "xml": "<set>\n<parameter name='ss.capability-dg' value=\"`'self-serve-' + $ss.capability.execution-order[$cidx]`\" />\n", - "comments": "", - "x": 779.5356750488281, - "y": 337.08334732055664, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "bad23ec5.376d3", - "type": "execute", - "name": "generate ss-vnf url replace service-instance-id", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.ss-vnf-assignments`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vnf-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id`\"/>\n", - "comments": "", - "outputs": 1, - "x": 1727.4405975341797, - "y": 837.2865991592407, - "z": "50509cff.314024", - "wires": [ - [] - ] - }, - { - "id": "fbec284e.585d38", - "type": "execute", - "name": "execute RestApiCallNode - PUT vnf", - "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vnf.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vnf-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ss-vnf\" />\n\n", - "comments": "", - "outputs": 1, - "x": 1696.9048919677734, - "y": 940.1438207626343, - "z": "50509cff.314024", - "wires": [ - [ - "c47e36eb.d05728", - "b96d7225.bf08f" - ] - ] - }, - { - "id": "c47e36eb.d05728", - "type": "not-found", - "name": "not-found", - "xml": "<outcome value='not-found'>\n", - "comments": "", - "outputs": 1, - "x": 1971.4985580444336, - "y": 994.1419744491577, - "z": "50509cff.314024", - "wires": [ - [ - "e88954ca.906d58" - ] - ] - }, - { - "id": "b96d7225.bf08f", - "type": "failure", - "name": "failure", - "xml": "<outcome value='failure'>\n", - "comments": "", - "outputs": 1, - "x": 1963.9271926879883, - "y": 940.6419944763184, - "z": "50509cff.314024", - "wires": [ - [ - "e88954ca.906d58" - ] - ] - }, - { - "id": "e88954ca.906d58", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 2166.0595169067383, - "y": 940.2862491607666, - "z": "50509cff.314024", - "wires": [ - [ - "80bd3596.06daa8" - ] - ] - }, - { - "id": "80bd3596.06daa8", - "type": "configure", - "name": "set error-message", - "xml": "<set>\n<parameter name=\"error-message\" value=\"Error persisting self-serve vnf assignments in MD-SAL during unassign\" />\n", - "comments": "", - "outputs": 1, - "x": 2384.345283508301, - "y": 940.4291124343872, - "z": "50509cff.314024", - "wires": [ - [] - ] - }, - { - "id": "5acff27f.210b1c", - "type": "set", - "name": "set vf data for restapi-call-node", - "xml": "<set>\n<parameter name='vf.vnf-id'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-id`' />\n<parameter name='vf.vnf-data.sdnc-request-header.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.`' />\n<parameter name='vf.vnf-data.request-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.`' />\n<parameter name='vf.vnf-data.service-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.`' />\n<parameter name='vf.vnf-data.vnf-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.`' />\n<parameter name='vf.vnf-data.vnf-request-input.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.`' />\n<parameter name='vf.vnf-data.vnf-request-input.vnf-input-parameters.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.`' />\n<parameter name='vf.vnf-data.vnf-topology.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.`' />\n<parameter name='vf.vnf-data.vnf-level-oper-status.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.`' />", - "comments": "", - "x": 1679.8928985595703, - "y": 783.3811111450195, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "3ed081d1.8cc08e", - "type": "execute", - "name": "generate ss-vnf url - replace vnf-id", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-vnf-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vnf-url\"/>\n <parameter name=\"target\" value=\"{vnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-id`\"/>\n", - "comments": "", - "outputs": 1, - "x": 1691.726303100586, - "y": 888.0953674316406, - "z": "50509cff.314024", - "wires": [ - [] - ] - }, - { - "id": "5ae85112.18d99", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic='true'>", - "atomic": "true", - "comments": "", - "outputs": 1, - "x": 1405.535888671875, - "y": 783.1429853439331, - "z": "50509cff.314024", - "wires": [ - [ - "bad23ec5.376d3", - "fbec284e.585d38", - "5acff27f.210b1c", - "3ed081d1.8cc08e", - "4e5f969d.6392c8" - ] - ] - }, - { - "id": "4e5f969d.6392c8", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to unassign self-serve vnf assignments for ' + $ss.capability-dg + ' with error: ' + $error-message`\" />\n", - "comments": "", - "x": 1626.4408569335938, - "y": 1067.9167687892914, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "8603e753.202d08", - "type": "execute", - "name": "printContext", - "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-vnf-assign.log' />\n", - "comments": "", - "outputs": 1, - "x": 469.1193313598633, - "y": 1437.488163948059, - "z": "50509cff.314024", - "wires": [ - [] - ] - }, - { - "id": "cadde72f.768658", - "type": "set", - "name": "set ss.capability.execution-order[]", - "xml": "<set>\n<parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />\n<parameter name='ss.capability.execution-order[1]' value='mS-mac-address-assign' />\n<parameter name='ss.capability.execution-order[2]' value='eipam-ip-assign' />\n<parameter -name='ss.capability.execution-order[3]' value='netbox-ip-assign' />\n<parameter name='ss.capability.execution-order[4]' value='vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[5]' value='mS-vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[6]' value='alts-license-assign' />\n<parameter name='ss.capability.execution-order[7]' value='alts-entitlement-assign' />\n<parameter name='ss.capability.execution-order[8]' value='generate-name' />\n<parameter name='ss.capability.execution-order_length' value='9' />", - "comments": "", - "x": 533.2500381469727, - "y": 160.4285774230957, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "8025d892.0ac388", - "type": "other", - "name": "DELETED", - "xml": "<outcome value='DELETED'>\n", - "comments": "", - "outputs": 1, - "x": 855.0714416503906, - "y": 850.1785583496094, - "z": "50509cff.314024", - "wires": [ - [ - "3057289e.008328" - ] - ] - }, - { - "id": "61da759.184e28c", - "type": "set", - "name": "set ss.capability-type = vnf", - "xml": "<set>\n<parameter name='ss.capability-type' value='vnf' />\n", - "comments": "", - "x": 512.8571395874023, - "y": 200.00000762939453, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "6b6d2942.d47c48", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to unassign self-serve vnf assignments because the status for ' + $ss.capability-name + ' is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`\"/>", - "comments": "", - "x": 1237.1428833007812, - "y": 960.3929593222483, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "3057289e.008328", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", - "comments": "", - "outputs": 1, - "x": 1011.5714340209961, - "y": 850.1785469055176, - "z": "50509cff.314024", - "wires": [ - [] - ] - }, - { - "id": "acbf2cb7.1041", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 846.1428375244141, - "y": 908.3928604125977, - "z": "50509cff.314024", - "wires": [ - [ - "c1c0b7f6.69a4e8" - ] - ] - }, - { - "id": "70287cdc.85b194", - "type": "record", - "name": "record", - "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`\"/>\n<parameter name=\"field2\" value=\"`'SS: ss.capability-name: ' + $ss.capability-name`\"/>", - "comments": "", - "outputs": 1, - "x": 1216.4285888671875, - "y": 908.3929659979685, - "z": "50509cff.314024", - "wires": [ - [] - ] - }, - { - "id": "c1c0b7f6.69a4e8", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic='true'>", - "atomic": "true", - "comments": "", - "outputs": 1, - "x": 1032.8571319580078, - "y": 908.3929119110107, - "z": "50509cff.314024", - "wires": [ - [ - "70287cdc.85b194", - "6b6d2942.d47c48" - ] - ] - }, - { - "id": "1c8c4c56.6f0bc4", - "type": "for", - "name": "for each vnf", - "xml": "<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n", - "comments": "", - "outputs": 1, - "x": 1036.6666145324707, - "y": 1267.381091117859, - "z": "50509cff.314024", - "wires": [ - [ - "39ffbb9b.5384c4" - ] - ] - }, - { - "id": "48bdb965.fbf268", - "type": "comment", - "name": "Remove VNF from service data", - "info": "", - "comments": "", - "x": 448.825382232666, - "y": 1225.9527435302734, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "39ffbb9b.5384c4", - "type": "set", - "name": "move vnf to remove one", - "xml": "<set>\n\t<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n", - "comments": "", - "x": 1270.2577476501465, - "y": 1266.4050426483154, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "ee44abff.0a52c8", - "type": "switchNode", - "name": "switch vnf_length", - "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", - "comments": "", - "outputs": 1, - "x": 492.92447662353516, - "y": 1268.9607200622559, - "z": "50509cff.314024", - "wires": [ - [ - "3c166715.7796b8", - "62f98baa.f6f574" - ] - ] - }, - { - "id": "3c166715.7796b8", - "type": "outcome", - "name": "1", - "xml": "<outcome value='1'>\n", - "comments": "", - "outputs": 1, - "x": 669.9245185852051, - "y": 1229.6273069381714, - "z": "50509cff.314024", - "wires": [ - [ - "8af99073.0156" - ] - ] - }, - { - "id": "8af99073.0156", - "type": "set", - "name": "Remove vnfs", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n", - "comments": "", - "x": 833.5910148620605, - "y": 1229.6274061203003, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "62f98baa.f6f574", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 671.4484100341797, - "y": 1313.103446006775, - "z": "50509cff.314024", - "wires": [ - [ - "b4f726ae.38e868" - ] - ] - }, - { - "id": "c1ef091a.99d9e8", - "type": "set", - "name": "set new vnf length", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n", - "comments": "", - "x": 1056.220703125, - "y": 1357.9606647491455, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "2c024236.55d4ae", - "type": "set", - "name": "Remove the last vnf in the list", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1].\" value=\"\"/>\n\n", - "comments": "", - "x": 1091.92435836792, - "y": 1313.0716857910156, - "z": "50509cff.314024", - "wires": [] - }, - { - "id": "b4f726ae.38e868", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 837.2577514648438, - "y": 1313.6272268295288, - "z": "50509cff.314024", - "wires": [ - [ - "1c8c4c56.6f0bc4", - "2c024236.55d4ae", - "c1ef091a.99d9e8" - ] - ] - } -] +[
+ {
+ "id": "76165194.b6c96",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 165.71429443359375,
+ "y": 75.71428680419922,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "236f2975.7a6d96"
+ ]
+ ]
+ },
+ {
+ "id": "5e292d5b.0c61b4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 209.44049835205078,
+ "y": 194.4920768737793,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "8e6fd286.da7e4",
+ "9cf90cf3.4244d",
+ "c41a4b38.3c8b38",
+ "f9a09d54.7ab46",
+ "59a68f10.20a5"
+ ]
+ ]
+ },
+ {
+ "id": "c3f3aa48.2e3088",
+ "type": "method",
+ "name": "method self-serve-vnf-unassign",
+ "xml": "<method rpc='self-serve-vnf-unassign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 282.47620391845703,
+ "y": 130.4206418991089,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "5e292d5b.0c61b4"
+ ]
+ ]
+ },
+ {
+ "id": "236f2975.7a6d96",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 440.9524917602539,
+ "y": 75.9047794342041,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "c3f3aa48.2e3088"
+ ]
+ ]
+ },
+ {
+ "id": "aed7b0d8.edb31",
+ "type": "for",
+ "name": "foreach vnf-parameters-data.param[]",
+ "xml": "<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 792.4646072387695,
+ "y": 473.2738456726074,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "4c583cb3.a2e9b4",
+ "d15480d3.12273"
+ ]
+ ]
+ },
+ {
+ "id": "13c9ccf0.5ce9c3",
+ "type": "switchNode",
+ "name": "switch resource-resolution-data.status",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1091.5598983764648,
+ "y": 695.5477423667908,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "e71d8f06.04b4e",
+ "f1d7b373.953da"
+ ]
+ ]
+ },
+ {
+ "id": "e71d8f06.04b4e",
+ "type": "other",
+ "name": "SUCCESS",
+ "xml": "<outcome value='SUCCESS'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1366.9528999328613,
+ "y": 696.2619976997375,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "17e4f190.77d57e"
+ ]
+ ]
+ },
+ {
+ "id": "8e6fd286.da7e4",
+ "type": "for",
+ "name": "foreach capability-order[]",
+ "xml": "<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 458.0358428955078,
+ "y": 328.4642505645752,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "53aeb795.8d7128",
+ "fc9f38f4.0c2118",
+ "aed7b0d8.edb31",
+ "88725cd7.d671f"
+ ]
+ ]
+ },
+ {
+ "id": "4c583cb3.a2e9b4",
+ "type": "switchNode",
+ "name": "switch param capability-name == execution",
+ "xml": "<switch test='`$ss.capability-name == $tmp.param.capability-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1148.357521057129,
+ "y": 516.9999752044678,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "b2f5ce63.5ec31"
+ ]
+ ]
+ },
+ {
+ "id": "b2f5ce63.5ec31",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1411.857521057129,
+ "y": 517.2499752044678,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "6eaca446.a10d9c"
+ ]
+ ]
+ },
+ {
+ "id": "17e4f190.77d57e",
+ "type": "call",
+ "name": "call ss.capability-dg",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1572.071632385254,
+ "y": 696.0238490104675,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "d6448b55.e69ab8",
+ "87e5a636.7bc3f8"
+ ]
+ ]
+ },
+ {
+ "id": "53aeb795.8d7128",
+ "type": "set",
+ "name": "ss.capability-name",
+ "xml": "<set>\n<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />\n\n<!--\nss.capability.execution-order[]\n-->\n",
+ "comments": "",
+ "x": 738.3928985595703,
+ "y": 328.4167022705078,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "d15480d3.12273",
+ "type": "set",
+ "name": "tmp.param.capability-name",
+ "xml": "<set>\n<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />\n",
+ "comments": "",
+ "x": 1097.7145462036133,
+ "y": 471.60718536376953,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "fc9f38f4.0c2118",
+ "type": "set",
+ "name": "set ss.capability.action = unassign",
+ "xml": "<set>\n<parameter name='ss.capability-action' value='unassign' />\n",
+ "comments": "",
+ "x": 785.1070404052734,
+ "y": 375.3332862854004,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "d6448b55.e69ab8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1756.9641418457031,
+ "y": 696.0239100456238,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "2977dc30.549ee4"
+ ]
+ ]
+ },
+ {
+ "id": "88725cd7.d671f",
+ "type": "set",
+ "name": "set capability-dg",
+ "xml": "<set>\n<parameter name='ss.capability-dg' value=\"`'self-serve-' + $ss.capability.execution-order[$cidx]`\" />\n",
+ "comments": "",
+ "x": 729.5357284545898,
+ "y": 424.22620010375977,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "cd466606.4c16b8",
+ "type": "execute",
+ "name": "generate ss-vnf url replace service-instance-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.ss-vnf-assignments`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vnf-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2239.8215255737305,
+ "y": 749.9056353569031,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "facf39f.6d396c8",
+ "type": "execute",
+ "name": "execute RestApiCallNode - PUT vnf",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vnf.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vnf-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ss-vnf\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2209.285820007324,
+ "y": 852.7628569602966,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "d6b3aa2.7030758",
+ "4ad4756c.b7b35c"
+ ]
+ ]
+ },
+ {
+ "id": "d6b3aa2.7030758",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2483.8794860839844,
+ "y": 906.7610106468201,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "f21e0168.83df2"
+ ]
+ ]
+ },
+ {
+ "id": "4ad4756c.b7b35c",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2476.308120727539,
+ "y": 853.2610306739807,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "f21e0168.83df2"
+ ]
+ ]
+ },
+ {
+ "id": "f21e0168.83df2",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 2678.440444946289,
+ "y": 852.905285358429,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "3798eb1e.07c1a4"
+ ]
+ ]
+ },
+ {
+ "id": "3798eb1e.07c1a4",
+ "type": "configure",
+ "name": "set error-message",
+ "xml": "<set>\n<parameter name=\"error-message\" value=\"Error persisting self-serve vnf assignments in MD-SAL during unassign\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2896.7262115478516,
+ "y": 853.0481486320496,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d4697d10.10b26",
+ "type": "set",
+ "name": "set vf data for restapi-call-node",
+ "xml": "<set>\n<parameter name='vf.vnf-id'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-id`' />\n<parameter name='vf.vnf-data.sdnc-request-header.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.`' />\n<parameter name='vf.vnf-data.request-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.`' />\n<parameter name='vf.vnf-data.service-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.`' />\n<parameter name='vf.vnf-data.vnf-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.`' />\n<parameter name='vf.vnf-data.vnf-request-input.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.`' />\n<parameter name='vf.vnf-data.vnf-request-input.vnf-input-parameters.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.`' />\n<parameter name='vf.vnf-data.vnf-topology.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.`' />\n<parameter name='vf.vnf-data.vnf-level-oper-status.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.`' />",
+ "comments": "",
+ "x": 2192.273826599121,
+ "y": 696.0001473426819,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "f5cfb551.80d6c8",
+ "type": "execute",
+ "name": "generate ss-vnf url - replace vnf-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-vnf-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vnf-url\"/>\n <parameter name=\"target\" value=\"{vnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2204.1072311401367,
+ "y": 800.714403629303,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2977dc30.549ee4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1917.9168167114258,
+ "y": 695.7620215415955,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "cd466606.4c16b8",
+ "facf39f.6d396c8",
+ "d4697d10.10b26",
+ "f5cfb551.80d6c8",
+ "d61e4f37.d59c8"
+ ]
+ ]
+ },
+ {
+ "id": "d61e4f37.d59c8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to unassign self-serve vnf assignments for ' + $ss.capability-dg + ' with error: ' + $error-message`\" />\n",
+ "comments": "",
+ "x": 2138.8217849731445,
+ "y": 980.5358049869537,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "f9a09d54.7ab46",
+ "type": "execute",
+ "name": "printContext",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-vnf-assign.log' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 406.26222229003906,
+ "y": 1234.6311283111572,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9cf90cf3.4244d",
+ "type": "set",
+ "name": "set ss.capability.execution-order[]",
+ "xml": "<set>\n<parameter name='ss.capability.execution-order[0]' value='mS-mac-address-assign' />\n<parameter name='ss.capability.execution-order[1]' value='mac-address-assign' />\n<parameter name='ss.capability.execution-order[2]' value='netbox-ip-assign' />\n<parameter name='ss.capability.execution-order[3]' value='eipam-ip-assignment' />\n<parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[5]' value='vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[6]' value='alts-license-assign' />\n<parameter name='ss.capability.execution-order[7]' value='alts-entitlement-assign' />\n<parameter name='ss.capability.execution-order[8]' value='generate-name' />\n<parameter name='ss.capability.execution-order_length' value='9' />",
+ "comments": "",
+ "x": 488.9643325805664,
+ "y": 194.71429061889648,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "c41a4b38.3c8b38",
+ "type": "set",
+ "name": "set ss.capability-type = vnf",
+ "xml": "<set>\n<parameter name='ss.capability-type' value='vnf' />\n",
+ "comments": "",
+ "x": 468.5714340209961,
+ "y": 234.2857208251953,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "f1d7b373.953da",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1357.2737617492676,
+ "y": 763.511917591095,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "770743b2.c0595c"
+ ]
+ ]
+ },
+ {
+ "id": "770743b2.c0595c",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`\"/>\n<parameter name=\"field2\" value=\"`'SS: ss.capability-name: ' + $ss.capability-name`\"/>\n<parameter name=\"field3\" value=\"`'SS: tmp.param.capability-name: ' + $tmp.param.capability-name`\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1505.3809432983398,
+ "y": 763.5476231575012,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6eaca446.a10d9c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 807.1428298950195,
+ "y": 695.6666359901428,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "ae3d848d.b63f78",
+ "13c9ccf0.5ce9c3"
+ ]
+ ]
+ },
+ {
+ "id": "ae3d848d.b63f78",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 985.5714721679688,
+ "y": 1128.2381744384766,
+ "z": "303dc9e1.28f7b6",
+ "wires": []
+ },
+ {
+ "id": "87e5a636.7bc3f8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1784.4643249511719,
+ "y": 881.964298248291,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "c5b341ce.afbb1"
+ ]
+ ]
+ },
+ {
+ "id": "c5b341ce.afbb1",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'DONE: ' + $ss.capability-dg`\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1928.2143249511719,
+ "y": 880.714298248291,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a4639d29.fba05",
+ "type": "execute",
+ "name": "execute PropertiesNode",
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 877.7143685477122,
+ "y": 281.0000043596541,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "59a68f10.20a5",
+ "type": "switchNode",
+ "name": "switch prop.controller.user",
+ "xml": "<switch test='`$prop.controller.user`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 466.42860412597656,
+ "y": 281.4286251068115,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "e826631e.9bcf2"
+ ]
+ ]
+ },
+ {
+ "id": "e826631e.9bcf2",
+ "type": "failure",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 666.2856995718821,
+ "y": 281.0000396456038,
+ "z": "303dc9e1.28f7b6",
+ "wires": [
+ [
+ "a4639d29.fba05"
+ ]
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-pnf-input.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-pnf-input.json new file mode 100644 index 00000000..13054675 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_validate-pnf-input.json @@ -0,0 +1,573 @@ +[
+ {
+ "id": "94367b34.4993c8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 244.44442749023438,
+ "y": 363.3055624961853,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "e96f0aba.6a2158",
+ "145655c7.5c421a",
+ "740fde80.5f9e8",
+ "a75da30.d5ab06",
+ "6154264e.c73678",
+ "4710ed3d.659744"
+ ]
+ ]
+ },
+ {
+ "id": "e96f0aba.6a2158",
+ "type": "switchNode",
+ "name": "switch svc-request-id",
+ "xml": "<switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-request-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 502.20633697509766,
+ "y": 321.13589811325073,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "b12a28ac.b7b9b8"
+ ]
+ ]
+ },
+ {
+ "id": "b12a28ac.b7b9b8",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 727.9206314086914,
+ "y": 321.135901927948,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "8cc94a69.eb44f8"
+ ]
+ ]
+ },
+ {
+ "id": "8cc94a69.eb44f8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"sdnc-request-header.svc-request-id is a required input\" />\n",
+ "comments": "",
+ "x": 879.3491973876953,
+ "y": 321.13590002059937,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "145655c7.5c421a",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 490.7777001517161,
+ "y": 279.7073296819415,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "35e01edd.5783a2"
+ ]
+ ]
+ },
+ {
+ "id": "35e01edd.5783a2",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 726.4920518057688,
+ "y": 278.27872746331354,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "6beabba6.32f4f4"
+ ]
+ ]
+ },
+ {
+ "id": "6beabba6.32f4f4",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"sdnc-request-header.svc-action is a required input\" />\n",
+ "comments": "",
+ "x": 876.492025102888,
+ "y": 278.2787370000567,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "740fde80.5f9e8",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$pnf-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 500.7777535574778,
+ "y": 363.9930447850909,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "ef526c4a.39c59"
+ ]
+ ]
+ },
+ {
+ "id": "ef526c4a.39c59",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 727.9206270490376,
+ "y": 363.99305568422596,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "c2c067b2.6d5ab8"
+ ]
+ ]
+ },
+ {
+ "id": "c2c067b2.6d5ab8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"request-information.request-action is a required input\" />\n",
+ "comments": "",
+ "x": 879.3491930280416,
+ "y": 363.99305377687733,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "79e4afb1.99cc8",
+ "type": "switchNode",
+ "name": "switch model-customization-id",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1119.242275238037,
+ "y": 511.4218182563782,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "e37ed67.814bf28"
+ ]
+ ]
+ },
+ {
+ "id": "e37ed67.814bf28",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1324.242275238037,
+ "y": 511.4218010902405,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "d757cb77.2c7958"
+ ]
+ ]
+ },
+ {
+ "id": "d757cb77.2c7958",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"pnf-details.onap-model-information.model-customization-uuid is a required input\" />\n",
+ "comments": "",
+ "x": 1475.670841217041,
+ "y": 511.42179918289185,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "a14b5bac.e97828",
+ "type": "switchNode",
+ "name": "switch tenant",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-request-input.tenant`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1065.0993537902832,
+ "y": 552.8503289222717,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "9f4a40d4.27fdf"
+ ]
+ ]
+ },
+ {
+ "id": "9f4a40d4.27fdf",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1322.8136711120605,
+ "y": 552.8503632545471,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "21e1ea3d.d3d876"
+ ]
+ ]
+ },
+ {
+ "id": "21e1ea3d.d3d876",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"pnf-request-input.tenant is a required input\" />\n",
+ "comments": "",
+ "x": 1474.2422370910645,
+ "y": 552.8503613471985,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "c290417a.999bd",
+ "type": "comment",
+ "name": "Validation of required fields",
+ "info": "",
+ "comments": "",
+ "x": 650.7777099609375,
+ "y": 235.42161226272583,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "a75da30.d5ab06",
+ "type": "switchNode",
+ "name": "switch svc-action",
+ "xml": "<switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 484.7658462524414,
+ "y": 553.1003041267395,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "ade91738.c2dee8"
+ ]
+ ]
+ },
+ {
+ "id": "ade91738.c2dee8",
+ "type": "outcome",
+ "name": "assign",
+ "xml": "<outcome value='assign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 661.8491668701172,
+ "y": 552.6836438179016,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "9de99c30.2439d"
+ ]
+ ]
+ },
+ {
+ "id": "9de99c30.2439d",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 858.5157775878906,
+ "y": 552.6836438179016,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "79e4afb1.99cc8",
+ "a14b5bac.e97828",
+ "5a47ef2e.17f48"
+ ]
+ ]
+ },
+ {
+ "id": "621027e3.a05c68",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 163.19443729945579,
+ "y": 107.9692120552063,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "fd592892.32a8c8"
+ ]
+ ]
+ },
+ {
+ "id": "fd592892.32a8c8",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 276.48014286586204,
+ "y": 148.20732355117798,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "80133c43.3b152"
+ ]
+ ]
+ },
+ {
+ "id": "80133c43.3b152",
+ "type": "method",
+ "name": "method validate-pnf-input",
+ "xml": "<method rpc='validate-pnf-input' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 211.87306431361594,
+ "y": 189.21920824050903,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "94367b34.4993c8"
+ ]
+ ]
+ },
+ {
+ "id": "f8dbb90e.a422b8",
+ "type": "comment",
+ "name": "validate-pnf-input",
+ "info": "",
+ "comments": "",
+ "x": 557.5392935616628,
+ "y": 55.55555582046509,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "6154264e.c73678",
+ "type": "switchNode",
+ "name": "switch service-instance-id",
+ "xml": "<switch test='`$pnf-topology-operation-input.service-information.service-instance-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 513.8015845162527,
+ "y": 408.05557107925415,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "2ce54a7d.5835b6"
+ ]
+ ]
+ },
+ {
+ "id": "2ce54a7d.5835b6",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 726.2301657540456,
+ "y": 408.0555672645569,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "53191b49.840e74"
+ ]
+ ]
+ },
+ {
+ "id": "53191b49.840e74",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"service-information.service-instance-id is a required input\" />\n",
+ "comments": "",
+ "x": 877.6587317330495,
+ "y": 408.05556535720825,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "4710ed3d.659744",
+ "type": "switchNode",
+ "name": "switch pnf-id",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-details.pnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 471.3015937805176,
+ "y": 451.555561542511,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "a413f663.792248"
+ ]
+ ]
+ },
+ {
+ "id": "a413f663.792248",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 726.5873031616211,
+ "y": 450.12699365615845,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "9bbe7c79.3b76c"
+ ]
+ ]
+ },
+ {
+ "id": "9bbe7c79.3b76c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"pnf-details.pnf-id is a required input\" />\n",
+ "comments": "",
+ "x": 878.015869140625,
+ "y": 450.1269917488098,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "5a47ef2e.17f48",
+ "type": "switchNode",
+ "name": "switch aic-cloud-region",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-request-input.aic-cloud-region`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1094.444435119629,
+ "y": 595.1269860267639,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "38bfd2ff.c329ae"
+ ]
+ ]
+ },
+ {
+ "id": "38bfd2ff.c329ae",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1321.1587524414062,
+ "y": 595.1270203590393,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "be8a7d3e.b1956"
+ ]
+ ]
+ },
+ {
+ "id": "be8a7d3e.b1956",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"pnf-request-input.aic-cloud-region is a required input\" />\n",
+ "comments": "",
+ "x": 1472.5873184204102,
+ "y": 595.1270184516907,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "cbe7b870.eb2778",
+ "type": "switchNode",
+ "name": "switch model-customization-id",
+ "xml": "<switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1089.9205780029297,
+ "y": 710.317467212677,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "a468752f.474808"
+ ]
+ ]
+ },
+ {
+ "id": "a468752f.474808",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1294.9205780029297,
+ "y": 710.3174500465393,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "b9bc06be.f3a6e8"
+ ]
+ ]
+ },
+ {
+ "id": "b9bc06be.f3a6e8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"pnf-details.onap-model-information.model-customization-uuid is a required input\" />\n",
+ "comments": "",
+ "x": 1446.3491439819336,
+ "y": 710.3174481391907,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ },
+ {
+ "id": "23854a15.854736",
+ "type": "outcome",
+ "name": "changeassign",
+ "xml": "<outcome value='changeassign'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 679.8607978820801,
+ "y": 710.2460265159607,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "9784e04d.64388"
+ ]
+ ]
+ },
+ {
+ "id": "9784e04d.64388",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 859.8607864379883,
+ "y": 710.2459931373596,
+ "z": "8b598434.ddbeb8",
+ "wires": [
+ [
+ "cbe7b870.eb2778"
+ ]
+ ]
+ },
+ {
+ "id": "cc3011b2.e59d9",
+ "type": "comment",
+ "name": "model-customization-uuid validation moved to changeassign DG",
+ "info": "",
+ "comments": "",
+ "x": 739.4444274902344,
+ "y": 675.5555663108826,
+ "z": "8b598434.ddbeb8",
+ "wires": []
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json index 091aa693..6a507964 100755 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.json @@ -1 +1,2262 @@ -[{"id":"e2e49656.8ebb48","type":"dgstart","name":"DGSTART","outputs":1,"x":131.42857360839844,"y":110.98508548736572,"z":"18647007.5f06e","wires":[["c454fe16.3ed8a"]]},{"id":"c454fe16.3ed8a","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","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='${project.version}'>","outputs":1,"x":246.7142791748047,"y":150.55653285980225,"z":"18647007.5f06e","wires":[["be96a73d.265e28"]]},{"id":"be96a73d.265e28","type":"method","name":"method vf-module-topology-operation-unassign","xml":"<method rpc='vf-module-topology-operation-unassign' mode='sync'>\n","comments":"","outputs":1,"x":253.52387237548828,"y":190.98508167266846,"z":"18647007.5f06e","wires":[["81c49a47.fca5c8"]]},{"id":"9d3efd4.31149","type":"comment","name":"vf-module-topology-operation-unassign","info":"","comments":"","x":525.7734298706055,"y":58.57142925262451,"z":"18647007.5f06e","wires":[]},{"id":"c861a71.bf35958","type":"switchNode","name":"switch request-action","xml":"<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":536.6190338134766,"y":408.1755590438843,"z":"18647007.5f06e","wires":[["6b156d65.ae2c94","48863ddd.c15a14"]]},{"id":"6b156d65.ae2c94","type":"outcome","name":"DeleteVfModuleInstance","xml":"<outcome value='DeleteVfModuleInstance'>\n","comments":"","outputs":1,"x":798.6666488647461,"y":385.3184452056885,"z":"18647007.5f06e","wires":[["6429f10d.9c11b"]]},{"id":"48863ddd.c15a14","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":742.3332939147949,"y":430.6994342803955,"z":"18647007.5f06e","wires":[["3ad1862d.4098ea"]]},{"id":"6429f10d.9c11b","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":988.5238132476807,"y":385.3184766769409,"z":"18647007.5f06e","wires":[[]]},{"id":"3ad1862d.4098ea","type":"returnFailure","name":"return failure","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=\"If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'\" />\n","comments":"","x":1007.3333015441895,"y":431.0327467918396,"z":"18647007.5f06e","wires":[]},{"id":"218fe261.ee2e0e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":159.04767608642578,"y":1502.8897886276245,"z":"18647007.5f06e","wires":[["863442bb.c35bd","23bca180.487f5e","e49fcf2c.dc6dd","f2229878.1d7b18","fc31741.0ef9088","165bb54c.1c4a5b","ab2d7b3e.268578","35514a27.0c3786","eec63ebd.14593","e0000fd9.cea29"]]},{"id":"13f7711f.d4863f","type":"switchNode","name":"switch service-data.vnfs.vnf_length","xml":"<switch test='`$service-data.vnfs.vnf_length`'>\n","comments":"","outputs":1,"x":583.0952072143555,"y":552.6517343521118,"z":"18647007.5f06e","wires":[["431af51d.d60c3c","2f013004.d53e4"]]},{"id":"431af51d.d60c3c","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":823.8094787597656,"y":529.7944746017456,"z":"18647007.5f06e","wires":[["5ca2ab6d.26e0f4"]]},{"id":"2f013004.d53e4","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":823.5713195800781,"y":570.7469930648804,"z":"18647007.5f06e","wires":[["936aceca.3de96"]]},{"id":"5ca2ab6d.26e0f4","type":"returnFailure","name":"return failure","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=\"There are no VNFs defined in MD-SAL\" />\n","comments":"","x":990.4760932922363,"y":529.0802297592163,"z":"18647007.5f06e","wires":[]},{"id":"936aceca.3de96","type":"for","name":"for each vnf","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n","comments":"","outputs":1,"x":985.8094635009766,"y":570.4136114120483,"z":"18647007.5f06e","wires":[["14ab3d7f.68c0e3"]]},{"id":"14ab3d7f.68c0e3","type":"switchNode","name":"switch service data vnf == input vnf","xml":"<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n","comments":"","outputs":1,"x":1237.1426811218262,"y":570.0802984237671,"z":"18647007.5f06e","wires":[["64ab69be.8fcc48"]]},{"id":"64ab69be.8fcc48","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1467.1427726745605,"y":569.413652420044,"z":"18647007.5f06e","wires":[["b3bf1d7.e779de"]]},{"id":"1f2343f9.c1656c","type":"set","name":"set vnf-index to -1","xml":"<set>\n<parameter name='vnf-index' value='-1' />\n","comments":"","x":532.1428298950195,"y":484.0802335739136,"z":"18647007.5f06e","wires":[]},{"id":"2904a72b.2ba948","type":"set","name":"set vnf-index to idx","xml":"<set>\n<parameter name='vnf-index' value='`$idx`' />\n","comments":"","x":1788.8094100952148,"y":540.413610458374,"z":"18647007.5f06e","wires":[]},{"id":"6dfcbf43.c96e3","type":"switchNode","name":"switch vnf-index","xml":"<switch test='`$vnf-index`'>\n","comments":"","outputs":1,"x":522.1428375244141,"y":620.7469301223755,"z":"18647007.5f06e","wires":[["52af09ac.eaca28"]]},{"id":"52af09ac.eaca28","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":700.4762229919434,"y":620.0803060531616,"z":"18647007.5f06e","wires":[["c4d376c3.571488"]]},{"id":"c4d376c3.571488","type":"returnFailure","name":"return failure","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=\"`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`\" />\n","comments":"","x":860.476131439209,"y":619.4136095046997,"z":"18647007.5f06e","wires":[]},{"id":"b3bf1d7.e779de","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1615.4762344360352,"y":568.3333511352539,"z":"18647007.5f06e","wires":[["2904a72b.2ba948","63b441b0.29b2"]]},{"id":"63b441b0.29b2","type":"break","name":"break","xml":"<break>\n","comments":"","x":1750.4762001037598,"y":589.9999370574951,"z":"18647007.5f06e","wires":[]},{"id":"3d580cb8.2983e4","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":546.4285202026367,"y":742.6517381668091,"z":"18647007.5f06e","wires":[["59c54cf2.fb7004","28df31c9.48452e"]]},{"id":"59c54cf2.fb7004","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":730.4761581420898,"y":721.461142539978,"z":"18647007.5f06e","wires":[["4541f6e8.947688"]]},{"id":"28df31c9.48452e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":730.2379989624023,"y":762.4136610031128,"z":"18647007.5f06e","wires":[["78b66442.fbfd7c"]]},{"id":"4541f6e8.947688","type":"returnFailure","name":"return failure","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=\"`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`\" />\n","comments":"","x":897.1427726745605,"y":720.7468976974487,"z":"18647007.5f06e","wires":[]},{"id":"78b66442.fbfd7c","type":"for","name":"for each vf-module","xml":"<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":892.4761428833008,"y":762.0802793502808,"z":"18647007.5f06e","wires":[["70b1df72.cfb8d"]]},{"id":"70b1df72.cfb8d","type":"switchNode","name":"switch service data vf-module == input vf-module","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>\n","comments":"","outputs":1,"x":1198.8093032836914,"y":761.7470149993896,"z":"18647007.5f06e","wires":[["bc3ab08b.f7f65"]]},{"id":"bc3ab08b.f7f65","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1468.8093566894531,"y":759.4136199951172,"z":"18647007.5f06e","wires":[["7ed3c4ad.1b318c"]]},{"id":"b33a0450.724278","type":"set","name":"set vf-module-index to -1","xml":"<set>\n<parameter name='vf-module-index' value='-1' />\n","comments":"","x":552.1428146362305,"y":677.4135961532593,"z":"18647007.5f06e","wires":[]},{"id":"c88bc5a0.0aa9d8","type":"set","name":"set vf-module-index to idx","xml":"<set>\n<parameter name='vf-module-index' value='`$idx`' />\n","comments":"","x":1798.8094482421875,"y":730.4135990142822,"z":"18647007.5f06e","wires":[]},{"id":"f25bb144.7f7c8","type":"switchNode","name":"switch vf-module-index","xml":"<switch test='`$vf-module-index`'>\n","comments":"","outputs":1,"x":543.809497833252,"y":814.0803089141846,"z":"18647007.5f06e","wires":[["ea2e1080.af206"]]},{"id":"ea2e1080.af206","type":"outcome","name":"-1","xml":"<outcome value='-1'>\n","comments":"","outputs":1,"x":722.1428833007812,"y":813.4136848449707,"z":"18647007.5f06e","wires":[["c0ea9272.92129"]]},{"id":"c0ea9272.92129","type":"returnFailure","name":"return failure","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=\"`'Unable to find VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`\" />\n","comments":"","x":882.1427917480469,"y":812.7469882965088,"z":"18647007.5f06e","wires":[]},{"id":"7ed3c4ad.1b318c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1602.1428985595703,"y":758.3333597183228,"z":"18647007.5f06e","wires":[["c88bc5a0.0aa9d8","b5fd65f0.dd1658"]]},{"id":"b5fd65f0.dd1658","type":"break","name":"break","xml":"<break>\n","comments":"","x":1737.142864227295,"y":779.999945640564,"z":"18647007.5f06e","wires":[]},{"id":"459ba9fe.95a3b8","type":"switchNode","name":"switch order-status","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":535.7143173217773,"y":1306.223168373108,"z":"18647007.5f06e","wires":[["dff3e662.ab0f08","5d3cf475.3a3f0c"]]},{"id":"dff3e662.ab0f08","type":"outcome","name":"Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":711.5476875305176,"y":1268.7232003211975,"z":"18647007.5f06e","wires":[["17b63642.fdbe0a"]]},{"id":"5d3cf475.3a3f0c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":710.7143058776855,"y":1326.2231512069702,"z":"18647007.5f06e","wires":[["fdf39a89.b626b8"]]},{"id":"17b63642.fdbe0a","type":"returnFailure","name":"return failure","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=\"Order status must not be Created\" />\n","comments":"","x":879.8809280395508,"y":1268.723129749298,"z":"18647007.5f06e","wires":[]},{"id":"fdf39a89.b626b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":885.7143173217773,"y":1325.8898267745972,"z":"18647007.5f06e","wires":[[]]},{"id":"23bca180.487f5e","type":"update","name":"update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id\" >","comments":"","outputs":1,"x":662.3810424804688,"y":1422.8898191452026,"z":"18647007.5f06e","wires":[["e0899af7.954688"]]},{"id":"863442bb.c35bd","type":"set","name":"set status variable","xml":"<set>\n<parameter name='tmp.status' value=\"`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`\" />\n","comments":"","x":532.3810119628906,"y":1376.2231512069702,"z":"18647007.5f06e","wires":[]},{"id":"e0899af7.954688","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":967.3809509277344,"y":1421.2231187820435,"z":"18647007.5f06e","wires":[["e02614ec.c27ce8"]]},{"id":"e02614ec.c27ce8","type":"returnFailure","name":"return failure","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 updating EIPAM_IP_ASSIGNMENTS table\" />\n","comments":"","x":1157.3809776306152,"y":1421.0328540802002,"z":"18647007.5f06e","wires":[]},{"id":"165bb54c.1c4a5b","type":"execute","name":"execute EIPAM unassign IP addresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n","comments":"","outputs":1,"x":595.7143402099609,"y":1517.8898401260376,"z":"18647007.5f06e","wires":[["1ec6a5cd.de1d1a"]]},{"id":"1ec6a5cd.de1d1a","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":832.3809661865234,"y":1517.8897829055786,"z":"18647007.5f06e","wires":[["ea2d8dc1.6c576"]]},{"id":"ea2d8dc1.6c576","type":"returnFailure","name":"return failure","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 in EIPAM unassign IP address\" />\n","comments":"","x":1022.3809928894043,"y":1517.6995182037354,"z":"18647007.5f06e","wires":[]},{"id":"e49fcf2c.dc6dd","type":"for","name":"for each vm-type","xml":"<for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":527.3809967041016,"y":1562.8898010253906,"z":"18647007.5f06e","wires":[["633220ab.96e4c"]]},{"id":"633220ab.96e4c","type":"for","name":"for each vm","xml":"<for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\n","comments":"","outputs":1,"x":722.3810272216797,"y":1562.2228088378906,"z":"18647007.5f06e","wires":[["f69b3abe.d94218"]]},{"id":"50fe8de0.64f3a4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1429.048095703125,"y":1560.5554113388062,"z":"18647007.5f06e","wires":[["ef7ad1cb.324"]]},{"id":"5ad8acf2.2bc374","type":"comment","name":"Not a failure","info":"","comments":"","x":1707.3810920715332,"y":1558.8892135620117,"z":"18647007.5f06e","wires":[]},{"id":"ef7ad1cb.324","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n","comments":"","outputs":1,"x":1575.0480308532715,"y":1560.5560445785522,"z":"18647007.5f06e","wires":[[]]},{"id":"f69b3abe.d94218","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":890.7144203186035,"y":1561.222653388977,"z":"18647007.5f06e","wires":[["f06c39d0.0e3498"]]},{"id":"f06c39d0.0e3498","type":"delete","name":"delete any records in VIPR_CONFIGURATION","xml":"<delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\n AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\n AND vm_name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >","comments":"","outputs":1,"x":1177.3811340332031,"y":1560.8900833129883,"z":"18647007.5f06e","wires":[["50fe8de0.64f3a4"]]},{"id":"e8c6edd8.95256","type":"for","name":"for each vf module","xml":"<for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n","comments":"","outputs":1,"x":1102.8888092041016,"y":2668.2228231430054,"z":"18647007.5f06e","wires":[["fb0fd2dc.832a4"]]},{"id":"cfa852b0.966f1","type":"comment","name":"Remove VF Module from service data","info":"","comments":"","x":481.7143096923828,"y":2623.461263656616,"z":"18647007.5f06e","wires":[]},{"id":"fb0fd2dc.832a4","type":"set","name":"move vf module to remove one","xml":"<set>\n\t<parameter name=\"tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx].\" value=\"$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].\" />\n\t\n","comments":"","x":1346.4799423217773,"y":2667.2467889785767,"z":"18647007.5f06e","wires":[]},{"id":"f2229878.1d7b18","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":549.146728515625,"y":2679.5644941329956,"z":"18647007.5f06e","wires":[["a6cda6a3.e5d988","5accced2.4e3d3"]]},{"id":"a6cda6a3.e5d988","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":744.480094909668,"y":2630.4691009521484,"z":"18647007.5f06e","wires":[["7a4f4b98.b84d24"]]},{"id":"7a4f4b98.b84d24","type":"set","name":"Remove vf modules","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.\" value=\"\"/>\n\n","comments":"","x":916.479866027832,"y":2630.469220161438,"z":"18647007.5f06e","wires":[]},{"id":"5accced2.4e3d3","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":743.1468505859375,"y":2725.2309103012085,"z":"18647007.5f06e","wires":[["7e34b293.efbcdc"]]},{"id":"86f76706.4026a8","type":"set","name":"set new vf module length","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length\" value=\"`$lastidx`\"/>\n\n\t\n","comments":"","x":1121.7763442993164,"y":2795.945300102234,"z":"18647007.5f06e","wires":[]},{"id":"cae448bb.baecd8","type":"set","name":"Remove the last vf module in the list","xml":"<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx].\" value=\"\"/>\n","comments":"","x":1157.4799575805664,"y":2752.0564374923706,"z":"18647007.5f06e","wires":[]},{"id":"7e34b293.efbcdc","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":900.3847808837891,"y":2724.468912124634,"z":"18647007.5f06e","wires":[["e8c6edd8.95256","cae448bb.baecd8","86f76706.4026a8","2a268ef.d194272"]]},{"id":"fc31741.0ef9088","type":"returnSuccess","name":"return success","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","comments":"","x":521.7143402099609,"y":2856.080117225647,"z":"18647007.5f06e","wires":[]},{"id":"ab2d7b3e.268578","type":"set","name":"set service-type","xml":"<set>\n<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":524.0476531982422,"y":1468.8094816207886,"z":"18647007.5f06e","wires":[]},{"id":"2a268ef.d194272","type":"set","name":"set lastidx","xml":"<set>\n<parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />\n","comments":"EIPAM plug-in needs this attribute set with this name","x":1075.619125366211,"y":2708.461136817932,"z":"18647007.5f06e","wires":[]},{"id":"dab4d76.c597428","type":"switchNode","name":"switch vf-module_length","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n","comments":"","outputs":1,"x":1546.2142639160156,"y":1879.9762592315674,"z":"18647007.5f06e","wires":[["6aafaac4.4c5d74"]]},{"id":"6aafaac4.4c5d74","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1730.4999694824219,"y":1879.976245880127,"z":"18647007.5f06e","wires":[["ad3965bc.016e98"]]},{"id":"67ee289.747f3d8","type":"update","name":"update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...","xml":"<update plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $aai.instance-group.instance-group[$ig-index].id\" >","comments":"","outputs":1,"x":2160.4999237060547,"y":1879.785903930664,"z":"18647007.5f06e","wires":[[]]},{"id":"b93947b5.bad4b8","type":"set","name":"set status variable","xml":"<set>\n<parameter name='tmp.status' value=\"`'PENDING_DELETE_' + $aai.instance-group.instance-group[$ig-index].id`\" />\n","comments":"","x":2030.499885559082,"y":1833.119276046753,"z":"18647007.5f06e","wires":[]},{"id":"c86e21dc.9ba1","type":"execute","name":"execute EIPAM unassign IP addresses","xml":"<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n","comments":"","outputs":1,"x":2095.4998931884766,"y":1924.7859477996826,"z":"18647007.5f06e","wires":[[]]},{"id":"63fda02a.fa7dd","type":"comment","name":"roll back EIPAM floating addresses","info":"","comments":"","x":2139.785614013672,"y":1786.9291022618609,"z":"18647007.5f06e","wires":[]},{"id":"35514a27.0c3786","type":"switchNode","name":"switch network-instance-group-function","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>\n","comments":"","outputs":1,"x":594.0476760864258,"y":1695.4761924743652,"z":"18647007.5f06e","wires":[["33381eac.5736d2","b7a26972.4da738"]]},{"id":"33381eac.5736d2","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":819.0476455688477,"y":1663.8095254898071,"z":"18647007.5f06e","wires":[["b38032a0.2b527"]]},{"id":"b7a26972.4da738","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":818.8095092773438,"y":1734.761920928955,"z":"18647007.5f06e","wires":[["3e53c2b5.286bae"]]},{"id":"b38032a0.2b527","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":945.7143821716309,"y":1662.1428575515747,"z":"18647007.5f06e","wires":[[]]},{"id":"3e53c2b5.286bae","type":"get-resource","name":"get-resource instance group","xml":"<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n resource=\"instance-groups\" \n key=\"instance-group.instance-group-function = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function\n AND instance-group.instance-group-type = 'L3-NETWORK'\"\n pfx='aai.instance-group' local-only='false' >\n\n","comments":"","outputs":1,"x":1014.8810653686523,"y":1733.809497833252,"z":"18647007.5f06e","wires":[["e9603d51.250ee"]]},{"id":"e9603d51.250ee","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1216.547695159912,"y":1734.6428718566895,"z":"18647007.5f06e","wires":[["2155541e.a7566c"]]},{"id":"b70af40a.ab7308","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1366.5476837158203,"y":1932.9764051437378,"z":"18647007.5f06e","wires":[["dab4d76.c597428","3f561058.c6b7c"]]},{"id":"ad3965bc.016e98","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1856.5476036071777,"y":1879.6429595947266,"z":"18647007.5f06e","wires":[["b93947b5.bad4b8","67ee289.747f3d8","c86e21dc.9ba1"]]},{"id":"3f561058.c6b7c","type":"for","name":"for each network-instance-group","xml":"<for index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >\n","comments":"","outputs":1,"x":1566.5476150512695,"y":1987.976294517517,"z":"18647007.5f06e","wires":[["530e6588.dec85c"]]},{"id":"530e6588.dec85c","type":"switchNode","name":"network-instance-group-ids match?","xml":"<switch test='`$aai.instance-group.instance-group[$ig-index].id\n == $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>\n","comments":"","outputs":1,"x":1871.5474548339844,"y":1987.9763402938843,"z":"18647007.5f06e","wires":[["da168f97.f5302"]]},{"id":"da168f97.f5302","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2093.214225769043,"y":1986.6431188583374,"z":"18647007.5f06e","wires":[["c4aa2e87.97edb"]]},{"id":"c4aa2e87.97edb","type":"for","name":"for each network","xml":"<for index='network-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$nig-index].networks.network_length`' >\n","comments":"","outputs":1,"x":2248.9285621643066,"y":1985.3572444915771,"z":"18647007.5f06e","wires":[["d3c4d017.cbabf"]]},{"id":"d3c4d017.cbabf","type":"set","name":"clear vlan-tag-id and set network-status to unassigned","xml":"<set>\n<parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].vlan-tag-id'\n value='' />\n<parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].network-status'\n value='unassigned' />\n","comments":"","x":2560.3569946289062,"y":1983.9287071228027,"z":"18647007.5f06e","wires":[]},{"id":"2155541e.a7566c","type":"for","name":"for each returned instance-group","xml":"<for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >\n","comments":"","outputs":1,"x":1440.0476989746094,"y":1731.6428756713867,"z":"18647007.5f06e","wires":[["a61da9.e6305258"]]},{"id":"a61da9.e6305258","type":"for","name":"for each relationship","xml":"<for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >\n","comments":"","outputs":1,"x":1691.714340209961,"y":1730.6428747177124,"z":"18647007.5f06e","wires":[["997d3e95.fc12d"]]},{"id":"997d3e95.fc12d","type":"for","name":"for each relationship-data","xml":"<for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >\n","comments":"","outputs":1,"x":1918.3810119628906,"y":1729.97624874115,"z":"18647007.5f06e","wires":[["b7d0eb3a.e77808"]]},{"id":"b7d0eb3a.e77808","type":"switchNode","name":"switch relationship-key == service-instance.service-instance-id","xml":"<switch test=\"`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key\n == 'service-instance.service-instance-id'`\">\n","comments":"","outputs":1,"x":2276.714599609375,"y":1729.976167678833,"z":"18647007.5f06e","wires":[["ffbd0f3e.1275f"]]},{"id":"ffbd0f3e.1275f","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2573.381057739258,"y":1729.9762001037598,"z":"18647007.5f06e","wires":[["cc3c2af6.11c288"]]},{"id":"cc3c2af6.11c288","type":"switchNode","name":"switch relationship-value == this service-instance-id","xml":"<switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value\n == $service-data.service-information.service-instance-id`'>\n","comments":"","outputs":1,"x":2838.3808822631836,"y":1729.9761695861816,"z":"18647007.5f06e","wires":[["dff626a0.dc1248"]]},{"id":"dff626a0.dc1248","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":3098.3808517456055,"y":1729.9761600494385,"z":"18647007.5f06e","wires":[["b70af40a.ab7308"]]},{"id":"eec63ebd.14593","type":"for","name":"for each vm-type","xml":"<for silentFailure='true' index='vm-type-index' start='0'\n end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n","comments":"","outputs":1,"x":534.8810119628906,"y":2298.723051071167,"z":"18647007.5f06e","wires":[["ce9b06f.5de4df8"]]},{"id":"cb730a7e.b5f668","type":"for","name":"for each vnfc","xml":"<for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >\n","comments":"","outputs":1,"x":886.547779083252,"y":2393.104296684265,"z":"18647007.5f06e","wires":[["8409f6e0.cb49a8"]]},{"id":"9f0c497f.5452f8","type":"save","name":"delete vnfc in A&AI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vnfc\"\n key=\"vnfc.vnfc-name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name\">\n","comments":"","outputs":1,"x":1197.9762840270996,"y":2435.627844810486,"z":"18647007.5f06e","wires":[[]]},{"id":"bf694419.fb3e48","type":"comment","name":"check removed with US622450","info":"","comments":"","x":1090.0000305175781,"y":1296.1904892921448,"z":"18647007.5f06e","wires":[]},{"id":"52d01c9a.ee4734","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1494.0472831726074,"y":2382.889633178711,"z":"18647007.5f06e","wires":[["23e52a62.8371d6","e6b04d9f.26218"]]},{"id":"e6b04d9f.26218","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":1806.3330192565918,"y":2407.461151123047,"z":"18647007.5f06e","wires":[[]]},{"id":"23e52a62.8371d6","type":"set","name":"set variables for deleting VNFC name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNFC' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />\n<parameter name='naming-policy-generate-name-input.vm-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vnfc-index]`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n","comments":"","x":1726.0949745178223,"y":2360.318221092224,"z":"18647007.5f06e","wires":[]},{"id":"151cdfd1.7da61","type":"switchNode","name":"switch vnfc-name","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`'>\n","comments":"","outputs":1,"x":1194.3809547424316,"y":2356.2228899002075,"z":"18647007.5f06e","wires":[["255c801a.7bb73","64e49e9a.0907e"]]},{"id":"255c801a.7bb73","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1364.380931854248,"y":2326.2229232788086,"z":"18647007.5f06e","wires":[["cfe202e2.fbb5c"]]},{"id":"64e49e9a.0907e","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1364.3808898925781,"y":2382.4134368896484,"z":"18647007.5f06e","wires":[["52d01c9a.ee4734"]]},{"id":"cfe202e2.fbb5c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1494.3807754516602,"y":2324.556275367737,"z":"18647007.5f06e","wires":[[]]},{"id":"1fe6d9a7.834656","type":"comment","name":"Rollback any generated VM and VNFC names","info":"","comments":"","x":582.7140884399414,"y":2251.2230615615845,"z":"18647007.5f06e","wires":[]},{"id":"ce9b06f.5de4df8","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":698.7852401733398,"y":2299.1283378601074,"z":"18647007.5f06e","wires":[["8b6eeaed.c4c0f8","cb730a7e.b5f668","d0342dc.d3eafd"]]},{"id":"8b6eeaed.c4c0f8","type":"for","name":"for each vm-name","xml":"<for silentFailure='true' index='vm-name-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length`' >\n","comments":"","outputs":1,"x":907.1184768676758,"y":2219.128580093384,"z":"18647007.5f06e","wires":[["1116a6ec.270f29"]]},{"id":"1116a6ec.270f29","type":"switchNode","name":"switch vm-name","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-name-index]`'>\n","comments":"","outputs":1,"x":1102.118522644043,"y":2220.7952194213867,"z":"18647007.5f06e","wires":[["1df4fe9b.77f821","a4c9f40b.62e7e8"]]},{"id":"1df4fe9b.77f821","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1255.4518356323242,"y":2192.4618854522705,"z":"18647007.5f06e","wires":[["2232a7dc.efa278"]]},{"id":"2232a7dc.efa278","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1385.4516792297363,"y":2190.7952375411987,"z":"18647007.5f06e","wires":[[]]},{"id":"af279118.39d22","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1387.1185836791992,"y":2250.7951984405518,"z":"18647007.5f06e","wires":[["bb500d32.bedec","a9ef9323.9a9ed"]]},{"id":"a4c9f40b.62e7e8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1257.45219039917,"y":2250.3190021514893,"z":"18647007.5f06e","wires":[["af279118.39d22"]]},{"id":"a9ef9323.9a9ed","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n","comments":"","outputs":1,"x":1687.1184616088867,"y":2275.7951984405518,"z":"18647007.5f06e","wires":[[]]},{"id":"bb500d32.bedec","type":"set","name":"set variables for deleting VM name","xml":"<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VM' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n","comments":"","x":1601.880355834961,"y":2228.6522302627563,"z":"18647007.5f06e","wires":[]},{"id":"8409f6e0.cb49a8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1034.0476875305176,"y":2391.889678001404,"z":"18647007.5f06e","wires":[["151cdfd1.7da61","9f0c497f.5452f8"]]},{"id":"e0000fd9.cea29","type":"switchNode","name":"switch vf-module-name","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name`'>\n","comments":"","outputs":1,"x":547.380973815918,"y":2089.5565156936646,"z":"18647007.5f06e","wires":[["d4acdb9a.079a18","af3adb74.311b58"]]},{"id":"d4acdb9a.079a18","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":724.0475997924805,"y":2115.389748573303,"z":"18647007.5f06e","wires":[["a15536e0.beaed8"]]},{"id":"af3adb74.311b58","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":726.1428604125977,"y":2064.1756534576416,"z":"18647007.5f06e","wires":[["be7df5b1.c8d688"]]},{"id":"be7df5b1.c8d688","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":848.7142791748047,"y":2062.556513786316,"z":"18647007.5f06e","wires":[[]]},{"id":"a15536e0.beaed8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":871.0475654602051,"y":2115.8897886276245,"z":"18647007.5f06e","wires":[["7ffb79a3.b3e2f8","10ec941b.acc1bc"]]},{"id":"10ec941b.acc1bc","type":"call","name":"call GENERIC-RESOURCE-API:naming-policy-generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1220.714256286621,"y":2136.2231225967407,"z":"18647007.5f06e","wires":[[]]},{"id":"7ffb79a3.b3e2f8","type":"set","name":"set variables for deleting VF module name","xml":"<set>\n<parameter name='generate-unique-name-input.name-table-type' value='VF_MODULE_INSTANCE' />\n<parameter name='generate-unique-name-input.context-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='generate-unique-name-input.action' value='DELETE' />\n","comments":"","x":1133.8091888427734,"y":2091.937413215637,"z":"18647007.5f06e","wires":[]},{"id":"d0342dc.d3eafd","type":"for","name":"for each vm-network","xml":"<for silentFailure='true' index='network-role-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n","comments":"","outputs":1,"x":910.7143020629883,"y":2531.223017692566,"z":"18647007.5f06e","wires":[["b8830261.bd521"]]},{"id":"b8830261.bd521","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1100.547622680664,"y":2530.722456932068,"z":"18647007.5f06e","wires":[["496f47a6.204b08"]]},{"id":"496f47a6.204b08","type":"for","name":"for each vnfc","xml":"<for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >\n","comments":"","outputs":1,"x":1254.5476837158203,"y":2529.3892822265625,"z":"18647007.5f06e","wires":[["e0961315.d37bc"]]},{"id":"e0961315.d37bc","type":"block","name":"block","xml":"<block>","atomic":"true","comments":"","outputs":1,"x":1412.8810691833496,"y":2529.3892755508423,"z":"18647007.5f06e","wires":[["4448c71a.47c118","71117bd.9df1b84"]]},{"id":"4448c71a.47c118","type":"for","name":"for each floating ipv4 address","xml":"<for silentFailure='true' index='ipv4-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >\n","comments":"","outputs":1,"x":1617.7140884399414,"y":2498.555899620056,"z":"18647007.5f06e","wires":[["10d9315f.192e3f"]]},{"id":"71117bd.9df1b84","type":"for","name":"for each floating ipv6 address","xml":"<for silentFailure='true' index='ipv6-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >\n","comments":"","outputs":1,"x":1618.3806838989258,"y":2555.5556592941284,"z":"18647007.5f06e","wires":[["b3e81b2f.f62be8"]]},{"id":"10d9315f.192e3f","type":"delete","name":"delete vip-ipv4-address-list from A&AI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n resource=\"vip-ipv4-address-list\" \n key=\"cloud-region.cloud-owner = $prop.cloud-region.cloud-owner\n\t AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\n\t AND vip-ipv4-address-list.vip-ipv4-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]\" >","comments":"","outputs":1,"x":1921.7140884399414,"y":2498.555899620056,"z":"18647007.5f06e","wires":[[]]},{"id":"b3e81b2f.f62be8","type":"delete","name":"delete vip-ipv6-address-list from A&AI","xml":"<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n resource=\"vip-ipv6-address-list\" \n key=\"cloud-region.cloud-owner = $prop.cloud-region.cloud-owner\n\t AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\n\t AND vip-ipv6-address-list.vip-ipv6-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]\" >","comments":"","outputs":1,"x":1920.3806838989258,"y":2554.222529411316,"z":"18647007.5f06e","wires":[[]]},{"id":"81c49a47.fca5c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":197.38094329833984,"y":554.5238332748413,"z":"18647007.5f06e","wires":[["c861a71.bf35958","1f2343f9.c1656c","13f7711f.d4863f","6dfcbf43.c96e3","b33a0450.724278","3d580cb8.2983e4","f25bb144.7f7c8","2f3dab55.c79cc4","8494a6ce.b4d008","69ffa572.57fcfc","ae821284.ea3c7"]]},{"id":"cd77f2b1.29536","type":"call","name":"call self-serve-vf-module-unassign","xml":"<call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-unassign' mode='sync' >\n","comments":"","outputs":1,"x":1006.6427383422852,"y":946.6547780036926,"z":"18647007.5f06e","wires":[["3c485d89.f7e462","44c95324.f14cdc"]]},{"id":"3c485d89.f7e462","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1251.392723083496,"y":946.9047665596008,"z":"18647007.5f06e","wires":[["b3dabebc.3fe24"]]},{"id":"b3dabebc.3fe24","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error while unassigning self-serve vf-moldule esources with error: '+ $error-message`\" />\n","comments":"","x":1416.9641494750977,"y":946.5476613044739,"z":"18647007.5f06e","wires":[]},{"id":"44c95324.f14cdc","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1255.9998970031738,"y":997.4603009223938,"z":"18647007.5f06e","wires":[["c76910e9.f2862"]]},{"id":"c76910e9.f2862","type":"returnSuccess","name":"return success","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","comments":"","x":1424.5713119506836,"y":997.0317425727844,"z":"18647007.5f06e","wires":[]},{"id":"2f3dab55.c79cc4","type":"execute","name":"execute PropertiesNode","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","comments":"","outputs":1,"x":547.6190185546875,"y":256.93744468688965,"z":"18647007.5f06e","wires":[[]]},{"id":"8494a6ce.b4d008","type":"switchNode","name":"switch input cloud-owner","xml":"<switch test='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`'>\n","comments":"","outputs":1,"x":549.2855911254883,"y":327.29407024383545,"z":"18647007.5f06e","wires":[["2c057656.bd036a","f6d09aaa.bbe858"]]},{"id":"2c057656.bd036a","type":"other","name":"NULL","xml":"<outcome value=''>\n","comments":"","outputs":1,"x":732.6189651489258,"y":297.29405879974365,"z":"18647007.5f06e","wires":[["105a5789.51e418"]]},{"id":"f6d09aaa.bbe858","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":732.3808708190918,"y":338.2465524673462,"z":"18647007.5f06e","wires":[["78541ec2.14876"]]},{"id":"105a5789.51e418","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":867.6189193725586,"y":295.62739849090576,"z":"18647007.5f06e","wires":[[]]},{"id":"78541ec2.14876","type":"set","name":"set prop.cloud-region.cloud-owner","xml":"<set>\n<parameter name='prop.cloud-region.cloud-owner' value='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`' />\n","comments":"","x":949.2855758666992,"y":337.2940797805786,"z":"18647007.5f06e","wires":[]},{"id":"8adaff9d.ffe82","type":"comment","name":"SELF-SERVE FORK","info":"","comments":"","x":929.9998931884766,"y":908.3334360122681,"z":"18647007.5f06e","wires":[]},{"id":"ae821284.ea3c7","type":"call","name":"call self-serve-vf-module-forking-logic","xml":"<call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-forking-logic' mode='sync' >\n","comments":"","outputs":1,"x":587.3490371704102,"y":881.4886159896851,"z":"18647007.5f06e","wires":[[]]},{"id":"69ffa572.57fcfc","type":"switchNode","name":"switch ss.self-serve-flag","xml":"<switch test=\"`$ss.self-serve-flag`\">\n","comments":"","outputs":1,"x":545.7298965454102,"y":1009.2029423713684,"z":"18647007.5f06e","wires":[["c1005f53.215cb","9ffad06c.1ae2d"]]},{"id":"c1005f53.215cb","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":770.3963737487793,"y":1070.0596961975098,"z":"18647007.5f06e","wires":[["218fe261.ee2e0e"]]},{"id":"9ffad06c.1ae2d","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":768.444091796875,"y":947.2505326271057,"z":"18647007.5f06e","wires":[["cd77f2b1.29536"]]}]
\ No newline at end of file +[
+ {
+ "id": "b1376276.19b7a",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 153.75,
+ "y": 73.75,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "7de7be4b.3d07e"
+ ]
+ ]
+ },
+ {
+ "id": "7de7be4b.3d07e",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 269.03570556640625,
+ "y": 113.32144737243652,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "95fa486d.37e488"
+ ]
+ ]
+ },
+ {
+ "id": "95fa486d.37e488",
+ "type": "method",
+ "name": "method vf-module-topology-operation-unassign",
+ "xml": "<method rpc='vf-module-topology-operation-unassign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 275.84529876708984,
+ "y": 153.74999618530273,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "899e894a.a15b88"
+ ]
+ ]
+ },
+ {
+ "id": "c7f5605f.01389",
+ "type": "comment",
+ "name": "vf-module-topology-operation-unassign",
+ "info": "",
+ "comments": "",
+ "x": 548.094856262207,
+ "y": 21.33634376525879,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "b8d19f16.02d9",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 558.9404602050781,
+ "y": 370.94047355651855,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "a16d41de.fdf37",
+ "3b724a86.e852d6"
+ ]
+ ]
+ },
+ {
+ "id": "a16d41de.fdf37",
+ "type": "outcome",
+ "name": "DeleteVfModuleInstance",
+ "xml": "<outcome value='DeleteVfModuleInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 820.9880752563477,
+ "y": 348.08335971832275,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "f4130065.1b2d6"
+ ]
+ ]
+ },
+ {
+ "id": "3b724a86.e852d6",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 764.6547203063965,
+ "y": 393.4643487930298,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "86c9269e.57f0e8"
+ ]
+ ]
+ },
+ {
+ "id": "f4130065.1b2d6",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1010.8452396392822,
+ "y": 348.0833911895752,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "86c9269e.57f0e8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'\" />\n",
+ "comments": "",
+ "x": 1029.654727935791,
+ "y": 393.7976613044739,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "99d54dd7.bac17",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 181.36910247802734,
+ "y": 1465.6547031402588,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "be7c08d6.b7fa78",
+ "33647515.ff88ea",
+ "c0e122eb.07451",
+ "7c7a95cf.960aec",
+ "dfd06feb.ff6ed",
+ "739034c9.2b1aac",
+ "5878a219.db4e8c",
+ "59360709.c66608",
+ "858b4f7.87351b"
+ ]
+ ]
+ },
+ {
+ "id": "ed32804a.e1a1f",
+ "type": "set",
+ "name": "set vnf-index to -1",
+ "xml": "<set>\n<parameter name='vnf-index' value='-1' />\n",
+ "comments": "",
+ "x": 554.4642562866211,
+ "y": 446.84514808654785,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "2837eda.666b812",
+ "type": "switchNode",
+ "name": "switch order-status",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 558.0357437133789,
+ "y": 1268.9880828857422,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "8a2f7c28.f48a4",
+ "cc7bf29.51df51"
+ ]
+ ]
+ },
+ {
+ "id": "8a2f7c28.f48a4",
+ "type": "outcome",
+ "name": "Created",
+ "xml": "<outcome value='Created'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 733.8691139221191,
+ "y": 1231.4881148338318,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "dbdbf33c.f14c2"
+ ]
+ ]
+ },
+ {
+ "id": "cc7bf29.51df51",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 733.0357322692871,
+ "y": 1288.9880657196045,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "e72b13ca.99788"
+ ]
+ ]
+ },
+ {
+ "id": "dbdbf33c.f14c2",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"Order status must not be Created\" />\n",
+ "comments": "",
+ "x": 902.2023544311523,
+ "y": 1231.4880442619324,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "e72b13ca.99788",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 908.0357437133789,
+ "y": 1288.6547412872314,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "33647515.ff88ea",
+ "type": "update",
+ "name": "update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id\" >",
+ "comments": "",
+ "outputs": 1,
+ "x": 684.7024688720703,
+ "y": 1385.654733657837,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "8e4f49fb.bc44b8"
+ ]
+ ]
+ },
+ {
+ "id": "be7c08d6.b7fa78",
+ "type": "set",
+ "name": "set status variable",
+ "xml": "<set>\n<parameter name='tmp.status' value=\"`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`\" />\n",
+ "comments": "",
+ "x": 554.7024383544922,
+ "y": 1338.9880657196045,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "8e4f49fb.bc44b8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 989.7023773193359,
+ "y": 1383.9880332946777,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "13abc175.87ad4f"
+ ]
+ ]
+ },
+ {
+ "id": "13abc175.87ad4f",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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 updating EIPAM_IP_ASSIGNMENTS table\" />\n",
+ "comments": "",
+ "x": 1179.7024040222168,
+ "y": 1383.7977685928345,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "7c7a95cf.960aec",
+ "type": "execute",
+ "name": "execute EIPAM unassign IP addresses",
+ "xml": "<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 618.0357666015625,
+ "y": 1480.6547546386719,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "3527442c.98799c"
+ ]
+ ]
+ },
+ {
+ "id": "3527442c.98799c",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 854.702392578125,
+ "y": 1480.654697418213,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6bf2e362.4819cc"
+ ]
+ ]
+ },
+ {
+ "id": "6bf2e362.4819cc",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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 in EIPAM unassign IP address\" />\n",
+ "comments": "",
+ "x": 1044.7024192810059,
+ "y": 1480.4644327163696,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "c0e122eb.07451",
+ "type": "for",
+ "name": "for each vm-type",
+ "xml": "<for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 549.7024230957031,
+ "y": 1525.654715538025,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "2a98414e.b2fd6e"
+ ]
+ ]
+ },
+ {
+ "id": "2a98414e.b2fd6e",
+ "type": "for",
+ "name": "for each vm",
+ "xml": "<for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 744.7024536132812,
+ "y": 1524.987723350525,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "b1136fdc.257c9"
+ ]
+ ]
+ },
+ {
+ "id": "37c4231.32254dc",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1451.3695220947266,
+ "y": 1523.3203258514404,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "8584cb05.406b38"
+ ]
+ ]
+ },
+ {
+ "id": "85031a7.a928fe8",
+ "type": "comment",
+ "name": "Not a failure",
+ "info": "",
+ "comments": "",
+ "x": 1729.7025184631348,
+ "y": 1521.654128074646,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "8584cb05.406b38",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID\"/>\n<parameter name=\"field3\" value=\"`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`\"/>\n<parameter name=\"field4\" value=\"Failed to insert VIPR_CONFIGURATION record\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1597.369457244873,
+ "y": 1523.3209590911865,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b1136fdc.257c9",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 913.0358467102051,
+ "y": 1523.9875679016113,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "a0575bd.48cada8"
+ ]
+ ]
+ },
+ {
+ "id": "a0575bd.48cada8",
+ "type": "delete",
+ "name": "delete any records in VIPR_CONFIGURATION",
+ "xml": "<delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\n AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\n AND vm_name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >",
+ "comments": "",
+ "outputs": 1,
+ "x": 1199.7025604248047,
+ "y": 1523.6549978256226,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "37c4231.32254dc"
+ ]
+ ]
+ },
+ {
+ "id": "2f60d84c.fb5928",
+ "type": "comment",
+ "name": "Remove VF Module from service data",
+ "info": "",
+ "comments": "",
+ "x": 654.0357360839844,
+ "y": 2706.2263040542603,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "3813429f.be706e",
+ "type": "switchNode",
+ "name": "switch vf-module_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 721.4681549072266,
+ "y": 2762.3295345306396,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "7c4378ea.a15b28",
+ "532c6a72.d9fff4"
+ ]
+ ]
+ },
+ {
+ "id": "7c4378ea.a15b28",
+ "type": "outcome",
+ "name": "1",
+ "xml": "<outcome value='1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 935.1349182128906,
+ "y": 2666.5673971176147,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "494887d.7d6dc78"
+ ]
+ ]
+ },
+ {
+ "id": "494887d.7d6dc78",
+ "type": "set",
+ "name": "Remove vf modules",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.\" value=\"\"/>\n\n",
+ "comments": "",
+ "x": 1107.1346893310547,
+ "y": 2666.5675163269043,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "532c6a72.d9fff4",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 935.4682159423828,
+ "y": 2856.662570953369,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "eef5a74e.f28dd8"
+ ]
+ ]
+ },
+ {
+ "id": "dd2d4dd2.91285",
+ "type": "returnSuccess",
+ "name": "return success",
+ "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",
+ "comments": "",
+ "x": 694.0357666015625,
+ "y": 2938.845157623291,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "dfd06feb.ff6ed",
+ "type": "set",
+ "name": "set service-type",
+ "xml": "<set>\n<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\n",
+ "comments": "EIPAM plug-in needs this attribute set with this name",
+ "x": 546.3690795898438,
+ "y": 1431.5743961334229,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "370b0e3d.3ff8b2",
+ "type": "switchNode",
+ "name": "switch vf-module_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1568.5356903076172,
+ "y": 1842.7411737442017,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "5ba8b449.8e391c"
+ ]
+ ]
+ },
+ {
+ "id": "5ba8b449.8e391c",
+ "type": "outcome",
+ "name": "1",
+ "xml": "<outcome value='1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1752.8213958740234,
+ "y": 1842.7411603927612,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "aa8c9f37.4bce"
+ ]
+ ]
+ },
+ {
+ "id": "e11fc780.b18798",
+ "type": "update",
+ "name": "update EIPAM_IP_ASSIGNMENTS to PENDING_DELETE...",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\"\nkey=\"UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $aai.instance-group.instance-group[$ig-index].id\" >",
+ "comments": "",
+ "outputs": 1,
+ "x": 2182.8213500976562,
+ "y": 1842.5508184432983,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "f93d876b.e7d198",
+ "type": "set",
+ "name": "set status variable",
+ "xml": "<set>\n<parameter name='tmp.status' value=\"`'PENDING_DELETE_' + $aai.instance-group.instance-group[$ig-index].id`\" />\n",
+ "comments": "",
+ "x": 2052.8213119506836,
+ "y": 1795.8841905593872,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "4ad69f8c.fd9c",
+ "type": "execute",
+ "name": "execute EIPAM unassign IP addresses",
+ "xml": "<execute plugin=\"com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin\" method=\"unassignIPAddress\">\n<parameter name=\"deleteEIPAM_status\" value=\"`$tmp.status`\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2117.821319580078,
+ "y": 1887.550862312317,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "dd83f99f.5833e8",
+ "type": "comment",
+ "name": "roll back EIPAM floating addresses",
+ "info": "",
+ "comments": "",
+ "x": 2162.1070404052734,
+ "y": 1749.6940167744951,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "739034c9.2b1aac",
+ "type": "switchNode",
+ "name": "switch network-instance-group-function",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 616.3691024780273,
+ "y": 1658.2411069869995,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "a7739829.bdaca8",
+ "e35d14ad.4989f8"
+ ]
+ ]
+ },
+ {
+ "id": "a7739829.bdaca8",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 841.3690719604492,
+ "y": 1626.5744400024414,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "4ed1de62.95a2a"
+ ]
+ ]
+ },
+ {
+ "id": "e35d14ad.4989f8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 841.1309356689453,
+ "y": 1697.5268354415894,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "4c983dc2.77aa64"
+ ]
+ ]
+ },
+ {
+ "id": "4ed1de62.95a2a",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 968.0358085632324,
+ "y": 1624.907772064209,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4c983dc2.77aa64",
+ "type": "get-resource",
+ "name": "get-resource instance group",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n resource=\"instance-groups\" \n key=\"instance-group.instance-group-function = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function\n AND instance-group.instance-group-type = 'L3-NETWORK'\"\n pfx='aai.instance-group' local-only='false' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1037.202491760254,
+ "y": 1696.5744123458862,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "ddac01f.3923f"
+ ]
+ ]
+ },
+ {
+ "id": "ddac01f.3923f",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1238.8691215515137,
+ "y": 1697.4077863693237,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "7a32823c.a674bc"
+ ]
+ ]
+ },
+ {
+ "id": "7107e45f.25e14c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1388.8691101074219,
+ "y": 1895.741319656372,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "370b0e3d.3ff8b2",
+ "d7a2d2c6.caa96"
+ ]
+ ]
+ },
+ {
+ "id": "aa8c9f37.4bce",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1878.8690299987793,
+ "y": 1842.4078741073608,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "f93d876b.e7d198",
+ "e11fc780.b18798",
+ "4ad69f8c.fd9c"
+ ]
+ ]
+ },
+ {
+ "id": "d7a2d2c6.caa96",
+ "type": "for",
+ "name": "for each network-instance-group",
+ "xml": "<for index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1588.869041442871,
+ "y": 1950.7412090301514,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "612f4ca4.68c134"
+ ]
+ ]
+ },
+ {
+ "id": "612f4ca4.68c134",
+ "type": "switchNode",
+ "name": "network-instance-group-ids match?",
+ "xml": "<switch test='`$aai.instance-group.instance-group[$ig-index].id\n == $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1893.868881225586,
+ "y": 1950.7412548065186,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "829c6209.93b3d"
+ ]
+ ]
+ },
+ {
+ "id": "829c6209.93b3d",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2115.5356521606445,
+ "y": 1949.4080333709717,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "d2319297.5eefb"
+ ]
+ ]
+ },
+ {
+ "id": "d2319297.5eefb",
+ "type": "for",
+ "name": "for each network",
+ "xml": "<for index='network-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$nig-index].networks.network_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2271.249988555908,
+ "y": 1948.1221590042114,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "adc6d40c.0d2aa8"
+ ]
+ ]
+ },
+ {
+ "id": "adc6d40c.0d2aa8",
+ "type": "set",
+ "name": "clear vlan-tag-id and set network-status to unassigned",
+ "xml": "<set>\n<parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].vlan-tag-id'\n value='' />\n<parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].network-status'\n value='unassigned' />\n",
+ "comments": "",
+ "x": 2582.678421020508,
+ "y": 1946.693621635437,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "7a32823c.a674bc",
+ "type": "for",
+ "name": "for each returned instance-group",
+ "xml": "<for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1462.369125366211,
+ "y": 1694.407790184021,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "7f3d0cd9.9335a4"
+ ]
+ ]
+ },
+ {
+ "id": "7f3d0cd9.9335a4",
+ "type": "for",
+ "name": "for each relationship",
+ "xml": "<for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1714.0357666015625,
+ "y": 1693.4077892303467,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "e7616a37.994598"
+ ]
+ ]
+ },
+ {
+ "id": "e7616a37.994598",
+ "type": "for",
+ "name": "for each relationship-data",
+ "xml": "<for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1940.7024383544922,
+ "y": 1692.7411632537842,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "5e1c0be4.f2c024"
+ ]
+ ]
+ },
+ {
+ "id": "5e1c0be4.f2c024",
+ "type": "switchNode",
+ "name": "switch relationship-key == service-instance.service-instance-id",
+ "xml": "<switch test=\"`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key\n == 'service-instance.service-instance-id'`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2299.0360260009766,
+ "y": 1692.7410821914673,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "8aa0de51.9fee1"
+ ]
+ ]
+ },
+ {
+ "id": "8aa0de51.9fee1",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2595.7024841308594,
+ "y": 1692.741114616394,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "5d06f26a.4726bc"
+ ]
+ ]
+ },
+ {
+ "id": "5d06f26a.4726bc",
+ "type": "switchNode",
+ "name": "switch relationship-value == this service-instance-id",
+ "xml": "<switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value\n == $service-data.service-information.service-instance-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2860.702308654785,
+ "y": 1692.741084098816,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "acfd65c3.377028"
+ ]
+ ]
+ },
+ {
+ "id": "acfd65c3.377028",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 3120.702278137207,
+ "y": 1692.7410745620728,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "7107e45f.25e14c"
+ ]
+ ]
+ },
+ {
+ "id": "5878a219.db4e8c",
+ "type": "for",
+ "name": "for each vm-type",
+ "xml": "<for silentFailure='true' index='vm-type-index' start='0'\n end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 557.2024383544922,
+ "y": 2261.4879655838013,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "5c388a57.8451f4"
+ ]
+ ]
+ },
+ {
+ "id": "74f3496a.11f5e8",
+ "type": "for",
+ "name": "for each vnfc",
+ "xml": "<for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 908.8692054748535,
+ "y": 2355.8692111968994,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6e31430a.e7046c"
+ ]
+ ]
+ },
+ {
+ "id": "db59b482.778a68",
+ "type": "save",
+ "name": "delete vnfc in A&AI",
+ "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n resource=\"vnfc\"\n key=\"vnfc.vnfc-name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1220.2977104187012,
+ "y": 2398.39275932312,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a3b5957.afe4668",
+ "type": "comment",
+ "name": "check removed with US622450",
+ "info": "",
+ "comments": "",
+ "x": 1112.3214569091797,
+ "y": 1258.955403804779,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "ba151b16.c9aed8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1516.368709564209,
+ "y": 2345.654547691345,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "65b58039.7e2b7",
+ "f646ff88.473e7"
+ ]
+ ]
+ },
+ {
+ "id": "f646ff88.473e7",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:naming-policy-generate-name",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1828.6544456481934,
+ "y": 2370.226065635681,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "65b58039.7e2b7",
+ "type": "set",
+ "name": "set variables for deleting VNFC name",
+ "xml": "<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNFC' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />\n<parameter name='naming-policy-generate-name-input.vm-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vnfc-index]`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n",
+ "comments": "",
+ "x": 1748.4164009094238,
+ "y": 2323.0831356048584,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "5760ffaf.f2c0b",
+ "type": "switchNode",
+ "name": "switch vnfc-name",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1216.7023811340332,
+ "y": 2318.987804412842,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "e34267dd.8616f8",
+ "c505b4ad.08ec78"
+ ]
+ ]
+ },
+ {
+ "id": "e34267dd.8616f8",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1386.7023582458496,
+ "y": 2288.987837791443,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "a953cb8a.ae16d8"
+ ]
+ ]
+ },
+ {
+ "id": "c505b4ad.08ec78",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1386.7023162841797,
+ "y": 2345.1783514022827,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "ba151b16.c9aed8"
+ ]
+ ]
+ },
+ {
+ "id": "a953cb8a.ae16d8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1516.7022018432617,
+ "y": 2287.321189880371,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d1fd43a0.c5972",
+ "type": "comment",
+ "name": "Rollback any generated VM and VNFC names",
+ "info": "",
+ "comments": "",
+ "x": 605.035514831543,
+ "y": 2213.9879760742188,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "5c388a57.8451f4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 721.1066665649414,
+ "y": 2261.8932523727417,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "658e7b54.c4ae14",
+ "74f3496a.11f5e8",
+ "80a95d2.4a1e6a"
+ ]
+ ]
+ },
+ {
+ "id": "658e7b54.c4ae14",
+ "type": "for",
+ "name": "for each vm-name",
+ "xml": "<for silentFailure='true' index='vm-name-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 929.4399032592773,
+ "y": 2181.893494606018,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "715a9489.5a448c"
+ ]
+ ]
+ },
+ {
+ "id": "715a9489.5a448c",
+ "type": "switchNode",
+ "name": "switch vm-name",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-name-index]`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1124.4399490356445,
+ "y": 2183.560133934021,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "e42ca586.c51bb8",
+ "1036f257.67822e"
+ ]
+ ]
+ },
+ {
+ "id": "e42ca586.c51bb8",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1277.7732620239258,
+ "y": 2155.226799964905,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "d2cff0c6.47fcb"
+ ]
+ ]
+ },
+ {
+ "id": "d2cff0c6.47fcb",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1407.773105621338,
+ "y": 2153.560152053833,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "f381303a.a670f",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1409.4400100708008,
+ "y": 2213.560112953186,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "b0dc6051.1f8f1",
+ "df5d3e87.b20c4"
+ ]
+ ]
+ },
+ {
+ "id": "1036f257.67822e",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1279.7736167907715,
+ "y": 2213.0839166641235,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "f381303a.a670f"
+ ]
+ ]
+ },
+ {
+ "id": "df5d3e87.b20c4",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:naming-policy-generate-name",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1709.4398880004883,
+ "y": 2238.560112953186,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b0dc6051.1f8f1",
+ "type": "set",
+ "name": "set variables for deleting VM name",
+ "xml": "<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VM' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n",
+ "comments": "",
+ "x": 1624.2017822265625,
+ "y": 2191.4171447753906,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "6e31430a.e7046c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1056.3691139221191,
+ "y": 2354.654592514038,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "5760ffaf.f2c0b",
+ "db59b482.778a68"
+ ]
+ ]
+ },
+ {
+ "id": "59360709.c66608",
+ "type": "switchNode",
+ "name": "switch vf-module-name",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 569.7024002075195,
+ "y": 2052.321430206299,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "d70ace55.0e268",
+ "7a1e6069.0b283"
+ ]
+ ]
+ },
+ {
+ "id": "d70ace55.0e268",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 746.369026184082,
+ "y": 2078.1546630859375,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6ae7c451.d31f5c"
+ ]
+ ]
+ },
+ {
+ "id": "7a1e6069.0b283",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 748.4642868041992,
+ "y": 2026.9405679702759,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "bec41233.959f6"
+ ]
+ ]
+ },
+ {
+ "id": "bec41233.959f6",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 871.0357055664062,
+ "y": 2025.3214282989502,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6ae7c451.d31f5c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 893.3689918518066,
+ "y": 2078.654703140259,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "11d19708.2605d9",
+ "1c96b59.8b9804a"
+ ]
+ ]
+ },
+ {
+ "id": "1c96b59.8b9804a",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:naming-policy-generate-unique-name",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-unique-name' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1243.0356826782227,
+ "y": 2098.988037109375,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "11d19708.2605d9",
+ "type": "set",
+ "name": "set variables for deleting VF module name",
+ "xml": "<set>\n<parameter name='generate-unique-name-input.name-table-type' value='VF_MODULE_INSTANCE' />\n<parameter name='generate-unique-name-input.context-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='generate-unique-name-input.action' value='DELETE' />\n",
+ "comments": "",
+ "x": 1156.130615234375,
+ "y": 2054.7023277282715,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "80a95d2.4a1e6a",
+ "type": "for",
+ "name": "for each vm-network",
+ "xml": "<for silentFailure='true' index='network-role-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 933.0357284545898,
+ "y": 2493.9879322052,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "980c72c7.494c9"
+ ]
+ ]
+ },
+ {
+ "id": "980c72c7.494c9",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1122.8690490722656,
+ "y": 2493.487371444702,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "cf69a581.5413f8"
+ ]
+ ]
+ },
+ {
+ "id": "cf69a581.5413f8",
+ "type": "for",
+ "name": "for each vnfc",
+ "xml": "<for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1276.8691101074219,
+ "y": 2492.154196739197,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "1fbaedb2.ea9ee2"
+ ]
+ ]
+ },
+ {
+ "id": "1fbaedb2.ea9ee2",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1435.2024955749512,
+ "y": 2492.1541900634766,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "17e1ea1a.d384e6",
+ "909f2090.db662"
+ ]
+ ]
+ },
+ {
+ "id": "17e1ea1a.d384e6",
+ "type": "for",
+ "name": "for each floating ipv4 address",
+ "xml": "<for silentFailure='true' index='ipv4-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1640.035514831543,
+ "y": 2461.3208141326904,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6394face.442c04"
+ ]
+ ]
+ },
+ {
+ "id": "909f2090.db662",
+ "type": "for",
+ "name": "for each floating ipv6 address",
+ "xml": "<for silentFailure='true' index='ipv6-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1640.7021102905273,
+ "y": 2518.3205738067627,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "84f82fa2.f216d"
+ ]
+ ]
+ },
+ {
+ "id": "6394face.442c04",
+ "type": "delete",
+ "name": "delete vip-ipv4-address-list from A&AI",
+ "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n resource=\"vip-ipv4-address-list\" \n key=\"cloud-region.cloud-owner = $prop.cloud-region.cloud-owner\n\t AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\n\t AND vip-ipv4-address-list.vip-ipv4-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]\" >",
+ "comments": "",
+ "outputs": 1,
+ "x": 1944.035514831543,
+ "y": 2461.3208141326904,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "84f82fa2.f216d",
+ "type": "delete",
+ "name": "delete vip-ipv6-address-list from A&AI",
+ "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n resource=\"vip-ipv6-address-list\" \n key=\"cloud-region.cloud-owner = $prop.cloud-region.cloud-owner\n\t AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region\n\t AND vip-ipv6-address-list.vip-ipv6-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]\" >",
+ "comments": "",
+ "outputs": 1,
+ "x": 1942.7021102905273,
+ "y": 2516.98744392395,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "899e894a.a15b88",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 219.7023696899414,
+ "y": 514.2887477874756,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "b8d19f16.02d9",
+ "ed32804a.e1a1f",
+ "89b50ae8.304b48",
+ "efe19694.cf14a8",
+ "dbf21792.0d5298",
+ "e4ce59e9.5f1898",
+ "abfb427b.7db89",
+ "a8421811.799508",
+ "49d11446.002fcc"
+ ]
+ ]
+ },
+ {
+ "id": "89b50ae8.304b48",
+ "type": "execute",
+ "name": "execute PropertiesNode",
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 569.9404449462891,
+ "y": 219.70235919952393,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "efe19694.cf14a8",
+ "type": "switchNode",
+ "name": "switch input cloud-owner",
+ "xml": "<switch test='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 571.6070175170898,
+ "y": 290.0589847564697,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "2032739b.f3a73c",
+ "ff58ea7d.ed47d8"
+ ]
+ ]
+ },
+ {
+ "id": "2032739b.f3a73c",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 754.9403915405273,
+ "y": 260.05897331237793,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "3b19e144.46d70e"
+ ]
+ ]
+ },
+ {
+ "id": "ff58ea7d.ed47d8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 754.7022972106934,
+ "y": 301.01146697998047,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "a2e4951.0f1b868"
+ ]
+ ]
+ },
+ {
+ "id": "3b19e144.46d70e",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 889.9403457641602,
+ "y": 258.39231300354004,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a2e4951.0f1b868",
+ "type": "set",
+ "name": "set prop.cloud-region.cloud-owner",
+ "xml": "<set>\n<parameter name='prop.cloud-region.cloud-owner' value='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`' />\n",
+ "comments": "",
+ "x": 971.6070022583008,
+ "y": 300.0589942932129,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "dbf21792.0d5298",
+ "type": "switchNode",
+ "name": "switch service-data.vnfs.vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 611.25,
+ "y": 516.25,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "e305ef89.1e18e",
+ "29032343.b8eb2c"
+ ]
+ ]
+ },
+ {
+ "id": "e305ef89.1e18e",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 851.9642715454102,
+ "y": 493.3927402496338,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "ac34ef76.dbb8b"
+ ]
+ ]
+ },
+ {
+ "id": "29032343.b8eb2c",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 851.7261123657227,
+ "y": 534.3452587127686,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "4d389e13.b5d61"
+ ]
+ ]
+ },
+ {
+ "id": "4d389e13.b5d61",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1013.9642562866211,
+ "y": 534.0118770599365,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "3cfeeac7.22cf66"
+ ]
+ ]
+ },
+ {
+ "id": "3cfeeac7.22cf66",
+ "type": "switchNode",
+ "name": "switch service data vnf == input vnf",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1265.2974739074707,
+ "y": 533.6785640716553,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "8a49adca.71697"
+ ]
+ ]
+ },
+ {
+ "id": "8a49adca.71697",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1495.297565460205,
+ "y": 533.0119180679321,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6824cd21.d641d4"
+ ]
+ ]
+ },
+ {
+ "id": "6afedd28.dd1d04",
+ "type": "set",
+ "name": "set vnf-index to idx",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1816.9642028808594,
+ "y": 504.0118761062622,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "e4ce59e9.5f1898",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 550.2976303100586,
+ "y": 584.3451957702637,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "dbce9105.cee94"
+ ]
+ ]
+ },
+ {
+ "id": "dbce9105.cee94",
+ "type": "outcome",
+ "name": "-1",
+ "xml": "<outcome value='-1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 728.6310157775879,
+ "y": 583.6785717010498,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "2c771b68.925e04"
+ ]
+ ]
+ },
+ {
+ "id": "6824cd21.d641d4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1643.6310272216797,
+ "y": 531.9316167831421,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6afedd28.dd1d04",
+ "cde0307.04f64d"
+ ]
+ ]
+ },
+ {
+ "id": "cde0307.04f64d",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 1778.6309928894043,
+ "y": 553.5982027053833,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "a8421811.799508",
+ "type": "for",
+ "name": "for each vf-module",
+ "xml": "<for silentFailure='true' index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 562.297607421875,
+ "y": 692.3452224731445,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "297d0391.8efebc"
+ ]
+ ]
+ },
+ {
+ "id": "297d0391.8efebc",
+ "type": "switchNode",
+ "name": "switch service data vf-module == input vf-module",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 868.6307678222656,
+ "y": 692.0119581222534,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "b0f6d863.2828c8"
+ ]
+ ]
+ },
+ {
+ "id": "b0f6d863.2828c8",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1138.6308212280273,
+ "y": 689.678563117981,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6f6e1b3e.330ad4"
+ ]
+ ]
+ },
+ {
+ "id": "abfb427b.7db89",
+ "type": "set",
+ "name": "set vf-module-index to -1",
+ "xml": "<set>\n<parameter name='vf-module-index' value='-1' />\n",
+ "comments": "",
+ "x": 575.2975997924805,
+ "y": 636.0118446350098,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "dbc23243.91781",
+ "type": "set",
+ "name": "set vf-module-index to idx",
+ "xml": "<set>\n<parameter name='vf-module-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1468.6309127807617,
+ "y": 660.678542137146,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "49d11446.002fcc",
+ "type": "switchNode",
+ "name": "switch vf-module-index",
+ "xml": "<switch test='`$vf-module-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 571.9643173217773,
+ "y": 774.3452033996582,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "94c2cc90.d7c67",
+ "2b442f49.22e12"
+ ]
+ ]
+ },
+ {
+ "id": "94c2cc90.d7c67",
+ "type": "outcome",
+ "name": "-1",
+ "xml": "<outcome value='-1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 746.96435546875,
+ "y": 752.0119342803955,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "4fb6a202.51b5ec"
+ ]
+ ]
+ },
+ {
+ "id": "6f6e1b3e.330ad4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1271.9643630981445,
+ "y": 688.5983028411865,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "dbc23243.91781",
+ "e2ba61fd.88025"
+ ]
+ ]
+ },
+ {
+ "id": "e2ba61fd.88025",
+ "type": "break",
+ "name": "break",
+ "xml": "<break>\n",
+ "comments": "",
+ "x": 1406.9643287658691,
+ "y": 710.2648887634277,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "603196d.f2e4768",
+ "type": "call",
+ "name": "call self-serve-vf-module-unassign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-unassign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1539.7975006103516,
+ "y": 898.5864009857178,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "df597e81.6e9d5",
+ "c5575003.8a646"
+ ]
+ ]
+ },
+ {
+ "id": "df597e81.6e9d5",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1784.5474853515625,
+ "y": 898.836389541626,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "a1670d6c.ed7bf"
+ ]
+ ]
+ },
+ {
+ "id": "a1670d6c.ed7bf",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error while unassigning self-serve vf-moldule esources with error: '+ $error-message`\" />\n",
+ "comments": "",
+ "x": 1950.118911743164,
+ "y": 898.479284286499,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "c5575003.8a646",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1789.1546592712402,
+ "y": 949.391923904419,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "858b4f7.87351b"
+ ]
+ ]
+ },
+ {
+ "id": "74ee7664.954418",
+ "type": "comment",
+ "name": "SELF-SERVE FORK",
+ "info": "",
+ "comments": "",
+ "x": 1559.154670715332,
+ "y": 860.2650318145752,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "9ecd70ab.5a23b",
+ "type": "call",
+ "name": "call self-serve-vf-module-forking-logic",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-forking-logic' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1120.5037994384766,
+ "y": 833.4202389717102,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4e852bb2.f601e4",
+ "type": "switchNode",
+ "name": "switch ss.self-serve-flag",
+ "xml": "<switch test=\"`$ss.self-serve-flag`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1078.8846588134766,
+ "y": 961.1345653533936,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "b3e2a3f2.f065e",
+ "fdb1470f.907b58"
+ ]
+ ]
+ },
+ {
+ "id": "b3e2a3f2.f065e",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1303.5511360168457,
+ "y": 1021.9913191795349,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "99d54dd7.bac17"
+ ]
+ ]
+ },
+ {
+ "id": "fdb1470f.907b58",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1301.5988540649414,
+ "y": 899.1821556091309,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "603196d.f2e4768"
+ ]
+ ]
+ },
+ {
+ "id": "4fb6a202.51b5ec",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n",
+ "comments": "",
+ "x": 897.9166984558105,
+ "y": 750.5029640197754,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "2b442f49.22e12",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 746.2500495910645,
+ "y": 798.8363151550293,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "2f3217af.e4bc58"
+ ]
+ ]
+ },
+ {
+ "id": "2f3217af.e4bc58",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 859.5833129882812,
+ "y": 900.5030097961426,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "9ecd70ab.5a23b",
+ "4e852bb2.f601e4"
+ ]
+ ]
+ },
+ {
+ "id": "ac34ef76.dbb8b",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n",
+ "comments": "",
+ "x": 1006.0118713378906,
+ "y": 493.3601493835449,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "2c771b68.925e04",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n",
+ "comments": "",
+ "x": 882.6785583496094,
+ "y": 583.3601493835449,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "858b4f7.87351b",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 501.6666717529297,
+ "y": 2761.6668910980225,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "3813429f.be706e",
+ "dd2d4dd2.91285"
+ ]
+ ]
+ },
+ {
+ "id": "28df9967.9df256",
+ "type": "for",
+ "name": "for each vf module",
+ "xml": "<for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1346.6665649414062,
+ "y": 2799.9999980926514,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "6f3d3130.57afd"
+ ]
+ ]
+ },
+ {
+ "id": "50c34629.2df598",
+ "type": "set",
+ "name": "set tmpidx",
+ "xml": "<set>\n<parameter name=\"tmpidx\" value=\"`$idx - 1`\"/>\n",
+ "comments": "",
+ "x": 1706.5909271240234,
+ "y": 2760.6906309127808,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "d58ca164.6a90c",
+ "type": "set",
+ "name": "set new vf module length",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length\" value=\"`$lastidx`\"/>\n\n\t\n",
+ "comments": "",
+ "x": 1365.554100036621,
+ "y": 2927.72247505188,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "78c411a4.44c59",
+ "type": "set",
+ "name": "Remove the last vf module in the list",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx].\" value=\"\"/>\n",
+ "comments": "",
+ "x": 1401.257713317871,
+ "y": 2883.8336124420166,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "eef5a74e.f28dd8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1114.1625366210938,
+ "y": 2856.24608707428,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "28df9967.9df256",
+ "78c411a4.44c59",
+ "d58ca164.6a90c",
+ "fe410b04.6fd318"
+ ]
+ ]
+ },
+ {
+ "id": "fe410b04.6fd318",
+ "type": "set",
+ "name": "set lastidx",
+ "xml": "<set>\n<parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />\n",
+ "comments": "EIPAM plug-in needs this attribute set with this name",
+ "x": 1319.3968811035156,
+ "y": 2840.238311767578,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "6f3d3130.57afd",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1532.3016510009766,
+ "y": 2799.872272491455,
+ "z": "2b0e89c2.6d8016",
+ "wires": [
+ [
+ "50c34629.2df598",
+ "c39ae3a3.509e4",
+ "d83d8b04.2f5018"
+ ]
+ ]
+ },
+ {
+ "id": "c39ae3a3.509e4",
+ "type": "set",
+ "name": "copy vf module down",
+ "xml": "<set>\n<parameter name=\"service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx].\" value=\"$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].\" />\n\t\n",
+ "comments": "",
+ "x": 1737.9681205749512,
+ "y": 2846.5390224456787,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ },
+ {
+ "id": "d83d8b04.2f5018",
+ "type": "set",
+ "name": "erase entry at tmpidx",
+ "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx].' value='' />\n",
+ "comments": "",
+ "x": 1739.6349906921387,
+ "y": 2803.205931663513,
+ "z": "2b0e89c2.6d8016",
+ "wires": []
+ }
+]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json index 7476b037..72f6681b 100644 --- a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json +++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.json @@ -1,791 +1,906 @@ -[ - { - "id": "8760ee4d.bacba", - "type": "dgstart", - "name": "DGSTART", - "outputs": 1, - "x": 121.25, - "y": 101.16365623474121, - "z": "b679ce73.4725c", - "wires": [ - [ - "a9ae8cec.2004d" - ] - ] - }, - { - "id": "a9ae8cec.2004d", - "type": "service-logic", - "name": "GENERIC-RESOURCE-API ${project.version}", - "module": "GENERIC-RESOURCE-API", - "version": "${project.version}", - "comments": "", - "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='${project.version}'>", - "outputs": 1, - "x": 235.53570556640625, - "y": 141.4017677307129, - "z": "b679ce73.4725c", - "wires": [ - [ - "3dac1de6.47703a" - ] - ] - }, - { - "id": "3dac1de6.47703a", - "type": "method", - "name": "method vnf-topology-operation-unassign", - "xml": "<method rpc='vnf-topology-operation-unassign' mode='sync'>\n", - "comments": "", - "outputs": 1, - "x": 217.67862701416016, - "y": 181.1636562347412, - "z": "b679ce73.4725c", - "wires": [ - [ - "8aa731f2.f78648" - ] - ] - }, - { - "id": "287c593d.cb7aa6", - "type": "comment", - "name": "vnf-topology-operation-unassign", - "info": "", - "comments": "", - "x": 515.594856262207, - "y": 48.75, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "da8ed21c.290538", - "type": "switchNode", - "name": "switch request-action", - "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n", - "comments": "", - "outputs": 1, - "x": 524.773811340332, - "y": 280.0207939147949, - "z": "b679ce73.4725c", - "wires": [ - [ - "50a65b42.041c0c", - "85a5b069.51ff2" - ] - ] - }, - { - "id": "50a65b42.041c0c", - "type": "outcome", - "name": "DeleteVnfInstance", - "xml": "<outcome value='DeleteVnfInstance'>\n", - "comments": "", - "outputs": 1, - "x": 778.4881057739258, - "y": 257.16367530822754, - "z": "b679ce73.4725c", - "wires": [ - [ - "93688742.285b9" - ] - ] - }, - { - "id": "85a5b069.51ff2", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 740.4880714416504, - "y": 302.87800312042236, - "z": "b679ce73.4725c", - "wires": [ - [ - "bfa2ad9d.0bdb1" - ] - ] - }, - { - "id": "93688742.285b9", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", - "comments": "", - "outputs": 1, - "x": 963.3452339172363, - "y": 257.16370487213135, - "z": "b679ce73.4725c", - "wires": [ - [] - ] - }, - { - "id": "bfa2ad9d.0bdb1", - "type": "returnFailure", - "name": "return failure", - "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=\"If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'\" />\n", - "comments": "", - "x": 980.4880790710449, - "y": 302.87796115875244, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "8aa731f2.f78648", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 199.58333587646484, - "y": 574.4969902038574, - "z": "b679ce73.4725c", - "wires": [ - [ - "da8ed21c.290538", - "9b073e31.2b9548", - "d811a825.e4506", - "230a1984.7eb2de", - "1570abd0.28319c", - "91a3386a.faef3", - "12606f3f.12bf41", - "a2ededb3.20eb68" - ] - ] - }, - { - "id": "9b073e31.2b9548", - "type": "switchNode", - "name": "switch vnf_length", - "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", - "comments": "", - "outputs": 1, - "x": 511.24998474121094, - "y": 349.49701976776123, - "z": "b679ce73.4725c", - "wires": [ - [ - "835264a.de01c98" - ] - ] - }, - { - "id": "835264a.de01c98", - "type": "other", - "name": "NULL", - "xml": "<outcome value=''>\n", - "comments": "", - "outputs": 1, - "x": 697.9166641235352, - "y": 348.8303174972534, - "z": "b679ce73.4725c", - "wires": [ - [ - "43688a60.e15ccc" - ] - ] - }, - { - "id": "43688a60.e15ccc", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"There are no VNFs in MD-SAL\" />\n", - "comments": "", - "x": 879.5832901000977, - "y": 348.8303174972534, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "230a1984.7eb2de", - "type": "for", - "name": "for each vnf", - "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n", - "comments": "", - "outputs": 1, - "x": 492.91666412353516, - "y": 397.83033752441406, - "z": "b679ce73.4725c", - "wires": [ - [ - "11f49056.b848d" - ] - ] - }, - { - "id": "11f49056.b848d", - "type": "switchNode", - "name": "switch this vnf-id == input vnf-id", - "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >\n", - "comments": "", - "outputs": 1, - "x": 747.9167518615723, - "y": 396.4970054626465, - "z": "b679ce73.4725c", - "wires": [ - [ - "2be53867.ef76e8" - ] - ] - }, - { - "id": "2be53867.ef76e8", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 986.2500381469727, - "y": 395.4969835281372, - "z": "b679ce73.4725c", - "wires": [ - [ - "e4f701ed.1bfb3" - ] - ] - }, - { - "id": "e4f701ed.1bfb3", - "type": "set", - "name": "set vnf-index", - "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n", - "comments": "", - "x": 1154.5832328796387, - "y": 395.4970054626465, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "1570abd0.28319c", - "type": "switchNode", - "name": "switch vnf-index", - "xml": "<switch test='`$vnf-index`'>\n", - "comments": "", - "outputs": 1, - "x": 504.5833282470703, - "y": 444.4970073699951, - "z": "b679ce73.4725c", - "wires": [ - [ - "29a81e7f.f25dfa" - ] - ] - }, - { - "id": "29a81e7f.f25dfa", - "type": "other", - "name": "NULL", - "xml": "<outcome value=''>\n", - "comments": "", - "outputs": 1, - "x": 686.2499465942383, - "y": 443.83033752441406, - "z": "b679ce73.4725c", - "wires": [ - [ - "f6710847.bb5d" - ] - ] - }, - { - "id": "f6710847.bb5d", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n <parameter name=\"error-message\" value=\"'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'\" />\n", - "comments": "", - "x": 852.916633605957, - "y": 443.49696350097656, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "8ffa54f2.b78158", - "type": "returnSuccess", - "name": "return success", - "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", - "comments": "", - "x": 1154.3770751953125, - "y": 1079.0205762386322, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "54c41547.567a8c", - "type": "for", - "name": "for each vnf", - "xml": "<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n", - "comments": "", - "outputs": 1, - "x": 1674.8546524047852, - "y": 824.576345205307, - "z": "b679ce73.4725c", - "wires": [ - [ - "c8a587bb.5748d8" - ] - ] - }, - { - "id": "3f28287f.120ca", - "type": "comment", - "name": "Remove VNF from service data", - "info": "", - "comments": "", - "x": 1117.0134201049805, - "y": 783.1479976177216, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "c8a587bb.5748d8", - "type": "set", - "name": "move vnf to remove one", - "xml": "<set>\n\t<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n\t<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n", - "comments": "", - "x": 1908.445785522461, - "y": 823.6002967357635, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "c879ce9c.9d72a", - "type": "switchNode", - "name": "switch vnf_length", - "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n", - "comments": "", - "outputs": 1, - "x": 1161.1125144958496, - "y": 826.155974149704, - "z": "b679ce73.4725c", - "wires": [ - [ - "9f8acc10.c48f28", - "901a2ab8.48409" - ] - ] - }, - { - "id": "9f8acc10.c48f28", - "type": "outcome", - "name": "1", - "xml": "<outcome value='1'>\n", - "comments": "", - "outputs": 1, - "x": 1338.1125564575195, - "y": 786.8225610256195, - "z": "b679ce73.4725c", - "wires": [ - [ - "4a1274f6.357d5c" - ] - ] - }, - { - "id": "4a1274f6.357d5c", - "type": "set", - "name": "Remove vnfs", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n", - "comments": "", - "x": 1501.779052734375, - "y": 786.8226602077484, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "901a2ab8.48409", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 1339.6364479064941, - "y": 867.298700094223, - "z": "b679ce73.4725c", - "wires": [ - [ - "209c0646.4c650a" - ] - ] - }, - { - "id": "cd8767d7.87479", - "type": "set", - "name": "set new vnf length", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n", - "comments": "", - "x": 1694.4087409973145, - "y": 915.1559188365936, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "e2f2c18b.32612", - "type": "set", - "name": "Remove the last vnf in the list", - "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1].\" value=\"\"/>\n\n", - "comments": "", - "x": 1730.1123962402344, - "y": 870.2669398784637, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "209c0646.4c650a", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 1505.4457893371582, - "y": 870.8224809169769, - "z": "b679ce73.4725c", - "wires": [ - [ - "54c41547.567a8c", - "e2f2c18b.32612", - "cd8767d7.87479" - ] - ] - }, - { - "id": "793a50a1.0d6658", - "type": "switchNode", - "name": "switch current vnf-level-oper-status == Created", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status == 'Created'`\">\n", - "comments": "", - "outputs": 1, - "x": 603.9166412353516, - "y": 490.1636772155762, - "z": "b679ce73.4725c", - "wires": [ - [ - "33d47343.98cc6c" - ] - ] - }, - { - "id": "33d47343.98cc6c", - "type": "outcomeFalse", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 908.5833587646484, - "y": 489.8303165435791, - "z": "b679ce73.4725c", - "wires": [ - [ - "6c7a81eb.1c4e68" - ] - ] - }, - { - "id": "6c7a81eb.1c4e68", - "type": "returnFailure", - "name": "return failure", - "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=\"Cannot delete a VNF in a Created state\" />\n", - "comments": "", - "x": 1066.916633605957, - "y": 489.16364097595215, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "d811a825.e4506", - "type": "switchNode", - "name": "switch current vf-module_length", - "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`\">\n", - "comments": "", - "outputs": 1, - "x": 554.2499847412109, - "y": 576.1636428833008, - "z": "b679ce73.4725c", - "wires": [ - [ - "973bc91a.8f52e8", - "d0ced9dc.3f8238", - "2b82476d.deb568" - ] - ] - }, - { - "id": "973bc91a.8f52e8", - "type": "outcome", - "name": "0", - "xml": "<outcome value='0'>\n", - "comments": "", - "outputs": 1, - "x": 782.9166259765625, - "y": 532.8302841186523, - "z": "b679ce73.4725c", - "wires": [ - [ - "cb334531.9a038" - ] - ] - }, - { - "id": "d0ced9dc.3f8238", - "type": "outcome", - "name": "NULL", - "xml": "<outcome value=''>", - "comments": "", - "outputs": 1, - "x": 781.488037109375, - "y": 574.2589416503906, - "z": "b679ce73.4725c", - "wires": [ - [ - "cb334531.9a038" - ] - ] - }, - { - "id": "cb334531.9a038", - "type": "block", - "name": "block", - "xml": "<block>\n", - "atomic": "false", - "comments": "", - "outputs": 1, - "x": 930.0595512390137, - "y": 554.2589426040649, - "z": "b679ce73.4725c", - "wires": [ - [] - ] - }, - { - "id": "2b82476d.deb568", - "type": "other", - "name": "other", - "xml": "<outcome value='Other'>\n", - "comments": "", - "outputs": 1, - "x": 781.4880867004395, - "y": 615.6875295639038, - "z": "b679ce73.4725c", - "wires": [ - [ - "7cec3149.76d4d" - ] - ] - }, - { - "id": "7cec3149.76d4d", - "type": "returnFailure", - "name": "return failure", - "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=\"Cannot delete the VNF because there are VFs defined\" />\n", - "comments": "", - "x": 948.6309814453125, - "y": 615.2589178085327, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "88d07f29.c5dc6", - "type": "call", - "name": "call GENERIC-RESOURCE-API:naming-policy-generate-name", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 1302.5197067260742, - "y": 1022.7976253032684, - "z": "b679ce73.4725c", - "wires": [ - [] - ] - }, - { - "id": "b74c2ae7.ae87a", - "type": "set", - "name": "set variables for deleting name", - "xml": "<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n", - "comments": "", - "x": 1203.9483261108398, - "y": 975.65469622612, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "8a7b5d97.e8b09", - "type": "comment", - "name": "check removed with US622450", - "info": "", - "comments": "", - "x": 1274.1070098876953, - "y": 488.75002670288086, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "484f70af.519a08", - "type": "block", - "name": "block : atomic", - "xml": "<block atomic=\"true\">", - "atomic": "true", - "outputs": 1, - "x": 911.5357208251953, - "y": 908.7500398159027, - "z": "b679ce73.4725c", - "wires": [ - [ - "c879ce9c.9d72a", - "b74c2ae7.ae87a", - "88d07f29.c5dc6", - "8ffa54f2.b78158" - ] - ] - }, - { - "id": "91a3386a.faef3", - "type": "call", - "name": "call self-serve-vnf-forking-logic", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 548.3572998046875, - "y": 722.4999084472656, - "z": "b679ce73.4725c", - "wires": [ - [] - ] - }, - { - "id": "12606f3f.12bf41", - "type": "switchNode", - "name": "switch ss.self-serve-flag", - "xml": "<switch test=\"`$ss.self-serve-flag`\">\n", - "comments": "", - "outputs": 1, - "x": 518.3928833007812, - "y": 908.607127904892, - "z": "b679ce73.4725c", - "wires": [ - [ - "69816793.5f1658", - "77171191.032938" - ] - ] - }, - { - "id": "69816793.5f1658", - "type": "outcomeFalse", - "name": "false", - "xml": "<outcome value='false'>\n", - "comments": "", - "outputs": 1, - "x": 734.3928833007812, - "y": 909.0357129573822, - "z": "b679ce73.4725c", - "wires": [ - [ - "484f70af.519a08" - ] - ] - }, - { - "id": "f6d24b45.0d4258", - "type": "call", - "name": "call self-serve-vnf-unassign", - "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >\n", - "comments": "", - "outputs": 1, - "x": 950.1071472167969, - "y": 1224.4642741680145, - "z": "b679ce73.4725c", - "wires": [ - [ - "b5167dbe.7d8bf8", - "a7770dc.3f6cef" - ] - ] - }, - { - "id": "b5167dbe.7d8bf8", - "type": "failure", - "name": "failure", - "xml": "<outcome value='failure'>\n", - "comments": "", - "outputs": 1, - "x": 1157.8571319580078, - "y": 1224.7142627239227, - "z": "b679ce73.4725c", - "wires": [ - [ - "9c54474e.6dc798" - ] - ] - }, - { - "id": "9c54474e.6dc798", - "type": "returnFailure", - "name": "return failure", - "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error while unassigning self-serve resources with error: '+ $error-message`\" />\n", - "comments": "", - "x": 1323.4285583496094, - "y": 1224.3571574687958, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "a7770dc.3f6cef", - "type": "success", - "name": "success", - "xml": "<outcome value='success'>\n", - "comments": "", - "outputs": 1, - "x": 1162.4643058776855, - "y": 1275.2697970867157, - "z": "b679ce73.4725c", - "wires": [ - [ - "f989b85.ea14548" - ] - ] - }, - { - "id": "f989b85.ea14548", - "type": "returnSuccess", - "name": "return success", - "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", - "comments": "", - "x": 1331.0357208251953, - "y": 1274.8412387371063, - "z": "b679ce73.4725c", - "wires": [] - }, - { - "id": "77171191.032938", - "type": "outcomeTrue", - "name": "true", - "xml": "<outcome value='true'>\n", - "comments": "", - "outputs": 1, - "x": 735.6785621643066, - "y": 1224.8928534984589, - "z": "b679ce73.4725c", - "wires": [ - [ - "f6d24b45.0d4258" - ] - ] - }, - { - "id": "a2ededb3.20eb68", - "type": "get-resource", - "name": "get VF_MODEL.sdnc_model_name", - "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODEL WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'\n pfx='db.vf-model'>", - "comments": "", - "outputs": 1, - "x": 563.75, - "y": 655, - "z": "b679ce73.4725c", - "wires": [ - [] - ] - } +[
+ {
+ "id": "3bf0dc2d.c14a24",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 162.50001525878906,
+ "y": 72.41365623474121,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "b55ba40.7ee5d6"
+ ]
+ ]
+ },
+ {
+ "id": "b55ba40.7ee5d6",
+ "type": "service-logic",
+ "name": "GENERIC-RESOURCE-API ${project.version}",
+ "module": "GENERIC-RESOURCE-API",
+ "version": "${project.version}",
+ "comments": "",
+ "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='${project.version}'>",
+ "outputs": 1,
+ "x": 276.7857208251953,
+ "y": 112.65176773071289,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "7d6aee59.8eda9"
+ ]
+ ]
+ },
+ {
+ "id": "7d6aee59.8eda9",
+ "type": "method",
+ "name": "method vnf-topology-operation-unassign",
+ "xml": "<method rpc='vnf-topology-operation-unassign' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 258.9286422729492,
+ "y": 152.4136562347412,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "4d74d1bc.2ae89"
+ ]
+ ]
+ },
+ {
+ "id": "6fec93f5.86db2c",
+ "type": "comment",
+ "name": "vnf-topology-operation-unassign",
+ "info": "",
+ "comments": "",
+ "x": 556.8448715209961,
+ "y": 20,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "9aaca2e2.beb78",
+ "type": "switchNode",
+ "name": "switch request-action",
+ "xml": "<switch test='`$vnf-topology-operation-input.request-information.request-action`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 509.77383041381836,
+ "y": 240.02079010009766,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "abd8c261.c46b3",
+ "d2221c3e.90c3f"
+ ]
+ ]
+ },
+ {
+ "id": "abd8c261.c46b3",
+ "type": "outcome",
+ "name": "DeleteVnfInstance",
+ "xml": "<outcome value='DeleteVnfInstance'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 730.1547660827637,
+ "y": 215.49699878692627,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "a6409d9.036606"
+ ]
+ ]
+ },
+ {
+ "id": "d2221c3e.90c3f",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 692.1547317504883,
+ "y": 261.2113265991211,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "306935db.f49bda"
+ ]
+ ]
+ },
+ {
+ "id": "a6409d9.036606",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 915.0118942260742,
+ "y": 215.49702835083008,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "306935db.f49bda",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"If svc-action is 'deactivate' then request-action must be 'DeleteVnfInstance'\" />\n",
+ "comments": "",
+ "x": 932.1547393798828,
+ "y": 261.2112846374512,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "4d74d1bc.2ae89",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 269.58336639404297,
+ "y": 303.2470169067383,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "9aaca2e2.beb78",
+ "4345ea8f.58f384"
+ ]
+ ]
+ },
+ {
+ "id": "4345ea8f.58f384",
+ "type": "switchNode",
+ "name": "switch vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 498.3333206176758,
+ "y": 359.49701499938965,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "728fa904.537908",
+ "23bd57ed.5c2f68"
+ ]
+ ]
+ },
+ {
+ "id": "728fa904.537908",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 682.9166831970215,
+ "y": 308.83031368255615,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "f32a75d4.e72c28"
+ ]
+ ]
+ },
+ {
+ "id": "ea2e0eca.99875",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1021.2500038146973,
+ "y": 388.49698543548584,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "ff75cb52.105748"
+ ]
+ ]
+ },
+ {
+ "id": "ff75cb52.105748",
+ "type": "switchNode",
+ "name": "switch this vnf-id == input vnf-id",
+ "xml": "<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1276.2500915527344,
+ "y": 388.16365337371826,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "49e6f7a3.488758"
+ ]
+ ]
+ },
+ {
+ "id": "49e6f7a3.488758",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1514.5833778381348,
+ "y": 387.163631439209,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "d7731519.ea37c8"
+ ]
+ ]
+ },
+ {
+ "id": "d7731519.ea37c8",
+ "type": "set",
+ "name": "set vnf-index",
+ "xml": "<set>\n<parameter name='vnf-index' value='`$idx`' />\n",
+ "comments": "",
+ "x": 1682.9165725708008,
+ "y": 387.16365337371826,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "59efadd9.34ff64",
+ "type": "switchNode",
+ "name": "switch vnf-index",
+ "xml": "<switch test='`$vnf-index`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1031.2500114440918,
+ "y": 456.16367626190186,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "4275fe83.7bd96",
+ "d296558f.79c2f8"
+ ]
+ ]
+ },
+ {
+ "id": "4275fe83.7bd96",
+ "type": "other",
+ "name": "NULL",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1214.5832862854004,
+ "y": 435.49698543548584,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "c8299496.706828"
+ ]
+ ]
+ },
+ {
+ "id": "e72eb007.b4761",
+ "type": "returnSuccess",
+ "name": "return success",
+ "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",
+ "comments": "",
+ "x": 2001.8175811767578,
+ "y": 1314.9729461669922,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "ea9f2a97.ca1f08",
+ "type": "for",
+ "name": "for each vnf",
+ "xml": "<for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2601.8189582824707,
+ "y": 898.5644903182983,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "168141b9.a5a37e"
+ ]
+ ]
+ },
+ {
+ "id": "f463cdaa.41559",
+ "type": "comment",
+ "name": "Remove VNF from service data",
+ "info": "",
+ "comments": "",
+ "x": 1943.6204223632812,
+ "y": 862.3146209716797,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "97d940c.f7414c",
+ "type": "set",
+ "name": "move vnf to remove one",
+ "xml": "<set>\n<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"$service-data.vnfs.vnf[$idx].\" />\n\t\n",
+ "comments": "",
+ "x": 2932.0769996643066,
+ "y": 935.9216842651367,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "9db43d1a.80b5b",
+ "type": "switchNode",
+ "name": "switch vnf_length",
+ "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2030.5766677856445,
+ "y": 903.8940572738647,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "9205be14.b6c51",
+ "a23b009d.a038"
+ ]
+ ]
+ },
+ {
+ "id": "9205be14.b6c51",
+ "type": "outcome",
+ "name": "1",
+ "xml": "<outcome value='1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2207.5767097473145,
+ "y": 864.5606441497803,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "80c57b23.9a7b78"
+ ]
+ ]
+ },
+ {
+ "id": "80c57b23.9a7b78",
+ "type": "set",
+ "name": "Remove vnfs",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.\" value=\"\"/>\n\n",
+ "comments": "",
+ "x": 2371.24320602417,
+ "y": 864.5607433319092,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "a23b009d.a038",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2209.100601196289,
+ "y": 945.0367832183838,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "9a322bdb.0d3758"
+ ]
+ ]
+ },
+ {
+ "id": "632aab75.bfd5f4",
+ "type": "set",
+ "name": "set new vnf length",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value=\"`$service-data.vnfs.vnf_length - 1`\"/>\n\n\t\n",
+ "comments": "",
+ "x": 2621.373092651367,
+ "y": 1037.4774322509766,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "cc9aa5c.d39c258",
+ "type": "set",
+ "name": "Remove the last vnf in the list",
+ "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$service-data.vnfs.vnf_length - 1].\" value=\"\"/>\n\n",
+ "comments": "",
+ "x": 2657.076747894287,
+ "y": 992.5884532928467,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "9a322bdb.0d3758",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 2374.909942626953,
+ "y": 948.5605640411377,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "ea9f2a97.ca1f08",
+ "cc9aa5c.d39c258",
+ "632aab75.bfd5f4"
+ ]
+ ]
+ },
+ {
+ "id": "422a0307.b6e26c",
+ "type": "switchNode",
+ "name": "switch current vf-module_length",
+ "xml": "<switch test=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1405.4999160766602,
+ "y": 677.8303089141846,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "cb71008a.a8f54",
+ "281b69c0.91b136",
+ "b3e6a6da.0a0b88"
+ ]
+ ]
+ },
+ {
+ "id": "cb71008a.a8f54",
+ "type": "outcome",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1634.1665573120117,
+ "y": 634.4969501495361,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "c599e4d6.59a018"
+ ]
+ ]
+ },
+ {
+ "id": "281b69c0.91b136",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1632.7379684448242,
+ "y": 675.9256076812744,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "c599e4d6.59a018"
+ ]
+ ]
+ },
+ {
+ "id": "c599e4d6.59a018",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1781.309482574463,
+ "y": 655.9256086349487,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b3e6a6da.0a0b88",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1632.7380180358887,
+ "y": 717.3541955947876,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "46457f5b.3ef86"
+ ]
+ ]
+ },
+ {
+ "id": "46457f5b.3ef86",
+ "type": "returnFailure",
+ "name": "return failure",
+ "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=\"Cannot delete the VNF because there are VF modules defined\" />\n",
+ "comments": "",
+ "x": 1799.8809127807617,
+ "y": 716.9255838394165,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "1b063d0f.a0a6e3",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:naming-policy-generate-name",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2149.9602127075195,
+ "y": 1258.7499952316284,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "85b7a9d.afa5c58",
+ "type": "set",
+ "name": "set variables for deleting name",
+ "xml": "<set>\n<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />\n<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='naming-policy-generate-name-input.action' value='DELETE' />\n",
+ "comments": "",
+ "x": 2051.388832092285,
+ "y": 1211.60706615448,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "f601bfcd.e4487",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1765.6427841186523,
+ "y": 1094.7024116516113,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "9db43d1a.80b5b",
+ "85b7a9d.afa5c58",
+ "1b063d0f.a0a6e3",
+ "e72eb007.b4761"
+ ]
+ ]
+ },
+ {
+ "id": "9f240acf.f10968",
+ "type": "call",
+ "name": "call self-serve-vnf-forking-logic",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1389.7857284545898,
+ "y": 904.7023048400879,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "c939b04c.c627d",
+ "type": "switchNode",
+ "name": "switch ss.self-serve-flag",
+ "xml": "<switch test=\"`$ss.self-serve-flag`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1372.4999465942383,
+ "y": 1094.5594997406006,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "7a49c72e.1fe9c8",
+ "ecc5218b.461db"
+ ]
+ ]
+ },
+ {
+ "id": "7a49c72e.1fe9c8",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1588.4999465942383,
+ "y": 1094.9880847930908,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "f601bfcd.e4487"
+ ]
+ ]
+ },
+ {
+ "id": "4db0d0cc.fcf23",
+ "type": "call",
+ "name": "call self-serve-vnf-unassign",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1804.214210510254,
+ "y": 1410.4166460037231,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "a8b8d4da.ba5e58",
+ "1a3f330c.4838ed"
+ ]
+ ]
+ },
+ {
+ "id": "a8b8d4da.ba5e58",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2011.9641952514648,
+ "y": 1410.6666345596313,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "58a86c05.a04eb4"
+ ]
+ ]
+ },
+ {
+ "id": "58a86c05.a04eb4",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Encountered error while unassigning self-serve resources with error: '+ $error-message`\" />\n",
+ "comments": "",
+ "x": 2177.5356216430664,
+ "y": 1410.3095293045044,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "1a3f330c.4838ed",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2016.5713691711426,
+ "y": 1461.2221689224243,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "9db43d1a.80b5b"
+ ]
+ ]
+ },
+ {
+ "id": "ecc5218b.461db",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1589.7856254577637,
+ "y": 1410.8452253341675,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "4db0d0cc.fcf23"
+ ]
+ ]
+ },
+ {
+ "id": "46619b61.b2e6d4",
+ "type": "get-resource",
+ "name": "get-resource VF_MODEL",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key='SELECT * from VF_MODEL WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'\n pfx='db.vf-model'>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1376.7856369018555,
+ "y": 800.4166660308838,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "db921505.1ecab8",
+ "2ad253ad.07e3dc"
+ ]
+ ]
+ },
+ {
+ "id": "db921505.1ecab8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1601.5713348388672,
+ "y": 780.7975034713745,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "b4171d9d.62fd"
+ ]
+ ]
+ },
+ {
+ "id": "2ad253ad.07e3dc",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1610.142765045166,
+ "y": 825.0832166671753,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "6896f0e8.60f06"
+ ]
+ ]
+ },
+ {
+ "id": "c42726a5.5f0838",
+ "type": "comment",
+ "name": "Query is needed by forking logic",
+ "info": "",
+ "comments": "",
+ "x": 1353.9285202026367,
+ "y": 761.8452005386353,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "c8299496.706828",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n",
+ "comments": "",
+ "x": 1371.2499885559082,
+ "y": 434.49694538116455,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "f32a75d4.e72c28",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n",
+ "comments": "",
+ "x": 836.2499809265137,
+ "y": 307.83032417297363,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "23bd57ed.5c2f68",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 679.5834007263184,
+ "y": 417.83028984069824,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "c5c57fb4.bffa4"
+ ]
+ ]
+ },
+ {
+ "id": "c5c57fb4.bffa4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 837.9166374206543,
+ "y": 417.8302993774414,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "ea2e0eca.99875",
+ "59efadd9.34ff64"
+ ]
+ ]
+ },
+ {
+ "id": "5d1e4a8b.33a764",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1060.4166412353516,
+ "y": 843.2469615936279,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "422a0307.b6e26c",
+ "46619b61.b2e6d4",
+ "9f240acf.f10968",
+ "c939b04c.c627d"
+ ]
+ ]
+ },
+ {
+ "id": "d296558f.79c2f8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1211.2500839233398,
+ "y": 481.16366958618164,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "5d1e4a8b.33a764"
+ ]
+ ]
+ },
+ {
+ "id": "168141b9.a5a37e",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 2738.6907691955566,
+ "y": 897.5328073501587,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ [
+ "5253081e.499f08",
+ "97d940c.f7414c",
+ "4cab7b3.6b48784"
+ ]
+ ]
+ },
+ {
+ "id": "5253081e.499f08",
+ "type": "set",
+ "name": "set tmpidx",
+ "xml": "<set>\n<parameter name=\"$tmpidx\" value=\"`$idx - 1`\"/>\n",
+ "comments": "",
+ "x": 2888.6904487609863,
+ "y": 854.1993503570557,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "4cab7b3.6b48784",
+ "type": "set",
+ "name": "erase entry at tmpidx",
+ "xml": "<set>\n<parameter name=\"service-data.vnfs.vnf[$tmpidx].\" value=\"\" />\n\t\n",
+ "comments": "",
+ "x": 2923.6903648376465,
+ "y": 895.8660793304443,
+ "z": "8bfceefc.af82b",
+ "wires": []
+ },
+ {
+ "id": "6896f0e8.60f06",
+ "type": "record",
+ "name": "record ",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'No model found for VNF customization UUID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1758.4999923706055,
+ "y": 825.7500009536743,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b4171d9d.62fd",
+ "type": "record",
+ "name": "record ",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"Error reading VF_MODEL table\"/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1741.4999923706055,
+ "y": 780.7500009536743,
+ "z": "8bfceefc.af82b",
+ "wires": [
+ []
+ ]
+ }
]
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_pnf-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_pnf-topology-operation-assign.xml new file mode 100644 index 00000000..f25087e9 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_pnf-topology-operation-assign.xml @@ -0,0 +1,71 @@ +<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='${project.version}'>
+ <method rpc='pnf-topology-operation-assign' mode='sync'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <switch test='`$pnf-topology-operation-input.pnf-request-input.cloud-owner`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='prop.cloud-region.cloud-owner' value='`$pnf-topology-operation-input.pnf-request-input.cloud-owner`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.request-information.request-action`'>
+ <outcome value='CreatePnfInstance'>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="If svc-action is 'assign' then request-action must be 'CreatePnfInstance'" />
+ </return>
+ </outcome>
+ </switch>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_MODEL WHERE customization_uuid = $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid'
+ pfx='db.vf-model'>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODEL table" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No model found for VF customization UUID ' + $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-pnf-assign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to create self-serve assignment for pnf with pnf-id=' + $pnf-topology-operation-input.pnf-details.pnf-id + ' with error: ' + $error-message`" />
+ </return>
+ </outcome>
+ </call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-pnf-assign.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_pnf-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_pnf-topology-operation.xml new file mode 100644 index 00000000..8ab8729f --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_pnf-topology-operation.xml @@ -0,0 +1,38 @@ +<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='${project.version}'>
+ <method rpc='pnf-topology-operation' mode='sync'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='validate-pnf-input' mode='sync' ></call>
+ <switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-action`'>
+ <outcome value='assign'>
+ <call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-assign' mode='sync' ></call>
+ </outcome>
+ <outcome value='activate'>
+ <call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-activate' mode='sync' ></call>
+ </outcome>
+ <outcome value='deactivate'>
+ <call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-deactivate' mode='sync' ></call>
+ </outcome>
+ <outcome value='unassign'>
+ <call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-unassign' mode='sync' ></call>
+ </outcome>
+ <outcome value='changeassign'>
+ <call module='GENERIC-RESOURCE-API' rpc='pnf-topology-operation-changeassign' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$pnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+ </return>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-assign.xml new file mode 100644 index 00000000..55d851c9 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-assign.xml @@ -0,0 +1,400 @@ +<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='${project.version}'>
+ <method rpc='self-serve-pnf-assign' mode='sync'>
+ <block atomic='true'>
+ <set>
+ <parameter name='is-new-pnf' value='true' />
+ </set>
+ <switch test='`$service-data.pnfs.pnf_length`'>
+ <outcome value=''>
+ <block>
+ <set>
+ <parameter name='pnf-index' value='0' />
+ </set>
+ <set>
+ <parameter name='service-data.pnfs.pnf_length' value='1' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='0'>
+ <block>
+ <set>
+ <parameter name='pnf-index' value='0' />
+ </set>
+ <set>
+ <parameter name='service-data.pnfs.pnf_length' value='1' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <for index='idx' start='0' end='`$service-data.pnfs.pnf_length`' >
+ <switch test='`$pf-topology-operation-input.pnf-details.pnf-id == $service-data.pnfs.pnf[$idx].pnf-id`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='is-new-pnf' value='false' />
+ </set>
+ <set>
+ <parameter name='pnf-index' value='`$idx`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$is-new-pnf`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='pnf-index' value='`$service-data.pnfs.pnf_length`' />
+ </set>
+ <set>
+ <parameter name='service-data.pnfs.pnf_length' value='`$service-data.pnfs.pnf_length + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$is-new-pnf`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-topology-identifier-structure.pnf-id'
+ value='`$pnf-topology-operation-input.pnf-details.pnf-id`' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-topology-identifier-structure.pnf-type'
+ value='`$pnf-topology-operation-input.pnf-details.pnf-type`' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.tenant'
+ value='`$pnf-topology-operation-input.pnf-request-input.tenant`' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.aic-cloud-region'
+ value='`$pnf-topology-operation-input.pnf-request-input.aic-cloud-region`' />
+ </set>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-id'
+ value='`$pnf-topology-operation-input.pnf-details.pnf-id`' />
+ </set>
+ <switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-invariant-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-invariant-uuid'
+ value='`$db.pnf-model.invariant-uuid`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-invariant-uuid'
+ value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-invariant-uuid`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-uuid'
+ value='`$db.pnf-model.uuid`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-uuid'
+ value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-uuid`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-version`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-version'
+ value='`$db.pnf-model.version`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-version'
+ value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-version`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-name`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-name'
+ value='`$db.pnf-model.name`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-name'
+ value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-name`' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.onap-model-information.model-customization-uuid'
+ value='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`' />
+ </set>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.sdnc-request-header.'
+ value='$pnf-topology-operation-input.sdnc-request-header.' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.request-information.'
+ value='$pnf-topology-operation-input.request-information.' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.'
+ value='$pnf-topology-operation-input.service-information.' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.'
+ value='$pnf-topology-operation-input.pnf-details.' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.'
+ value='$pnf-topology-operation-input.pnf-request-input.' />
+ </set>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.order-status' value='PendingCreate' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.last-rpc-action' value='`$pnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.last-action' value='`$pnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='ss.capability.execution-order[0]' value='aai-get' />
+ <parameter name='ss.capability.execution-order[1]' value='generate-name' />
+ <parameter name='ss.capability.execution-order[2]' value='alts-entitlement-assign' />
+ <parameter name='ss.capability.execution-order[3]' value='alts-license-assign' />
+ <parameter name='ss.capability.execution-order[4]' value='vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[6]' value='eipam-ip-assignment' />
+ <parameter name='ss.capability.execution-order[7]' value='eipam-create-pool' />
+ <parameter name='ss.capability.execution-order[8]' value='netbox-ip-assign' />
+ <parameter name='ss.capability.execution-order[9]' value='mac-address-assign' />
+ <parameter name='ss.capability.execution-order[10]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[11]' value='create-vpe-pool' />
+ <parameter name='ss.capability.execution-order[12]' value='unresolved-composite-data' />
+ <parameter name='ss.capability.execution-order[13]' value='aai-pnf-put' />
+ <parameter name='ss.capability.execution-order_length' value='14' />
+ </set>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.sdnc-generated-cloud-resources' value='true' />
+ </set>
+ <set>
+ <parameter name='ss.capability-type' value='pnf' />
+ </set>
+ <switch test='`$prop.controller.user`'>
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`'>
+ <outcome value=''>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.'
+ value='pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-pnf-ra-assignment' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to get RA assignments: ' + $error-message`" />
+ </return>
+ </outcome>
+ </call>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="DONE with pnf-ra-assigment"/>
+ </record>
+ </block>
+ </outcome>
+ </switch>
+ <for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >
+ <set>
+ <parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />
+ <!--
+ss.capability.execution-order[]
+-->
+ </set>
+ <set>
+ <parameter name='ss.capability-action' value='assign' />
+ </set>
+ <set>
+ <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
+ </set>
+ <for index='pidx' start='0' end='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' >
+ <set>
+ <parameter name='tmp.param.capability-name'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />
+ </set>
+ <switch test='`$ss.capability-name == $tmp.param.capability-name`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$pidx].resource-resolution-data.status`'>
+ <outcome value='PENDING'>
+ <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='pf.pnf-id'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-id`' />
+ <parameter name='pf.pnf-data.sdnc-request-header.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.sdnc-request-header.`' />
+ <parameter name='pf.pnf-data.request-information.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.request-information.`' />
+ <parameter name='pf.pnf-data.service-information.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.`' />
+ <parameter name='pf.pnf-data.pnf-details.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.`' />
+ <parameter name='pf.pnf-data.pnf-topology.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.`' />
+ <parameter name='pf.pnf-data.pnf-level-oper-status.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.`' />
+ <parameter name='pf.pnf-data.pnf-request-input.pnf-input-parameters.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.pnf-input-parameters.`' />
+ <parameter name='pf.pnf-data.pnf-request-input.request-version'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.request-version`' />
+ <parameter name='pf.pnf-data.pnf-request-input.pnf-name'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.pnf-name`' />
+ <parameter name='pf.pnf-data.pnf-request-input.tenant'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.tenant`' />
+ <parameter name='pf.pnf-data.pnf-request-input.aic-cloud-region'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.aic-cloud-region`' />
+ <parameter name='pf.pnf-data.pnf-request-input.aic-clli'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.aic-clli`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-pnf-assignments`"/>
+ <parameter name="outputPath" value="tmp.ss-pnf-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-pnf-url`"/>
+ <parameter name="outputPath" value="tmp.ss-pnf-url"/>
+ <parameter name="target" value="{pnf-id}"/>
+ <parameter name="replacement" value="`$service-data.pnfs.pnf[$pnf-index].pnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.pnf.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-pnf-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ss-pnf" />
+ <outcome value='failure'>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve pnf assignments during assign in MD-SAL" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve pnf assignments during assign in MD-SAL" />
+ </set>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'EXECUTION DONE: ' + $ss.capability-dg`"/>
+ </record>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='FAILED'>
+ <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='pf.pnf-id'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-id`' />
+ <parameter name='pf.pnf-data.sdnc-request-header.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.sdnc-request-header.`' />
+ <parameter name='pf.pnf-data.request-information.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.request-information.`' />
+ <parameter name='pf.pnf-data.service-information.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.`' />
+ <parameter name='pf.pnf-data.pnf-details.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.`' />
+ <parameter name='pf.pnf-data.pnf-topology.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.`' />
+ <parameter name='pf.pnf-data.pnf-level-oper-status.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-level-oper-status.`' />
+ <parameter name='pf.pnf-data.pnf-request-input.pnf-input-parameters.'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.pnf-input-parameters.`' />
+ <parameter name='pf.pnf-data.pnf-request-input.request-version'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.request-version`' />
+ <parameter name='pf.pnf-data.pnf-request-input.pnf-name'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.pnf-name`' />
+ <parameter name='pf.pnf-data.pnf-request-input.tenant'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.tenant`' />
+ <parameter name='pf.pnf-data.pnf-request-input.aic-cloud-region'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.aic-cloud-region`' />
+ <parameter name='pf.pnf-data.pnf-request-input.aic-clli'
+ value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-request-input.aic-clli`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-pnf-assignments`"/>
+ <parameter name="outputPath" value="tmp.ss-pnf-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-pnf-url`"/>
+ <parameter name="outputPath" value="tmp.ss-pnf-url"/>
+ <parameter name="target" value="{pnf-id}"/>
+ <parameter name="replacement" value="`$service-data.pnfs.pnf[$pnf-index].pnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.pnf.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-pnf-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ss-pnf" />
+ <outcome value='failure'>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve pnf assignments during assign in MD-SAL" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve pnf assignments during assign in MD-SAL" />
+ </set>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'EXECUTION DONE: ' + $ss.capability-dg`"/>
+ </record>
+ </outcome>
+ </call>
+ </outcome>
+ </switch>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-pnf-assign.log' />
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.xml new file mode 100644 index 00000000..707de84b --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-pnf-ra-assignment.xml @@ -0,0 +1,234 @@ +<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='${project.version}'>
+ <method rpc='self-serve-pnf-ra-assignment' mode='sync'>
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="tmp.return.generate.pnf-se-serv-uuid" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="generateUUID is failed" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name="request-id" value="`$tmp.return.generate.pnf-se-serv-uuid`"/>
+ <parameter name="resource-type" value="`$pnf-topology-operation-input.pnf-details.pnf-type`" />
+ <parameter name="resource-id" value="`$pnf-topology-operation-input.pnf-details.pnf-id`" />
+ <parameter name="action-name" value="resource-assignment"/>
+ <parameter name="responsePrefix" value="raAssign" />
+ </set>
+ <switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='highnum' value='0' />
+ <parameter name='prehighnum' value='0'/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='highnum' value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' />
+ <parameter name='prehighnum' value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' />
+ </set>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='i' start='0' end='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param_length`' >
+ <block atomic="true">
+ <switch test='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].name`'>
+ <outcome value='sdnc_model_name'>
+ <set>
+ <parameter name='tmp.sdnc-model-name' value='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value`' />
+ </set>
+ </outcome>
+ <outcome value='sdnc_model_version'>
+ <set>
+ <parameter name='tmp.sdnc-model-version' value='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value`' />
+ </set>
+ </outcome>
+ <outcome value='sdnc_artifact_name'>
+ <set>
+ <parameter name='tmp.sdnc-artifact-name' value='`$pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name="tmp.config-name-value-other-payload" value="`$tmp.config-name-value-other-payload + '"' + $pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].name + '":"' + $pnf-topology-operation-input.pnf-request-input.pnf-input-parameters.param[$i].value + '",'`"/>
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.sdnc-model-name == '' or $tmp.sdnc-model-version == '' or $tmp.sdnc-artifact-name == ''`">
+ <outcome value='true'>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_MODEL WHERE customization_uuid = $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid'
+ pfx='db1.vf-model'>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODEL table" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No VF_MODEL found where customization_uuid = ' + $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='tmp.sdnc-model-name' value='`$db1.vf-model.sdnc-model-name`' />
+ <parameter name='tmp.sdnc-model-version' value='`$db1.vf-model.sdnc-model-version`' />
+ <parameter name='tmp.sdnc-artifact-name' value='`$db1.vf-model.sdnc-artifact-name`' />
+ </set>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="tmp.config-name-value-payload4" value="`$tmp.config-name-value-other-payload + '"service-instance-id":"' + $pnf-topology-operation-input.service-information.service-instance-id + '",'`"/>
+ <parameter name="tmp.config-name-value-payload5" value="`$tmp.config-name-value-payload4 + '"pnf-model-customization-uuid":"' + $pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid + '",'`"/>
+ <parameter name="tmp.config-name-value-payload6" value="`$tmp.config-name-value-payload5 + '"pnf-id":"' + $pnf-topology-operation-input.pnf-details.pnf-id + '",'`"/>
+ <parameter name="tmp.config-name-value-payload7" value="`$tmp.config-name-value-payload6 + '"aic-cloud-region":"' + $pnf-topology-operation-input.pnf-request-input.aic-cloud-region + '"'`"/>
+ <parameter name="tmp.json-payload" value="`'{' + $tmp.config-name-value-payload7 + '}'`" />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="BEFORE BlueprintProcessingClient"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.adaptors.grpc.cds.BlueprintProcessingClient' method='sendRequest'>
+ <parameter name='blueprint_name' value='`$tmp.sdnc-model-name`' />
+ <parameter name='blueprint_version' value='`$tmp.sdnc-model-version`' />
+ <parameter name='action' value='`$action-name`' />
+ <parameter name='mode' value='sync' />
+ <parameter name='force' value='false' />
+ <parameter name='ttl' value='0' />
+ <parameter name='prefix' value='`$responsePrefix`' />
+ <parameter name='payload' value="`'{
+ "resource-assignment-request": {
+ "template-prefix": [
+ "' + $tmp.sdnc-artifact-name + '"
+ ],
+ "resource-assignment-properties":
+ ' + $tmp.json-payload + '
+ }
+}'`"/>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from BlueprintProcessingClient" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from BlueprintProcessingClient" />
+ </return>
+ </outcome>
+ </execute>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="AFTER BlueprintProcessingClient"/>
+ </record>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
+ <parameter name="source" value="`'raAssign.payload.resource-assignment-params.' + $tmp.sdnc-artifact-name`" />
+ <parameter name="outputPath" value="jsonContextPrefix" />
+ <parameter name="isEscaped" value="false" />
+ </execute>
+ <for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.resource-accumulator-resolved-data_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.mso.param.found' value='false' />
+ </set>
+ <switch test='`$prehighnum > 0`'>
+ <outcome value='true'>
+ <for silentFailure='true' index='cnt' start='0' end='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' >
+ <switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$cnt].name == $jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$cnt].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>
+ <parameter name='tmp.mso.param.found' value='true' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ <switch test='`$tmp.mso.param.found`'>
+ <outcome value='false'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'/>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.capability-name`' value='RA Resolved'/>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.status`' value='SUCCESS'/>
+ </set>
+ <set>
+ <parameter name='highnum' value='`$highnum + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.capability-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping_length`' >
+ <for silentFailure='true' index='l' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-name`'/>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-value`'/>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.capability-name`' value='`$jsonContextPrefix.capability-data[$i].capability-name`'/>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.status`' value='PENDING'/>
+ <parameter name='num' value='0' />
+ </set>
+ <switch test="`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length == ''`">
+ <outcome value='true'></outcome>
+ <outcome value='false'>
+ <for silentFailure='true' index='k' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-name`'/>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-value`'/>
+ </set>
+ <set>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
+ </set>
+ <set>
+ <parameter name='num' value='`$num + 1`' />
+ </set>
+ </block>
+ </for>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='`service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`' value='`$highnum + 1`'/>
+ </set>
+ <set>
+ <parameter name='highnum' value='`$highnum + 1`' />
+ </set>
+ </block>
+ </for>
+ </for>
+ </for>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="DONE: pnf-ra-assignment"/>
+ </record>
+ <set>
+ <parameter name='pathname'
+ value="`'/var/tmp/ss-pnf-ra-assignment-' +
+ $service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.pnf-id + '.log'`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='`$pathname`' />
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml index 28735a9b..68df95e3 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml @@ -4,12 +4,12 @@ <method rpc='self-serve-vf-module-unassign' mode='sync'>
<block atomic='true'>
<set>
- <parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />
- <parameter name='ss.capability.execution-order[1]' value='mS-mac-address-assign' />
- <parameter name='ss.capability.execution-order[2]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[3]' value='netbox-ip-assign' />
- <parameter name='ss.capability.execution-order[4]' value='vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[5]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[0]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[1]' value='mac-address-assign' />
+ <parameter name='ss.capability.execution-order[2]' value='netbox-ip-assign' />
+ <parameter name='ss.capability.execution-order[3]' value='eipam-ip-assignment' />
+ <parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='vlan-tag-assign' />
<parameter name='ss.capability.execution-order[6]' value='alts-license-assign' />
<parameter name='ss.capability.execution-order[7]' value='alts-entitlement-assign' />
<parameter name='ss.capability.execution-order[8]' value='generate-name' />
@@ -18,6 +18,14 @@ <set>
<parameter name='ss.capability-type' value='vf-module' />
</set>
+ <switch test='`$prop.controller.user`'>
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ </outcome>
+ </switch>
<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >
<set>
<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />
@@ -37,138 +45,112 @@ ss.capability.execution-order </set>
<switch test='`$ss.capability-name == $tmp.param.capability-name`'>
<outcome value='true'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`'>
- <outcome value='SUCCESS'>
- <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
- <outcome value='failure'>
- <block atomic='true'>
- <set>
- <parameter name='vf.vf-module-id'
+ <block atomic='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`'>
+ <outcome value='SUCCESS'>
+ <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='vf.vf-module-id'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />
- <parameter name='vf.vf-module-data.sdnc-request-header.'
+ <parameter name='vf.vf-module-data.sdnc-request-header.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.`' />
- <parameter name='vf.vf-module-data.request-information.'
+ <parameter name='vf.vf-module-data.request-information.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.`' />
- <parameter name='vf.vf-module-data.service-information.'
+ <parameter name='vf.vf-module-data.service-information.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.`' />
- <parameter name='vf.vf-module-data.vnf-information.'
+ <parameter name='vf.vf-module-data.vnf-information.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.`' />
- <parameter name='vf.vf-module-data.vf-module-information.'
+ <parameter name='vf.vf-module-data.vf-module-information.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.`' />
- <parameter name='vf.vf-module-data.vf-module-topology.'
+ <parameter name='vf.vf-module-data.vf-module-topology.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.`' />
- <parameter name='vf.vf-module-data.vf-module-level-oper-status.'
+ <parameter name='vf.vf-module-data.vf-module-level-oper-status.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.`' />
- <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-input-parameters.'
+ <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-input-parameters.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-input-parameters.`' />
- <parameter name='vf.vf-module-data.vf-module-request-input.request-version'
+ <parameter name='vf.vf-module-data.vf-module-request-input.request-version'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.request-version`' />
- <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-name'
+ <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-name'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-name`' />
- <parameter name='vf.vf-module-data.vf-module-request-input.tenant'
+ <parameter name='vf.vf-module-data.vf-module-request-input.tenant'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.tenant`' />
- <parameter name='vf.vf-module-data.vf-module-request-input.aic-cloud-region'
+ <parameter name='vf.vf-module-data.vf-module-request-input.aic-cloud-region'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-cloud-region`' />
- <parameter name='vf.vf-module-data.vf-module-request-input.aic-clli'
+ <parameter name='vf.vf-module-data.vf-module-request-input.aic-clli'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-clli`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.ss-vfmodule-assignments`"/>
- <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
- <parameter name="target" value="{service-instance-id}"/>
- <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.service-instance-id`"/>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
- <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
- <parameter name="target" value="{vnf-id}"/>
- <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.vnf-id`"/>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
- <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
- <parameter name="target" value="{vf-module-id}"/>
- <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`"/>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vfmodule.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vfmodule-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='PUT' />
- <parameter name="responsePrefix" value="mdsal-ss-vfmodule" />
- <outcome value='failure'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during unassign in MD-SAL" />
- </set>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during unassign in MD-SAL" />
- </set>
- </block>
- </outcome>
- </execute>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`" />
- </return>
- </block>
- </outcome>
- </call>
- </outcome>
- <outcome value='DELETED'>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <block atomic='true'>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-vfmodule-assignments`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{vnf-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.vnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{vf-module-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vfmodule.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vfmodule-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ss-vfmodule" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during unassign in MD-SAL" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during unassign in MD-SAL" />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'DONE: ' + $ss.capability-dg`"/>
+ </record>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`"/>
<parameter name="field2" value="`'SS: ss.capability-name: ' + $ss.capability-name`"/>
+ <parameter name="field3" value="`'SS: tmp.param.capability-name: ' + $tmp.param.capability-name`"/>
</record>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Failed to unassign self-serve vf-module assignments because the status for ' + $ss.capability-name + ' is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`"/>
- </return>
- </block>
- </outcome>
- </switch>
+ </outcome>
+ </switch>
+ <break/>
+ </block>
</outcome>
</switch>
</for>
</for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value='1'>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
- </set>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <set>
- <parameter name="tmpidx" value="`$idx - 1`"/>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
- </set>
- </for>
- <!--EIPAM plug-in needs this attribute set with this name-->
- <set>
- <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
- </set>
- </block>
- </outcome>
- </switch>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name='filename' value='/var/tmp/ss-vf-unassign.log' />
</execute>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml index dd5bc409..d69f4758 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml @@ -4,12 +4,12 @@ <method rpc='self-serve-vnf-unassign' mode='sync'>
<block atomic='true'>
<set>
- <parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />
- <parameter name='ss.capability.execution-order[1]' value='mS-mac-address-assign' />
- <parameter name='ss.capability.execution-order[2]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[3]' value='netbox-ip-assign' />
- <parameter name='ss.capability.execution-order[4]' value='vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[5]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[0]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[1]' value='mac-address-assign' />
+ <parameter name='ss.capability.execution-order[2]' value='netbox-ip-assign' />
+ <parameter name='ss.capability.execution-order[3]' value='eipam-ip-assignment' />
+ <parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='vlan-tag-assign' />
<parameter name='ss.capability.execution-order[6]' value='alts-license-assign' />
<parameter name='ss.capability.execution-order[7]' value='alts-entitlement-assign' />
<parameter name='ss.capability.execution-order[8]' value='generate-name' />
@@ -18,6 +18,14 @@ <set>
<parameter name='ss.capability-type' value='vnf' />
</set>
+ <switch test='`$prop.controller.user`'>
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ </outcome>
+ </switch>
<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >
<set>
<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />
@@ -37,118 +45,96 @@ ss.capability.execution-order[] </set>
<switch test='`$ss.capability-name == $tmp.param.capability-name`'>
<outcome value='true'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`'>
- <outcome value='SUCCESS'>
- <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
- <outcome value='failure'>
- <block atomic='true'>
- <set>
- <parameter name='vf.vnf-id'
+ <block atomic='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`'>
+ <outcome value='SUCCESS'>
+ <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='vf.vnf-id'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-id`' />
- <parameter name='vf.vnf-data.sdnc-request-header.'
+ <parameter name='vf.vnf-data.sdnc-request-header.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.`' />
- <parameter name='vf.vnf-data.request-information.'
+ <parameter name='vf.vnf-data.request-information.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.`' />
- <parameter name='vf.vnf-data.service-information.'
+ <parameter name='vf.vnf-data.service-information.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.`' />
- <parameter name='vf.vnf-data.vnf-information.'
+ <parameter name='vf.vnf-data.vnf-information.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.`' />
- <parameter name='vf.vnf-data.vnf-request-input.'
+ <parameter name='vf.vnf-data.vnf-request-input.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.`' />
- <parameter name='vf.vnf-data.vnf-request-input.vnf-input-parameters.'
+ <parameter name='vf.vnf-data.vnf-request-input.vnf-input-parameters.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.`' />
- <parameter name='vf.vnf-data.vnf-topology.'
+ <parameter name='vf.vnf-data.vnf-topology.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.`' />
- <parameter name='vf.vnf-data.vnf-level-oper-status.'
+ <parameter name='vf.vnf-data.vnf-level-oper-status.'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.ss-vnf-assignments`"/>
- <parameter name="outputPath" value="tmp.ss-vnf-url"/>
- <parameter name="target" value="{service-instance-id}"/>
- <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id`"/>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.ss-vnf-url`"/>
- <parameter name="outputPath" value="tmp.ss-vnf-url"/>
- <parameter name="target" value="{vnf-id}"/>
- <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-id`"/>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vnf.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vnf-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='PUT' />
- <parameter name="responsePrefix" value="mdsal-ss-vnf" />
- <outcome value='failure'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Error persisting self-serve vnf assignments in MD-SAL during unassign" />
- </set>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Error persisting self-serve vnf assignments in MD-SAL during unassign" />
- </set>
- </block>
- </outcome>
- </execute>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Failed to unassign self-serve vnf assignments for ' + $ss.capability-dg + ' with error: ' + $error-message`" />
- </return>
- </block>
- </outcome>
- </call>
- </outcome>
- <outcome value='DELETED'>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <block atomic='true'>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-vnf-assignments`"/>
+ <parameter name="outputPath" value="tmp.ss-vnf-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-vnf-url`"/>
+ <parameter name="outputPath" value="tmp.ss-vnf-url"/>
+ <parameter name="target" value="{vnf-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vnf.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vnf-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ss-vnf" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Error persisting self-serve vnf assignments in MD-SAL during unassign" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Error persisting self-serve vnf assignments in MD-SAL during unassign" />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to unassign self-serve vnf assignments for ' + $ss.capability-dg + ' with error: ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'DONE: ' + $ss.capability-dg`"/>
+ </record>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`"/>
<parameter name="field2" value="`'SS: ss.capability-name: ' + $ss.capability-name`"/>
+ <parameter name="field3" value="`'SS: tmp.param.capability-name: ' + $tmp.param.capability-name`"/>
</record>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Failed to unassign self-serve vnf assignments because the status for ' + $ss.capability-name + ' is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`"/>
- </return>
- </block>
- </outcome>
- </switch>
+ </outcome>
+ </switch>
+ <break/>
+ </block>
</outcome>
</switch>
</for>
</for>
- <switch test='`$service-data.vnfs.vnf_length`'>
- <outcome value='1'>
- <set>
- <parameter name="service-data.vnfs." value=""/>
- </set>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
- <set>
- <parameter name="$tmpidx" value="`$idx - 1`"/>
- <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
- </set>
- </for>
- <set>
- <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1]." value=""/>
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
- </set>
- </block>
- </outcome>
- </switch>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name='filename' value='/var/tmp/ss-vnf-assign.log' />
</execute>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-pnf-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-pnf-input.xml new file mode 100644 index 00000000..3c1ae0dd --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-pnf-input.xml @@ -0,0 +1,86 @@ +<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='${project.version}'>
+ <method rpc='validate-pnf-input' mode='sync'>
+ <block atomic="true">
+ <switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-action`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-action is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-request-id`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.request-information.request-action`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.service-information.service-instance-id`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="service-information.service-instance-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.pnf-details.pnf-id`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="pnf-details.pnf-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.sdnc-request-header.svc-action`'>
+ <outcome value='assign'>
+ <block atomic="true">
+ <switch test='`$pnf-topology-operation-input.pnf-details.onap-model-information.model-customization-uuid`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="pnf-details.onap-model-information.model-customization-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.pnf-request-input.tenant`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="pnf-request-input.tenant is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$pnf-topology-operation-input.pnf-request-input.aic-cloud-region`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="pnf-request-input.aic-cloud-region is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml index 28669172..4586dad8 100755 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml @@ -34,10 +34,9 @@ </set>
<switch test='`$service-data.vnfs.vnf_length`'>
<outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="There are no VNFs defined in MD-SAL" />
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
</return>
</outcome>
<outcome value='Other'>
@@ -57,292 +56,328 @@ </switch>
<switch test='`$vnf-index`'>
<outcome value='-1'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`" />
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
</return>
</outcome>
</switch>
<set>
<parameter name='vf-module-index' value='-1' />
</set>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`" />
- </return>
- </outcome>
- <outcome value='Other'>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>
- <outcome value='true'>
- <block>
- <set>
- <parameter name='vf-module-index' value='`$idx`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- </outcome>
- </switch>
+ <for silentFailure='true' index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='vf-module-index' value='`$idx`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
<switch test='`$vf-module-index`'>
<outcome value='-1'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`" />
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
</return>
</outcome>
- </switch>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-forking-logic' mode='sync' ></call>
- <switch test="`$ss.self-serve-flag`">
- <outcome value='true'>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-unassign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Encountered error while unassigning self-serve vf-moldule esources with error: '+ $error-message`" />
- </return>
- </outcome>
- <outcome value='success'>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </outcome>
- </call>
- </outcome>
- <outcome value='false'>
+ <outcome value='Other'>
<block atomic="true">
- <set>
- <parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
-key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating EIPAM_IP_ASSIGNMENTS table" />
- </return>
- </outcome>
- </update>
- <!--EIPAM plug-in needs this attribute set with this name-->
- <set>
- <parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />
- </set>
- <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
- <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error in EIPAM unassign IP address" />
- </return>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-unassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error while unassigning self-serve vf-moldule esources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <block>
+ <set>
+ <parameter name="tmpidx" value="`$idx - 1`"/>
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx].' value='' />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
+ </set>
+ </block>
+ </for>
+ <!--EIPAM plug-in needs this attribute set with this name-->
+ <set>
+ <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </call>
</outcome>
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+ <outcome value='false'>
<block atomic="true">
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ <set>
+ <parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating EIPAM_IP_ASSIGNMENTS table" />
+ </return>
+ </outcome>
+ </update>
+ <!--EIPAM plug-in needs this attribute set with this name-->
+ <set>
+ <parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />
+ </set>
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+ <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in EIPAM unassign IP address" />
+ </return>
+ </outcome>
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+ <block atomic="true">
+ <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
AND vm_name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
+ </outcome>
+ </delete>
+ </block>
+ </for>
+ </for>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>
+ <outcome value=''>
+ <block></block>
</outcome>
- </delete>
- </block>
- </for>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <outcome value='Other'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="instance-groups"
key="instance-group.instance-group-function = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function
AND instance-group.instance-group-type = 'L3-NETWORK'"
pfx='aai.instance-group' local-only='false' >
- <outcome value='success'>
- <for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >
- <for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >
- <for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >
- <switch test="`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key
+ <outcome value='success'>
+ <for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >
+ <for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >
+ <for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >
+ <switch test="`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key
== 'service-instance.service-instance-id'`">
- <outcome value='true'>
- <switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value
+ <outcome value='true'>
+ <switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value
== $service-data.service-information.service-instance-id`'>
- <outcome value='true'>
- <block>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value='1'>
+ <outcome value='true'>
<block>
- <set>
- <parameter name='tmp.status' value="`'PENDING_DELETE_' + $aai.instance-group.instance-group[$ig-index].id`" />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value='1'>
+ <block>
+ <set>
+ <parameter name='tmp.status' value="`'PENDING_DELETE_' + $aai.instance-group.instance-group[$ig-index].id`" />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $aai.instance-group.instance-group[$ig-index].id" ></update>
- <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
- <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
- </execute>
- </block>
- </outcome>
- </switch>
- <for index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
- <switch test='`$aai.instance-group.instance-group[$ig-index].id
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+ <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <for index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
+ <switch test='`$aai.instance-group.instance-group[$ig-index].id
== $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>
- <outcome value='true'>
- <for index='network-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$nig-index].networks.network_length`' >
- <set>
- <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].vlan-tag-id'
+ <outcome value='true'>
+ <for index='network-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$nig-index].networks.network_length`' >
+ <set>
+ <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].vlan-tag-id'
value='' />
- <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].network-status'
+ <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].network-status'
value='unassigned' />
- </set>
+ </set>
+ </for>
+ </outcome>
+ </switch>
</for>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </for>
- </for>
- </for>
- </outcome>
- </get-resource>
- </outcome>
- </switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name`'>
- <outcome value='Other'>
- <block></block>
- </outcome>
- <outcome value=''>
- <block atomic="true">
- <set>
- <parameter name='generate-unique-name-input.name-table-type' value='VF_MODULE_INSTANCE' />
- <parameter name='generate-unique-name-input.context-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='generate-unique-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-unique-name' mode='sync' ></call>
- </block>
- </outcome>
- </switch>
- <for silentFailure='true' index='vm-type-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <block>
- <for silentFailure='true' index='vm-name-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-name-index]`'>
- <outcome value=''>
- <block></block>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </for>
+ </for>
+ </outcome>
+ </get-resource>
</outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name`'>
<outcome value='Other'>
- <block>
+ <block></block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
<set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VM' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ <parameter name='generate-unique-name-input.name-table-type' value='VF_MODULE_INSTANCE' />
+ <parameter name='generate-unique-name-input.context-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='generate-unique-name-input.action' value='DELETE' />
</set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-unique-name' mode='sync' ></call>
</block>
</outcome>
</switch>
- </for>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
+ <for silentFailure='true' index='vm-type-index' start='0'
+ end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block>
+ <for silentFailure='true' index='vm-name-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-name-index]`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VM' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
<block>
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNFC' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />
- <parameter name='naming-policy-generate-name-input.vm-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vnfc-index]`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- </outcome>
- </switch>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNFC' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />
+ <parameter name='naming-policy-generate-name-input.vm-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vnfc-index]`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vnfc"
key="vnfc.vnfc-name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"></delete>
- </block>
- </for>
- <for silentFailure='true' index='network-role-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block>
- <for silentFailure='true' index='ipv4-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </block>
+ </for>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block>
+ <for silentFailure='true' index='ipv4-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv4-address-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv4-address-list.vip-ipv4-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" ></delete>
- </for>
- <for silentFailure='true' index='ipv6-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </for>
+ <for silentFailure='true' index='ipv6-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv6-address-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv6-address-list.vip-ipv6-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]" ></delete>
- </for>
- </block>
- </for>
- </block>
- </for>
- </block>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value='1'>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
- </set>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <set>
- <parameter name="tmpidx" value="`$idx - 1`"/>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
- </set>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ </block>
</for>
- <!--EIPAM plug-in needs this attribute set with this name-->
- <set>
- <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
- </set>
+ <block>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <block>
+ <set>
+ <parameter name="tmpidx" value="`$idx - 1`"/>
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx].' value='' />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
+ </set>
+ </block>
+ </for>
+ <!--EIPAM plug-in needs this attribute set with this name-->
+ <set>
+ <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
</block>
</outcome>
</switch>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
</block>
</outcome>
</switch>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml index 725e64f4..32e922e2 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml @@ -17,106 +17,157 @@ </switch>
<switch test='`$service-data.vnfs.vnf_length`'>
<outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="404" />
- <parameter name="error-message" value="There are no VNFs in MD-SAL" />
- </return>
- </outcome>
- </switch>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
- <switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >
- <outcome value='true'>
- <set>
- <parameter name='vnf-index' value='`$idx`' />
- </set>
- </outcome>
- </switch>
- </for>
- <switch test='`$vnf-index`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="404" />
- <parameter name="error-message" value="'Could not find VNF ' + $vnf-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'" />
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
</return>
</outcome>
- </switch>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`">
- <outcome value='0'>
- <block></block>
- </outcome>
- <outcome value=''>
- <block></block>
- </outcome>
<outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Cannot delete the VNF because there are VFs defined" />
- </return>
- </outcome>
- </switch>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from VF_MODEL WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'
- pfx='db.vf-model'></get-resource>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' ></call>
- <switch test="`$ss.self-serve-flag`">
- <outcome value='false'>
<block atomic="true">
- <switch test='`$service-data.vnfs.vnf_length`'>
- <outcome value='1'>
- <set>
- <parameter name="service-data.vnfs." value=""/>
- </set>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`' >
+ <outcome value='true'>
+ <set>
+ <parameter name='vnf-index' value='`$idx`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$vnf-index`'>
+ <outcome value=''>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ </return>
</outcome>
<outcome value='Other'>
<block atomic="true">
- <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
- <set>
- <parameter name="$tmpidx" value="`$idx - 1`"/>
- <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
- </set>
- </for>
- <set>
- <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1]." value=""/>
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
- </set>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`">
+ <outcome value='0'>
+ <block></block>
+ </outcome>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cannot delete the VNF because there are VF modules defined" />
+ </return>
+ </outcome>
+ </switch>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_MODEL WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'
+ pfx='db.vf-model'>
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="Error reading VF_MODEL table"/>
+ </record>
+ </outcome>
+ <outcome value='not-found'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'No model found for VNF customization UUID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`"/>
+ </record>
+ </outcome>
+ </get-resource>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
+ <outcome value='false'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs." value=""/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <set>
+ <parameter name="$tmpidx" value="`$idx - 1`"/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$tmpidx]." value="" />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
+ </set>
+ </block>
+ </for>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length - 1]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs." value=""/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <set>
+ <parameter name="$tmpidx" value="`$idx - 1`"/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$tmpidx]." value="" />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
+ </set>
+ </block>
+ </for>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length - 1]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </call>
+ </outcome>
+ </switch>
</block>
</outcome>
</switch>
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
</block>
</outcome>
- <outcome value='true'>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
- </return>
- </outcome>
- <outcome value='success'>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </outcome>
- </call>
- </outcome>
</switch>
</block>
</method>
|