aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json')
-rw-r--r--platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json1281
1 files changed, 1281 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json
new file mode 100644
index 00000000..df8edd0c
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json
@@ -0,0 +1,1281 @@
+[
+ {
+ "id": "325842f8.71766e",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 107.03125,
+ "y": 44.03125,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "260e5d2a.9ebe72"
+ ]
+ ]
+ },
+ {
+ "id": "260e5d2a.9ebe72",
+ "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": 319.03125381469727,
+ "y": 116.0312671661377,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "aa492387.d875a"
+ ]
+ ]
+ },
+ {
+ "id": "aa492387.d875a",
+ "type": "method",
+ "name": "sotn-attachment-topology-operation-create",
+ "xml": "<method rpc='sotn-attachment-topology-operation-create' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 307.0313720703125,
+ "y": 204.03125,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "3ba2475a.82b468"
+ ]
+ ]
+ },
+ {
+ "id": "3ba2475a.82b468",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 227.03130340576172,
+ "y": 953.0314979553223,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "5b9fedc5.bb21a4",
+ "1c8d2bb9.f29f94",
+ "269db4cc.d4abfc",
+ "373e17e2.9acc38",
+ "5fd13a1.e2465c4",
+ "acb04fc4.b40f4",
+ "574b7ca7.0881c4",
+ "35a496d5.57302a",
+ "950a621f.7b821",
+ "5dbf4a35.fd12c4",
+ "5accbcde.210f64",
+ "de4bba44.8919f8",
+ "a1a37b4b.52c8a8",
+ "63023c8e.9fcb64",
+ "a6efd3b6.3278d",
+ "994d951b.a5b738",
+ "8ee1af3e.bbe67",
+ "ad95dda4.7a6dd",
+ "efc5e53d.5d75a8",
+ "72c54e75.d1648",
+ "850178e9.7d2408",
+ "d5054e0.23964b",
+ "acacc6b8.9b06e8"
+ ]
+ ]
+ },
+ {
+ "id": "741c9c3f.224ea4",
+ "type": "comment",
+ "name": "Set allotted resource id if not sent by SO",
+ "info": "",
+ "comments": "",
+ "x": 698.1079406738281,
+ "y": 128.46516609191895,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "5b9fedc5.bb21a4",
+ "type": "switchNode",
+ "name": "switch allotted-resource-id",
+ "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 657.0312805175781,
+ "y": 169.03124237060547,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "8be7a33f.276ac",
+ "503fc7ba.f0e4b8"
+ ]
+ ]
+ },
+ {
+ "id": "8be7a33f.276ac",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 908.0313301086426,
+ "y": 131.03122925758362,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "32f9a898.99bcd8"
+ ]
+ ]
+ },
+ {
+ "id": "503fc7ba.f0e4b8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 909.03125,
+ "y": 191.03123784065247,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "4eae44ec.25255c"
+ ]
+ ]
+ },
+ {
+ "id": "4eae44ec.25255c",
+ "type": "set",
+ "name": "set tmp.ar.allotted-resource-id",
+ "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n",
+ "comments": "",
+ "x": 1141.031234741211,
+ "y": 191.03124260902405,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "1c8d2bb9.f29f94",
+ "type": "set",
+ "name": "set tmp.ar.self-link",
+ "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/connection-attachment-topology/'` \" />\n\n",
+ "comments": "",
+ "x": 629.0311737060547,
+ "y": 404.031307220459,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "269db4cc.d4abfc",
+ "type": "execute",
+ "name": "execute Properties",
+ "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.2930946350098,
+ "y": 489.69798469543457,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "373e17e2.9acc38",
+ "type": "execute",
+ "name": "generate allotted-resource tmp.ar-url",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 682.2930755615234,
+ "y": 573.6979522705078,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "32f9a898.99bcd8",
+ "type": "execute",
+ "name": "execute tmp.ar.allotted-resource-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"tmp.ar.allotted-resource-id\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1123.031307220459,
+ "y": 132.03123497962952,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "4b3e3360.e596bc"
+ ]
+ ]
+ },
+ {
+ "id": "4b3e3360.e596bc",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1341.031349182129,
+ "y": 132.0311987400055,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "a0c9c52c.3e6d68"
+ ]
+ ]
+ },
+ {
+ "id": "a0c9c52c.3e6d68",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value=\"An error occured while generation allotted resource ID\" />\n",
+ "comments": "",
+ "x": 1507.0313034057617,
+ "y": 132.03121304512024,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "5fd13a1.e2465c4",
+ "type": "get-resource",
+ "name": "get-resource connection-attachment-allotted-resource",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$tmp.ar.allotted-resource-id/' pfx='mdsal-ar' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 730.03125,
+ "y": 668.8090553283691,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "2117b9a.1971446"
+ ]
+ ]
+ },
+ {
+ "id": "2117b9a.1971446",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1050.0313301086426,
+ "y": 670.8090124130249,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "7534c2b3.76410c"
+ ]
+ ]
+ },
+ {
+ "id": "bd6696ff.0a7a78",
+ "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: Existing connection attachment allotted resource\" />\n \n",
+ "comments": "",
+ "x": 1783.5497093200684,
+ "y": 671.8750839233398,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "8d0e7e60.f9de9",
+ "type": "comment",
+ "name": "Check for non existence of allotted resource",
+ "info": "",
+ "comments": "",
+ "x": 694.0312881469727,
+ "y": 634.8091058731079,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "e79f21cd.1a744",
+ "type": "for",
+ "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
+ "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1592.6979064941406,
+ "y": 867.0312929153442,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "e0cc70b5.ec5cb"
+ ]
+ ]
+ },
+ {
+ "id": "574b7ca7.0881c4",
+ "type": "switchNode",
+ "name": "switch service-data.consumed-allotted-resources_length",
+ "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 745.6972923278809,
+ "y": 827.7452943325043,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "d641745.a8dc988",
+ "10ab333.e534fcd"
+ ]
+ ]
+ },
+ {
+ "id": "d641745.a8dc988",
+ "type": "other",
+ "name": "outcome Null",
+ "xml": "<outcome value=''>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1067.840175628662,
+ "y": 830.6027162075043,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "7824e75b.697748"
+ ]
+ ]
+ },
+ {
+ "id": "10ab333.e534fcd",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1055.8401794433594,
+ "y": 873.6027176380157,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "c987fa4d.92cd08"
+ ]
+ ]
+ },
+ {
+ "id": "c987fa4d.92cd08",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1215.967269897461,
+ "y": 871.7286942005157,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "e79f21cd.1a744",
+ "bae4bbfe.22ddd8",
+ "de19c440.aed268"
+ ]
+ ]
+ },
+ {
+ "id": "7824e75b.697748",
+ "type": "set",
+ "name": "set cidx",
+ "xml": "<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n",
+ "comments": "",
+ "x": 1226.6971473693848,
+ "y": 830.3167788982391,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "35a496d5.57302a",
+ "type": "set",
+ "name": "set consumed allotted resources",
+ "xml": "<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n",
+ "comments": "",
+ "x": 671.554573059082,
+ "y": 900.31689453125,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "bae4bbfe.22ddd8",
+ "type": "switchNode",
+ "name": "switch tmp.found-cidx",
+ "xml": "<switch test='`$tmp.found-cidx`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1405.082317352295,
+ "y": 903.7402169704437,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "c9bdea6f.ae8408"
+ ]
+ ]
+ },
+ {
+ "id": "c9bdea6f.ae8408",
+ "type": "outcomeTrue",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1595.0822715759277,
+ "y": 903.7401540279388,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "f4a1002.ec0e9"
+ ]
+ ]
+ },
+ {
+ "id": "f4a1002.ec0e9",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1761.0822715759277,
+ "y": 903.7401540279388,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "efdba6bf.3fa178"
+ ]
+ ]
+ },
+ {
+ "id": "e0cc70b5.ec5cb",
+ "type": "switchNode",
+ "name": "switch allotted-resource-id",
+ "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2066.8093872070312,
+ "y": 867.0312767028809,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "cf1bcffb.5a97a"
+ ]
+ ]
+ },
+ {
+ "id": "cf1bcffb.5a97a",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2291.619115829468,
+ "y": 869.4956977367401,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "9a928449.d9e6c8"
+ ]
+ ]
+ },
+ {
+ "id": "efdba6bf.3fa178",
+ "type": "set",
+ "name": "set tmp.cidx",
+ "xml": "<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n",
+ "comments": "",
+ "x": 2006.955617904663,
+ "y": 904.2518508434296,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "69a27589.0e830c",
+ "type": "comment",
+ "name": "Add to consumed service consumed-allotted-resources in mdsal",
+ "info": "Prepare data and add to service-data",
+ "comments": "",
+ "x": 764.6984901428223,
+ "y": 757.0312271118164,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "b960d74c.b75ab8",
+ "type": "comment",
+ "name": "This set resource will be added to MDSAL by provider code",
+ "info": "Below we add to service-data.consumed-allotted-resource at last index",
+ "comments": "",
+ "x": 747.0313453674316,
+ "y": 864.8093509674072,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "d5054e0.23964b",
+ "type": "update",
+ "name": "update AAI allotted-resource",
+ "xml": "<update plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`\" />\n\t<parameter name=\"operational-status\" value=\"Created\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 647.7220878601074,
+ "y": 1893.5631588697433,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "5db3e01e.d4ead",
+ "cde1c5f3.767a98"
+ ]
+ ]
+ },
+ {
+ "id": "5db3e01e.d4ead",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 903.4839973449707,
+ "y": 1876.5156625509262,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "3608fdb3.1050e2"
+ ]
+ ]
+ },
+ {
+ "id": "3608fdb3.1050e2",
+ "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=\"AAI failed\" />\n",
+ "comments": "",
+ "x": 1070.0078773498535,
+ "y": 1888.134733557701,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "cde1c5f3.767a98",
+ "type": "failure",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 910.5792846679688,
+ "y": 1909.2776302099228,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "3608fdb3.1050e2"
+ ]
+ ]
+ },
+ {
+ "id": "c4afab5c.baa998",
+ "type": "comment",
+ "name": "Save Resource to AAI",
+ "info": "",
+ "comments": "",
+ "x": 622.5317115783691,
+ "y": 1858.865050792694,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "88151412.9744b8",
+ "type": "comment",
+ "name": "Set allotted resource type if not sent by SO",
+ "info": "",
+ "comments": "",
+ "x": 701.0312194824219,
+ "y": 248.0312442779541,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "acb04fc4.b40f4",
+ "type": "switchNode",
+ "name": "switch allotted-resource-type",
+ "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 661.9545211791992,
+ "y": 281.59730529785156,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "66623b13.496cd4",
+ "4d39f4a7.b07cdc"
+ ]
+ ]
+ },
+ {
+ "id": "66623b13.496cd4",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value=''>",
+ "comments": "",
+ "outputs": 1,
+ "x": 906.9546241760254,
+ "y": 252.59730625152588,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "98a097ca.0fb138"
+ ]
+ ]
+ },
+ {
+ "id": "4d39f4a7.b07cdc",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 907.9545440673828,
+ "y": 312.5973148345947,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "487657c2.991598"
+ ]
+ ]
+ },
+ {
+ "id": "487657c2.991598",
+ "type": "set",
+ "name": "set tmp.ar.allotted-resource-type",
+ "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\n",
+ "comments": "",
+ "x": 1139.9545288085938,
+ "y": 312.5973196029663,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "45c27762.ed75b8",
+ "type": "comment",
+ "name": "For storage in AAI connection-attachment-topology",
+ "info": "",
+ "comments": "",
+ "x": 723.0312042236328,
+ "y": 372.03126525878906,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "9a37b9ec.57f5d8",
+ "type": "comment",
+ "name": "Obtain different URL, template location etc",
+ "info": "For saving resource information to MDSAL & for AAI",
+ "comments": "",
+ "x": 701.0312004089355,
+ "y": 454.92014598846436,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "92fc6e78.11aa",
+ "type": "comment",
+ "name": "Used for Put AR by id to MDSAL",
+ "info": "",
+ "comments": "",
+ "x": 665.0312347412109,
+ "y": 538.9201374053955,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "920f2559.59f028",
+ "type": "comment",
+ "name": "Obtain the last index in services",
+ "info": "ServiceData is added by Provider code",
+ "comments": "",
+ "x": 663.4757118225098,
+ "y": 792.9201095104218,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "78b042c2.3a757c",
+ "type": "comment",
+ "name": "TODO: Rework after confirmation from AAI",
+ "info": "",
+ "comments": "",
+ "x": 922.8906211853027,
+ "y": 1836.436089515686,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "850178e9.7d2408",
+ "type": "set",
+ "name": "set output to api handler",
+ "xml": "<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='connection-attachment-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $connection-attachment-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n",
+ "comments": "",
+ "x": 636.2993774414062,
+ "y": 1806.3904213905334,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "acacc6b8.9b06e8",
+ "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": 605.7124900817871,
+ "y": 1941.006284236908,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "98a097ca.0fb138",
+ "type": "set",
+ "name": "set tmp.ar.allotted-resource-type",
+ "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value=\"SOTNAttachmentInstance\" />\n",
+ "comments": "",
+ "x": 1146.0313110351562,
+ "y": 253.0312328338623,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "ad95dda4.7a6dd",
+ "type": "call",
+ "name": "call GENERIC-RESOURCE-API:sotn-get-request-input-param",
+ "xml": "<call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.0254058837891,
+ "y": 1637.5250849723816,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "72c54e75.d1648",
+ "type": "execute",
+ "name": "execute RestApiCallNode - PUT AR by id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-attachment.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-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-ar\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 696.0314865112305,
+ "y": 1678.0312724113464,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "cee5ccdb.56f91",
+ "343b1a53.f93b56",
+ "d836f528.1e2818"
+ ]
+ ]
+ },
+ {
+ "id": "cee5ccdb.56f91",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 964.6728630065918,
+ "y": 1729.3626841530204,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "7a6b84bb.83fdac"
+ ]
+ ]
+ },
+ {
+ "id": "343b1a53.f93b56",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 955.6729125976562,
+ "y": 1697.862709902227,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "7a6b84bb.83fdac"
+ ]
+ ]
+ },
+ {
+ "id": "d836f528.1e2818",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 959.4229507446289,
+ "y": 1668.2198147773743,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "2a50bed0.d894a2"
+ ]
+ ]
+ },
+ {
+ "id": "7a6b84bb.83fdac",
+ "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 md-sal for connection-attachment-allotted-resource\" />\n",
+ "comments": "",
+ "x": 1125.422950744629,
+ "y": 1698.6127337440848,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "2a50bed0.d894a2",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1101.0789184570312,
+ "y": 1664.4119839668274,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "de4bba44.8919f8",
+ "type": "execute",
+ "name": "execute RestApiCallNode - Update parent provided service AR",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-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=\"parent\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.0312156677246,
+ "y": 1198.031394958496,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "193ed140.775b6f",
+ "5734aea.1129c5",
+ "1e7e5c60.a431d4"
+ ]
+ ]
+ },
+ {
+ "id": "193ed140.775b6f",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1083.3392333984375,
+ "y": 1243.0296125411987,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "f7734abc.a1eef8"
+ ]
+ ]
+ },
+ {
+ "id": "5734aea.1129c5",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1074.339282989502,
+ "y": 1211.5296382904053,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "f7734abc.a1eef8"
+ ]
+ ]
+ },
+ {
+ "id": "1e7e5c60.a431d4",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1078.0893211364746,
+ "y": 1181.8867431655526,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "850e7d60.6ac59"
+ ]
+ ]
+ },
+ {
+ "id": "f7734abc.a1eef8",
+ "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 md-sal for connection-attachment-allotted-resource\" />\n",
+ "comments": "",
+ "x": 1244.0893211364746,
+ "y": 1212.2796621322632,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "850e7d60.6ac59",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1219.745288848877,
+ "y": 1178.0789123550057,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "34f114cf.2fe48c",
+ "type": "comment",
+ "name": "Put the parent allotted resource in mdsal",
+ "info": "",
+ "comments": "",
+ "x": 685.0311508178711,
+ "y": 1166.0312938690186,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "63023c8e.9fcb64",
+ "type": "set",
+ "name": "set connection-attachment-ar-identifiers",
+ "xml": "<set>\n<parameter name='connection-attachment-ar-identifiers.consuming-service-instance-id' value=\"`$connection-attachment-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='connection-attachment-ar-identifiers.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='connection-attachment-ar-identifiers.allotted-resource-type' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='connection-attachment-ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n",
+ "comments": "",
+ "x": 685.3883056640625,
+ "y": 1400.6029052734375,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "a1a37b4b.52c8a8",
+ "type": "set",
+ "name": "set ar-data",
+ "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.action' value=\"`$connection-attachment-topology-operation-input.request-information.request-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value=\"connection-attachment-topology-operation\" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$connection-attachment-topology-operation-input.request-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$connection-attachment-topology-operation-input.service-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.' value=\"`$connection-attachment-topology-operation-input.connection-attachment-request-input.` \" />",
+ "comments": "",
+ "x": 596.2451171875,
+ "y": 1359.4122314453125,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "a6efd3b6.3278d",
+ "type": "set",
+ "name": "set identifiers in overall structure",
+ "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.' \nvalue=\"`$connection-attachment-ar-identifiers.`\" />\n\n\n",
+ "comments": "",
+ "x": 662.1981048583984,
+ "y": 1442.698115348816,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "994d951b.a5b738",
+ "type": "execute",
+ "name": "execute getTime",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 613.5309715270996,
+ "y": 1525.0316753387451,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "8ee1af3e.bbe67",
+ "type": "set",
+ "name": "set allotted-resource-oper-status",
+ "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n",
+ "comments": "",
+ "x": 664.5180320739746,
+ "y": 1560.9828262329102,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "efc5e53d.5d75a8",
+ "type": "set",
+ "name": "set model-data",
+ "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` \" />",
+ "comments": "",
+ "x": 606.0866241455078,
+ "y": 1479.586974143982,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "21b74746.c42fa8",
+ "type": "comment",
+ "name": "Prepare data for allotted-resource addition to MDSAL",
+ "info": "This will add to allotted-resource which is present inside service.",
+ "comments": "",
+ "x": 723.4201202392578,
+ "y": 1319.5868339538574,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "5accbcde.210f64",
+ "type": "execute",
+ "name": "generate parent-ar url - replace allotted-resource-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.parent-ar-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 726.5312461853027,
+ "y": 1129.0312910079956,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "5dbf4a35.fd12c4",
+ "type": "execute",
+ "name": "generate parent-ar url - replace service-instance-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.parent-provided-resource`\"/>\n <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 727.5311851501465,
+ "y": 1091.03134059906,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+
+ ]
+ ]
+ },
+ {
+ "id": "52e7ff5.9702d",
+ "type": "comment",
+ "name": "Prepare Parent AR URL",
+ "info": "Preparation to set provided-allotted-resource in parent service instance",
+ "comments": "",
+ "x": 634.5316009521484,
+ "y": 1019.0313377380371,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "950a621f.7b821",
+ "type": "set",
+ "name": "set tmp.ar.parent-service-instance-id",
+ "xml": "<set>\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n\n",
+ "comments": "",
+ "x": 679.5314331054688,
+ "y": 1055.53125,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "60a92f9f.3244e",
+ "type": "comment",
+ "name": "Required for filling template values",
+ "info": "This is done because connection-attachment is generic resource and doesn't have specific parameters",
+ "comments": "",
+ "x": 669.0316314697266,
+ "y": 1606.531012058258,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "9a928449.d9e6c8",
+ "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 md-sal for connection-attachment-allotted-resource as cosumed allotted resource already exists.\" />\n",
+ "comments": "",
+ "x": 2479.7880859375,
+ "y": 867.6770629882812,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "de19c440.aed268",
+ "type": "set",
+ "name": "set tmp.found-cidx",
+ "xml": "<set>\n<parameter name='tmp.found-cidx' value=\"`false`\" />\n\n\n",
+ "comments": "",
+ "x": 1395.6773529052734,
+ "y": 824.3438148498535,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "a7c16e9b.5cd68",
+ "type": "comment",
+ "name": "Add to parent services provided-allotted-resources in mdsal",
+ "info": "",
+ "comments": "",
+ "x": 744.2327270507812,
+ "y": 980.0104694366455,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "d7647e1e.888aa",
+ "type": "comment",
+ "name": "Add to allotted-resources in mdsal",
+ "info": "",
+ "comments": "",
+ "x": 664.9999465942383,
+ "y": 1287.0001356601715,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+
+ ]
+ },
+ {
+ "id": "7534c2b3.76410c",
+ "type": "block",
+ "name": "block: atomic",
+ "xml": "<block atomic=\"true\">\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1212.031150817871,
+ "y": 670.3089017868042,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "c557a49c.3881b8"
+ ]
+ ]
+ },
+ {
+ "id": "c557a49c.3881b8",
+ "type": "switchNode",
+ "name": "switch cr length",
+ "xml": "<switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1399.8885307312012,
+ "y": 670.9280371665955,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "3936a0.d4fa496"
+ ]
+ ]
+ },
+ {
+ "id": "3936a0.d4fa496",
+ "type": "other",
+ "name": "outcome 1",
+ "xml": "<outcome value='1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1599.2216529846191,
+ "y": 670.9281158447266,
+ "z": "5611e7fd.31c9b8",
+ "wires": [
+ [
+ "bd6696ff.0a7a78"
+ ]
+ ]
+ }
+] \ No newline at end of file