summaryrefslogtreecommitdiffstats
path: root/platform-logic
diff options
context:
space:
mode:
authorFranklin Dsilva <franklin.dsilva@us.fujitsu.com>2020-03-18 12:00:30 +0000
committerDan Timoney <dtimoney@att.com>2020-03-19 15:22:06 -0400
commitc84a2dfd4b8f935909eccac4ba18848e6b37d169 (patch)
tree5973677c9d1644e3b2951155652d847d144f665e /platform-logic
parent9c4b183ea6d26098d64579465e781c78696ac397 (diff)
TAPI and MSA create and delete
service changes Change-Id: I06e25b82112afbe079be2ceda7aa5f6f81a39b97 Issue-ID: SDNC-928 Signed-off-by: Franklin Dsilva <franklin.dsilva@us.fujitsu.com> Former-commit-id: 8edfd9a358adbfab55e846b81f1cfc35816824a3
Diffstat (limited to 'platform-logic')
-rw-r--r--platform-logic/optical-service/src/main/json/optical-service_main-create.json367
-rw-r--r--platform-logic/optical-service/src/main/json/optical-service_optical-service-delete.json1425
-rw-r--r--platform-logic/optical-service/src/main/json/optical-service_service-delete-msa.json365
-rw-r--r--platform-logic/optical-service/src/main/json/optical-service_service-delete-tapi.json26
-rw-r--r--platform-logic/optical-service/src/main/resources/graph.versions3
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_main-create.xml71
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml324
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml89
-rw-r--r--platform-logic/optical-service/src/main/xml/optical-service_service-delete-tapi.xml8
9 files changed, 2333 insertions, 345 deletions
diff --git a/platform-logic/optical-service/src/main/json/optical-service_main-create.json b/platform-logic/optical-service/src/main/json/optical-service_main-create.json
new file mode 100644
index 00000000..a4a40e3a
--- /dev/null
+++ b/platform-logic/optical-service/src/main/json/optical-service_main-create.json
@@ -0,0 +1,367 @@
+[
+ {
+ "id": "65bbf2ea.e8f944",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 286.8833312988281,
+ "y": 269,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "1593715.ae96a8f"
+ ]
+ ]
+ },
+ {
+ "id": "f336edeb.74ce6",
+ "type": "method",
+ "name": "method",
+ "xml": "<method rpc='main-create' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 285.8833312988281,
+ "y": 344,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "14882330.8313b5"
+ ]
+ ]
+ },
+ {
+ "id": "1593715.ae96a8f",
+ "type": "service-logic",
+ "name": "optical-service ${project.version}",
+ "module": "optical-service",
+ "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='optical-service' version='${project.version}'>",
+ "outputs": 1,
+ "x": 504.3833312988281,
+ "y": 252,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "f336edeb.74ce6"
+ ]
+ ]
+ },
+ {
+ "id": "14882330.8313b5",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 461.8833312988281,
+ "y": 357,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "994bfa4.9799188",
+ "c4d3d388.dc35a",
+ "204f0598.3ac182",
+ "2d636d44.e5a0fa",
+ "2c72a67.f372ada",
+ "79455985.47e29",
+ "887cbe59.b1784",
+ "4f44de12.e7fb18"
+ ]
+ ]
+ },
+ {
+ "id": "c4d3d388.dc35a",
+ "type": "switchNode",
+ "name": "switch : domain-type",
+ "xml": "<switch test='`$domain-type`'>\n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 339.3833312988281,
+ "y": 670,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "77b74d5.6495a34",
+ "7bd5cfea.c1ac2"
+ ]
+ ]
+ },
+ {
+ "id": "77b74d5.6495a34",
+ "type": "outcome",
+ "name": "MSA",
+ "xml": "<outcome value='MSA'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 641.8833312988281,
+ "y": 640,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "70f7a20a.befe0c"
+ ]
+ ]
+ },
+ {
+ "id": "7bd5cfea.c1ac2",
+ "type": "outcome",
+ "name": "TAPI",
+ "xml": "<outcome value='TAPI'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 637.8833312988281,
+ "y": 749,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "9b03001b.004b98"
+ ]
+ ]
+ },
+ {
+ "id": "994bfa4.9799188",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n<parameter name='fileName' value='/opt/onap/sdnc/data/properties/optical-service-dg.properties' />\n<parameter name='contextPrefix' value='prop' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 854.88330078125,
+ "y": 181,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "70f7a20a.befe0c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 829.8833312988281,
+ "y": 641,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "5fc1c8dc.a583e8"
+ ]
+ ]
+ },
+ {
+ "id": "9b03001b.004b98",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 822.8833312988281,
+ "y": 754,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "b46560fc.9378b8"
+ ]
+ ]
+ },
+ {
+ "id": "204f0598.3ac182",
+ "type": "call",
+ "name": "call validate-input-parameters",
+ "xml": "<call module='optical-service' rpc='optical-validate-input-params' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 911.88330078125,
+ "y": 136,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b46560fc.9378b8",
+ "type": "call",
+ "name": "call TAPI DG",
+ "xml": "<call module='optical-service' rpc='service-create-tapi' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1018.8833618164062,
+ "y": 760,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "5fc1c8dc.a583e8",
+ "type": "call",
+ "name": "call MSA DG",
+ "xml": "<call module='optical-service' rpc='service-create-msa' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1048.88330078125,
+ "y": 641,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2d636d44.e5a0fa",
+ "type": "get-resource",
+ "name": "get resources from DB -controller_id",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT controller_id\nfrom TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE\nWHERE interface_name = $optical-service-create-input.payload.service-aend.port-id'\npfx='controllerid'>\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 871.88330078125,
+ "y": 257,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "33031f70.c9e2f"
+ ]
+ ]
+ },
+ {
+ "id": "2c72a67.f372ada",
+ "type": "execute",
+ "name": "split node-id a-end retrieved from DB",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$controller-id`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 871.88330078125,
+ "y": 308,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "33031f70.c9e2f",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1107.88330078125,
+ "y": 255,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "6316e11e.6a8a8"
+ ]
+ ]
+ },
+ {
+ "id": "6316e11e.6a8a8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='controller-id' value='`$controllerid.controller-id`' />\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 1250.88330078125,
+ "y": 257,
+ "z": "30ae7182.add8b6",
+ "wires": []
+ },
+ {
+ "id": "79455985.47e29",
+ "type": "set",
+ "name": "set controller-ip",
+ "xml": "<set>\n<parameter name='controller-ip' value='`$param-prefix[1]`' />\n<parameter name='domain-type' value='`$param-prefix[0]`' />\n \n",
+ "comments": "",
+ "x": 815.88330078125,
+ "y": 370,
+ "z": "30ae7182.add8b6",
+ "wires": []
+ },
+ {
+ "id": "887cbe59.b1784",
+ "type": "get-resource",
+ "name": "get-resource",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT *\nfrom TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE\nWHERE interface_name = $optical-service-create-input.payload.service-aend.port-id'\npfx='db-aend'>\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 693.88330078125,
+ "y": 424,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "1d791c96.d1da33"
+ ]
+ ]
+ },
+ {
+ "id": "4f44de12.e7fb18",
+ "type": "get-resource",
+ "name": "get-resource",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT *\nfrom TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE\nWHERE interface_name = $optical-service-create-input.payload.service-zend.port-id'\npfx='db-zend'>\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 679.88330078125,
+ "y": 487,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "ef8516e4.6c5f7"
+ ]
+ ]
+ },
+ {
+ "id": "1d791c96.d1da33",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 877.88330078125,
+ "y": 426,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "c56f5bdc.a7e378"
+ ]
+ ]
+ },
+ {
+ "id": "c56f5bdc.a7e378",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='aend-nodeid' value='`$db-aend.pnf-id`' />\n<parameter name='a-end-pnf-name' value='`$db-aend.pnf-name`' />\n<parameter name='aend-clli' value='`$db-aend.clli`' />\n\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 1044.88330078125,
+ "y": 425,
+ "z": "30ae7182.add8b6",
+ "wires": []
+ },
+ {
+ "id": "ef8516e4.6c5f7",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 876.88330078125,
+ "y": 491,
+ "z": "30ae7182.add8b6",
+ "wires": [
+ [
+ "3ea4fdfa.d7bd4a"
+ ]
+ ]
+ },
+ {
+ "id": "3ea4fdfa.d7bd4a",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='zend-nodeid' value='`$db-zend.pnf-id`' />\n<parameter name='z-end-pnf-name' value='`$db-zend.pnf-name`' />\n<parameter name='zend-clli' value='`$db-zend.clli`' />\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 1044.88330078125,
+ "y": 492,
+ "z": "30ae7182.add8b6",
+ "wires": []
+ }
+] \ No newline at end of file
diff --git a/platform-logic/optical-service/src/main/json/optical-service_optical-service-delete.json b/platform-logic/optical-service/src/main/json/optical-service_optical-service-delete.json
index 270a3cf9..fbb368bf 100644
--- a/platform-logic/optical-service/src/main/json/optical-service_optical-service-delete.json
+++ b/platform-logic/optical-service/src/main/json/optical-service_optical-service-delete.json
@@ -1,20 +1,20 @@
[
{
- "id": "7d351c38.c4c6cc",
+ "id": "b65cdeae.8f7b08",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
- "x": 146,
- "y": 70,
- "z": "7b1b071a.92faa",
+ "x": 129,
+ "y": 129.88333129882812,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "6c3e5cdb.13fe9c"
+ "644f31e7.7234b8"
]
]
},
{
- "id": "6c3e5cdb.13fe9c",
+ "id": "644f31e7.7234b8",
"type": "service-logic",
"name": "optical-service ${project.version}",
"module": "optical-service",
@@ -22,515 +22,1454 @@
"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='optical-service' version='${project.version}'>",
"outputs": 1,
- "x": 254.5,
- "y": 148,
- "z": "7b1b071a.92faa",
+ "x": 237.5,
+ "y": 207.88333129882812,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "c9af40a8.771678"
+ "168fe70c.0f8c41"
]
]
},
{
- "id": "c9af40a8.771678",
+ "id": "168fe70c.0f8c41",
"type": "method",
"name": "method",
"xml": "<method rpc='optical-service-delete' mode='sync'>\n",
"comments": "",
"outputs": 1,
- "x": 123,
- "y": 239,
- "z": "7b1b071a.92faa",
+ "x": 106,
+ "y": 298.8833312988281,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "487722a8.b389a4"
+ "cfd0169c.a3cee"
]
]
},
{
- "id": "487722a8.b389a4",
+ "id": "cfd0169c.a3cee",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic='true'>",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 309,
- "y": 235,
- "z": "7b1b071a.92faa",
+ "x": 292,
+ "y": 294.8833312988281,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "a1fed560.31e7a8",
- "4b9bbd62.4750fc",
- "eac944ef.f83328",
- "b567b7de.be2de8",
- "c0977e42.e4156"
+ "30cb33e3.b12a94",
+ "2e82bc92.4b93a4",
+ "5e98d3f6.94968c",
+ "cf17dc19.012ac",
+ "d4ebf687.1cccd8",
+ "cbe18d30.3b4198",
+ "840d7865.dda6b"
]
]
},
{
- "id": "bfd79d0e.9f7ee8",
+ "id": "30cb33e3.b12a94",
"type": "execute",
- "name": "Call MSA Controller",
- "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/optical-service-delete-msa.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$controller-ip + '/cxf/openroadm/openroadm-services/' + $optical-service-delete-input.payload.service-name`\"/>\n<parameter name='restapiUser' value='admin' />\n<parameter name='restapiPassword' value='admin' />\n<parameter name=\"httpMethod\" value=\"DELETE\"/>\n<parameter name=\"responsePrefix\" value=\"service-delete-response\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='format' value='json' />\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.msa.jks\"/> \n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/> \n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n\n\n\n\n\n",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n<parameter name='fileName' value='/opt/onap/sdnc/data/properties/optical-service-dg.properties' />\n<parameter name='contextPrefix' value='prop' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 574.9999694824219,
+ "y": 20,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2e82bc92.4b93a4",
+ "type": "get-resource",
+ "name": "get resources from DB -controller_id",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT *\nfrom REQUEST_DETAILS\nWHERE request_id = $optical-service-delete-input.request-id'\npfx='detail-db'>",
"comments": "",
"outputs": 1,
- "x": 700,
- "y": 326,
- "z": "7b1b071a.92faa",
+ "x": 640.9999389648438,
+ "y": 71.8833236694336,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "582ceeba.7fcce",
- "867ca716.d4515"
+ "78b1b9eb.f0f1a8"
]
]
},
{
- "id": "a1fed560.31e7a8",
+ "id": "78b1b9eb.f0f1a8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 881,
+ "y": 68.8833236694336,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "b1511a3a.314df"
+ ]
+ ]
+ },
+ {
+ "id": "b1511a3a.314df",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='domain-req' value='`$detail-db.domain-requests`' />\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 1046,
+ "y": 67.8833236694336,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "5e98d3f6.94968c",
+ "type": "set",
+ "name": "set domain-services",
+ "xml": "<set>\n<parameter name='notification-url' value=\"http://167.254.204.152:31817/asyncNotification\" />\n<parameter name='domain-service1' value='`$param-prefix1[0]`' />\n<parameter name='domain-service2' value='`$param-prefix1[1]`' />",
+ "comments": "",
+ "x": 589.9999389648438,
+ "y": 165.88333129882812,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "cf17dc19.012ac",
"type": "execute",
- "name": "execute",
- "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n<parameter name='fileName' value='/opt/onap/sdnc/data/properties/optical-service-dg.properties' />\n<parameter name='contextPrefix' value='prop' />\n",
+ "name": "split domain-requests for access services",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$domain-req`'/>\n<parameter name=\"regex\" value=\",\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix1\"/>\n",
"comments": "",
"outputs": 1,
- "x": 553,
- "y": 36,
- "z": "7b1b071a.92faa",
+ "x": 651.1166381835938,
+ "y": 115.99999237060547,
+ "z": "e2f7091c.1492b8",
"wires": [
[]
]
},
{
- "id": "582ceeba.7fcce",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
+ "id": "d4ebf687.1cccd8",
+ "type": "for",
+ "name": "for",
+ "xml": "<for index='ppx' start='0' end='`$param-prefix1_length`' >\n \n \n \n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 544,
+ "y": 289,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "91896047.66eb7"
+ ]
+ ]
+ },
+ {
+ "id": "91896047.66eb7",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$param-prefix1_length`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 698,
+ "y": 287,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "2c37340b.4002cc",
+ "7784419a.212fa"
+ ]
+ ]
+ },
+ {
+ "id": "2c37340b.4002cc",
+ "type": "outcome",
+ "name": "1",
+ "xml": "<outcome value='1'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 881,
+ "y": 281,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "be5c1afb.f2037"
+ ]
+ ]
+ },
+ {
+ "id": "be5c1afb.f2037",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1050,
+ "y": 281,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "7f6fcc65.18cb7c",
+ "3a1a70c6.408b8",
+ "795303c1.2dac44",
+ "3ab986c7.09e812"
+ ]
+ ]
+ },
+ {
+ "id": "7784419a.212fa",
+ "type": "outcome",
+ "name": "2",
+ "xml": "<outcome value='2'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 631,
+ "y": 718,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "e41aac03.bbaa5"
+ ]
+ ]
+ },
+ {
+ "id": "3a1a70c6.408b8",
+ "type": "execute",
+ "name": "split node-id a-end retrieved from DB",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$controller-id1`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1322,
+ "y": 286,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7f6fcc65.18cb7c",
+ "type": "get-resource",
+ "name": "get resources from DB -controller_id",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT controller_id\nfrom REQUEST_DETAILS\nWHERE request_id = $domain-service1'\npfx='detail-db1'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1326.11669921875,
+ "y": 246.11666870117188,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "e2726a7c.0cf32"
+ ]
+ ]
+ },
+ {
+ "id": "e2726a7c.0cf32",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1571.11669921875,
+ "y": 245.11666870117188,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "70e7b1a6.2a20f"
+ ]
+ ]
+ },
+ {
+ "id": "70e7b1a6.2a20f",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='controller-id1' value='`$detail-db1.controller-id`' />\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 1719.11669921875,
+ "y": 247.11666870117188,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "795303c1.2dac44",
+ "type": "set",
+ "name": "set domain-services",
+ "xml": "<set>\n<parameter name='domain-type' value='`$param-prefix[0]`' />\n<parameter name='controller-ip' value='`$param-prefix[1]`' />\n<parameter name='optical-service-delete-input.request-id' value=\"`$domain-service1`\" />\n<parameter name='optical-service-delete-input.payload.service-name' value=\"`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN'`\"/>",
+ "comments": "",
+ "x": 1274.11669921875,
+ "y": 358.1166687011719,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "3ab986c7.09e812",
+ "type": "switchNode",
+ "name": "switch domain-type",
+ "xml": "<switch test='`$domain-type`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1263,
+ "y": 493,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "e04cd56f.45dfc8",
+ "2fc7713.599bf0e"
+ ]
+ ]
+ },
+ {
+ "id": "e04cd56f.45dfc8",
+ "type": "outcome",
+ "name": "MSA",
+ "xml": "<outcome value='MSA'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1466,
+ "y": 404,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "5962de98.7a93e8"
+ ]
+ ]
+ },
+ {
+ "id": "2fc7713.599bf0e",
+ "type": "outcome",
+ "name": "TAPI",
+ "xml": "<outcome value='TAPI'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1469,
+ "y": 584,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "c51e88be.9e544"
+ ]
+ ]
+ },
+ {
+ "id": "5962de98.7a93e8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
"comments": "",
"outputs": 1,
- "x": 894,
- "y": 306,
- "z": "7b1b071a.92faa",
+ "x": 1606,
+ "y": 401,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "c3bd28c6.e626b"
+ "314acdb7.afb7da"
]
]
},
{
- "id": "867ca716.d4515",
+ "id": "314acdb7.afb7da",
+ "type": "call",
+ "name": "call MSA DELETE DG",
+ "xml": "<call module='optical-service' rpc='service-delete-msa' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1794,
+ "y": 402,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "af9224a8.a9533",
+ "3e7bdf94.045928"
+ ]
+ ]
+ },
+ {
+ "id": "af9224a8.a9533",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 869,
- "y": 410,
- "z": "7b1b071a.92faa",
+ "x": 1979,
+ "y": 358,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "791a6dc2.40ab1c"
+ "bbe67c9b.ae8e2"
]
]
},
{
- "id": "c3bd28c6.e626b",
+ "id": "3e7bdf94.045928",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1981,
+ "y": 450,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "449903c8.0a6724"
+ ]
+ ]
+ },
+ {
+ "id": "bbe67c9b.ae8e2",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic='true'>",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 1053,
- "y": 301,
- "z": "7b1b071a.92faa",
+ "x": 2150,
+ "y": 349,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "caa7c35f.0456c8"
+ "3a0958a9.5973c8"
]
]
},
{
- "id": "caa7c35f.0456c8",
+ "id": "3a0958a9.5973c8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='service1-status' value='`$final-response-code`' />\n",
+ "comments": "",
+ "x": 2293,
+ "y": 324,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "449903c8.0a6724",
"type": "returnFailure",
"name": "return failure",
- "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Error deleting the Service' />\n",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to call MSA DG' />\n<parameter name='ack-final-indicator' value=\"Y\" />",
"comments": "",
- "x": 1285,
- "y": 245,
- "z": "7b1b071a.92faa",
+ "x": 2150,
+ "y": 480,
+ "z": "e2f7091c.1492b8",
"wires": []
},
{
- "id": "2041d7aa.c3ae1",
+ "id": "c51e88be.9e544",
"type": "block",
- "name": "block : atomic",
- "xml": "<block atomic='true'>",
- "atomic": "true",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1424,
- "y": 549,
- "z": "7b1b071a.92faa",
+ "x": 1625,
+ "y": 586,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "27f66eb0.3c9aaa",
- "e6dae4f7.8c52b",
- "276e2c67.21f3ec",
- "126b611e.fd67af",
- "881b58f7.fb4a6"
+ "a271ced2.6952d8"
]
]
},
{
- "id": "27f66eb0.3c9aaa",
- "type": "record",
- "name": "record",
- "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/optical-service-create.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Inside controller\"/>\n\n",
+ "id": "a271ced2.6952d8",
+ "type": "call",
+ "name": "call TAPI DELETE DG",
+ "xml": "<call module='optical-service' rpc='service-delete-tapi' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1639,
- "y": 464,
- "z": "7b1b071a.92faa",
+ "x": 1813,
+ "y": 587,
+ "z": "e2f7091c.1492b8",
"wires": [
- []
+ [
+ "3ea9b0c9.5ce928",
+ "3153866d.fe9922"
+ ]
]
},
{
- "id": "e6dae4f7.8c52b",
- "type": "save",
- "name": "Update status in DB",
- "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \nresource='SQL' \nkey='UPDATE REQUEST_DETAILS SET status = \"DELETING\" WHERE request_id = $optical-service-delete-input.request-id' \nforce='true' pfx='save-result'>\n\n\n\n\n\n\n\n\n\n",
+ "id": "3ea9b0c9.5ce928",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 1641,
- "y": 550,
- "z": "7b1b071a.92faa",
+ "x": 1998,
+ "y": 543,
+ "z": "e2f7091c.1492b8",
"wires": [
- []
+ [
+ "4e515097.338e48"
+ ]
]
},
{
- "id": "276e2c67.21f3ec",
- "type": "get-resource",
- "name": "get-resource",
- "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL' \nkey='SELECT *\nfrom REQUEST_DETAILS \nWHERE request_id = $optical-service-delete-input.request-id'\npfx='db.request-details'>\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n",
+ "id": "3153866d.fe9922",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
- "x": 1637,
- "y": 626,
- "z": "7b1b071a.92faa",
+ "x": 2000,
+ "y": 635,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "ccbf1f5f.52d948"
+ "e7c2b606.d88798"
]
]
},
{
- "id": "cdc717d5.1094b8",
- "type": "record",
- "name": "record",
- "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/optical-service-create.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Successfully sent the request\"/>\n\n",
+ "id": "4e515097.338e48",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1238,
- "y": 332,
- "z": "7b1b071a.92faa",
+ "x": 2169,
+ "y": 534,
+ "z": "e2f7091c.1492b8",
"wires": [
- []
+ [
+ "128c0365.4d99ed",
+ "99a0a090.74b4e8"
+ ]
]
},
{
- "id": "791a6dc2.40ab1c",
- "type": "block",
- "name": "block : atomic",
- "xml": "<block atomic='true'>",
- "atomic": "true",
+ "id": "128c0365.4d99ed",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='service1-status' value='`$final-response-code`' />\n",
+ "comments": "",
+ "x": 2312,
+ "y": 509,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "e7c2b606.d88798",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to call MSA DG' />\n<parameter name='ack-final-indicator' value=\"Y\" />",
+ "comments": "",
+ "x": 2169,
+ "y": 665,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "71b9114.072a4f",
+ "type": "call",
+ "name": "call TAPI DELETE DG",
+ "xml": "<call module='optical-service' rpc='service-delete-tapi' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 1036,
- "y": 413,
- "z": "7b1b071a.92faa",
+ "x": 1315,
+ "y": 891,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "cdc717d5.1094b8",
- "d4fa1dc0.5c15a8"
+ "1978613e.4073f7",
+ "2736e495.752c04"
]
]
},
{
- "id": "d4fa1dc0.5c15a8",
+ "id": "63600e7b.0d9eb8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='optical-service-delete-input.request-id' value=\"`$domain-service1`\" />\n<parameter name='optical-service-delete-input.payload.service-name' value=\"`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN-TAPI-1'`\"/>\n<parameter name='domain-type' value='`$domain1[0]`' />\n<parameter name='controller-ip' value='`$domain1[1]`' />\n",
+ "comments": "",
+ "x": 1296.11669921875,
+ "y": 815.1167602539062,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "e41aac03.bbaa5",
"type": "switchNode",
"name": "switch",
- "xml": "<switch test='`$service-delete-response.configuration-response-common.response-code`'>\n",
+ "xml": "<switch test='`$ppx`'>\n",
"comments": "",
"outputs": 1,
- "x": 1221,
- "y": 410,
- "z": "7b1b071a.92faa",
+ "x": 771.1167602539062,
+ "y": 723.11669921875,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "bbeca38a.ba0cc",
- "86f8972f.01b4c8"
+ "bc61c8e0.999178",
+ "d5fffe4f.796c18"
]
]
},
{
- "id": "bbeca38a.ba0cc",
+ "id": "bc61c8e0.999178",
"type": "outcome",
- "name": "200 success",
- "xml": "<outcome value='200'>\n",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
"comments": "",
"outputs": 1,
- "x": 1409,
- "y": 416,
- "z": "7b1b071a.92faa",
+ "x": 951.1167602539062,
+ "y": 723.11669921875,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "2041d7aa.c3ae1"
+ "b7c6609b.2477c8"
]
]
},
{
- "id": "86f8972f.01b4c8",
- "type": "other",
- "name": "other",
- "xml": "<outcome value='Other'>\n",
+ "id": "d5fffe4f.796c18",
+ "type": "outcome",
+ "name": "1",
+ "xml": "<outcome value='1'>\n",
"comments": "",
"outputs": 1,
- "x": 1395,
- "y": 295,
- "z": "7b1b071a.92faa",
+ "x": 899.1167602539062,
+ "y": 1097.11669921875,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "8b978b7.90f6978"
+ "a2b3475f.c55ff"
]
]
},
{
- "id": "8b978b7.90f6978",
- "type": "returnFailure",
- "name": "return failure",
- "xml": "<return status='failure'>\n<parameter name='error-code' value='`$service-delete-response.configuration-response-common.response-code`' />\n<parameter name='error-message' value='`$service-delete-response.configuration-response-common.response-message`' />\n",
+ "id": "ab6f8311.54637",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='optical-service-delete-input.request-id' value=\"`$domain-service2`\" />\n<parameter name='optical-service-delete-input.payload.service-name' value=\"`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN-TAPI-2'`\"/>\n<parameter name='domain-type' value='`$domain2[0]`' />\n<parameter name='controller-ip' value='`$domain2[1]`' />\n\n\n",
"comments": "",
- "x": 1582,
- "y": 294,
- "z": "7b1b071a.92faa",
+ "x": 1294.11669921875,
+ "y": 1170.11669921875,
+ "z": "e2f7091c.1492b8",
"wires": []
},
{
- "id": "ccbf1f5f.52d948",
+ "id": "fc3b2634.80fb1",
+ "type": "call",
+ "name": "call TAPI DELETE DG",
+ "xml": "<call module='optical-service' rpc='service-delete-tapi' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1301.11669921875,
+ "y": 1243.11669921875,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "d0a61851.774d7",
+ "67e5500f.2b88c8"
+ ]
+ ]
+ },
+ {
+ "id": "b7c6609b.2477c8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1091.11669921875,
+ "y": 724.11669921875,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "63600e7b.0d9eb8",
+ "71b9114.072a4f",
+ "fb442d76.8c0b1",
+ "e8836a64.f81ae"
+ ]
+ ]
+ },
+ {
+ "id": "a2b3475f.c55ff",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.1167602539062,
+ "y": 1106.11669921875,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "ab6f8311.54637",
+ "fc3b2634.80fb1",
+ "4d169812.58b88",
+ "8f4e881d.558318"
+ ]
+ ]
+ },
+ {
+ "id": "1978613e.4073f7",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 1847,
- "y": 621,
- "z": "7b1b071a.92faa",
+ "x": 1576,
+ "y": 844,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "ae1d75fe.230f18"
+ "b4b3ae50.b80768"
]
]
},
{
- "id": "ae1d75fe.230f18",
- "type": "set",
- "name": "set",
- "xml": "<set>\n<parameter name='instance-id' value='`$db.request-details.service-instance-id`' />\n<parameter name='customer-id' value='`$db.request-details.global-customer-id`' />\n<parameter name='service-id' value='`$db.request-details.service-type`' />\n\n\n\n\n\n\n\n\n\n\n\n\n",
+ "id": "2736e495.752c04",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
"comments": "",
- "x": 1986,
- "y": 622,
- "z": "7b1b071a.92faa",
- "wires": []
+ "outputs": 1,
+ "x": 1560,
+ "y": 973,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "ecbd8135.fa342"
+ ]
+ ]
},
{
- "id": "126b611e.fd67af",
- "type": "update",
- "name": "update resource status- DELETING in AAI",
- "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' \nforce='true' \nresource='service-instance' \nkey = 'customer.global-customer-id = $customer-id AND\n service-subscription.service-type = $service-id AND\n service-instance.service-instance-id = $instance-id'\nlocal-only='false'>\n <parameter name='orchestration-status' value='DELETING' />\n\n \n \n \n\n",
+ "id": "b4b3ae50.b80768",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1730,
- "y": 714,
- "z": "7b1b071a.92faa",
+ "x": 1732,
+ "y": 851,
+ "z": "e2f7091c.1492b8",
"wires": [
- []
+ [
+ "e387ae63.768b78",
+ "6a4932f.f7508cc"
+ ]
]
},
{
- "id": "881b58f7.fb4a6",
- "type": "returnSuccess",
- "name": "return success",
- "xml": "<return status='success'>\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"Service Deletion in Progress\" />\n<parameter name='ack-final-indicator' value='N' />",
+ "id": "e387ae63.768b78",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='service1-status' value='`$final-response-code`' />\n",
"comments": "",
- "x": 1619,
- "y": 810,
- "z": "7b1b071a.92faa",
+ "x": 1898.9998779296875,
+ "y": 764,
+ "z": "e2f7091c.1492b8",
"wires": []
},
{
- "id": "4b9bbd62.4750fc",
- "type": "get-resource",
- "name": "get resources from DB -controller_id",
- "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT controller_id\nfrom REQUEST_DETAILS\nWHERE request_id = $optical-service-delete-input.request-id'\npfx='controllerid'>",
+ "id": "6a4932f.f7508cc",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$service1-status == 200`'>\n",
"comments": "",
"outputs": 1,
- "x": 665,
- "y": 109,
- "z": "7b1b071a.92faa",
+ "x": 1887.9998779296875,
+ "y": 881,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "3249f019.f6152"
+ "f2ab530d.5d599",
+ "7ea5454b.c5d99c"
]
]
},
{
- "id": "eac944ef.f83328",
- "type": "execute",
- "name": "split node-id a-end retrieved from DB",
- "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$controller-id`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",
+ "id": "f2ab530d.5d599",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
"comments": "",
"outputs": 1,
- "x": 646,
- "y": 168,
- "z": "7b1b071a.92faa",
+ "x": 2029.9998779296875,
+ "y": 811,
+ "z": "e2f7091c.1492b8",
"wires": [
- []
+ [
+ "896e220.db3996"
+ ]
]
},
{
- "id": "3249f019.f6152",
+ "id": "7ea5454b.c5d99c",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2031,
+ "y": 929,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "251983ac.1c994c"
+ ]
+ ]
+ },
+ {
+ "id": "896e220.db3996",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='service1' value='success' />\n",
+ "comments": "",
+ "x": 2185,
+ "y": 817,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "251983ac.1c994c",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='service1' value='failure' />\n",
+ "comments": "",
+ "x": 2198,
+ "y": 927,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "ecbd8135.fa342",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Main Delete Dg not available' />\n<parameter name='ack-final-indicator' value=\"Y\" />",
+ "comments": "",
+ "x": 1732,
+ "y": 974,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "d0a61851.774d7",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 892,
- "y": 104,
- "z": "7b1b071a.92faa",
+ "x": 1543,
+ "y": 1167,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "7ee5420a.dabadc"
+ ]
+ ]
+ },
+ {
+ "id": "67e5500f.2b88c8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1550,
+ "y": 1306,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "dec65b83.66c9b"
+ ]
+ ]
+ },
+ {
+ "id": "7ee5420a.dabadc",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1698,
+ "y": 1175,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "11571d88.b80ba2",
+ "8e369286.a24f1"
+ ]
+ ]
+ },
+ {
+ "id": "11571d88.b80ba2",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='service2-status' value='`$final-response-code`' />\n",
+ "comments": "",
+ "x": 1894,
+ "y": 1090,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "8e369286.a24f1",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$service2-status == 200`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1875,
+ "y": 1215,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "cc783b3b.8e16b"
+ "bc9b1c9e.2d7528",
+ "6e8a106a.b8a098"
]
]
},
{
- "id": "cc783b3b.8e16b",
+ "id": "bc9b1c9e.2d7528",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2037,
+ "y": 1140,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "88261b09.8da33"
+ ]
+ ]
+ },
+ {
+ "id": "6e8a106a.b8a098",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2043,
+ "y": 1262,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "e617e321.5b485"
+ ]
+ ]
+ },
+ {
+ "id": "88261b09.8da33",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='service2' value='success' />\n",
+ "comments": "",
+ "x": 2192,
+ "y": 1143,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "e617e321.5b485",
"type": "set",
"name": "set",
- "xml": "<set>\n<parameter name='controller-id' value='`$controllerid.controller-id`' />\n\n\n\n\n\n\n\n\n\n\n",
+ "xml": "<set>\n<parameter name='service2' value='failure' />\n",
"comments": "",
- "x": 1083,
- "y": 106,
- "z": "7b1b071a.92faa",
+ "x": 2205,
+ "y": 1265,
+ "z": "e2f7091c.1492b8",
"wires": []
},
{
- "id": "b567b7de.be2de8",
+ "id": "dec65b83.66c9b",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Main Delete Dg not available' />\n<parameter name='ack-final-indicator' value=\"Y\" />",
+ "comments": "",
+ "x": 1751,
+ "y": 1306,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "cbe18d30.3b4198",
"type": "set",
- "name": "set controller-ip",
- "xml": "<set>\n<parameter name='controller-ip' value='`$param-prefix[1]`' />\n<parameter name='domain-type' value='`$param-prefix[0]`' />\n<parameter name='notification-url' value=\"`$prop.controller.url + '/' + $prop.sdnc.async.url`\" />\n",
+ "name": "set",
+ "xml": "<set>\n<parameter name='access-id' value=\"`$optical-service-delete-input.request-id`\" />\n\n",
"comments": "",
- "x": 593,
- "y": 223,
- "z": "7b1b071a.92faa",
+ "x": 548.8999938964844,
+ "y": 211.85000610351562,
+ "z": "e2f7091c.1492b8",
"wires": []
},
{
- "id": "c0977e42.e4156",
+ "id": "99a0a090.74b4e8",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/service-delete-tapi.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"`$service1-status`\"/>\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2306.85009765625,
+ "y": 583.8499755859375,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "840d7865.dda6b",
"type": "switchNode",
- "name": "switch domain-type",
- "xml": "<switch test='`$domain-type`'>\n",
+ "name": "switch",
+ "xml": "<switch test='`$ppx`'>\n",
"comments": "",
"outputs": 1,
- "x": 188,
- "y": 324,
- "z": "7b1b071a.92faa",
+ "x": 362.20001220703125,
+ "y": 1446.64990234375,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "1f20cc0f.cf39ec",
- "fe8682d2.0d3618"
+ "35bc7c0e.531f0c",
+ "647592de.7dc3ec"
]
]
},
{
- "id": "1f20cc0f.cf39ec",
+ "id": "35bc7c0e.531f0c",
"type": "outcome",
- "name": "MSA",
- "xml": "<outcome value='MSA'>\n",
+ "name": "0",
+ "xml": "<outcome value='0'>\n",
"comments": "",
"outputs": 1,
- "x": 363,
- "y": 325,
- "z": "7b1b071a.92faa",
+ "x": 598.4000549316406,
+ "y": 1349.3999633789062,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "d9880526.733f4"
+ "362cac69.39ad1c"
]
]
},
{
- "id": "fe8682d2.0d3618",
+ "id": "647592de.7dc3ec",
"type": "outcome",
- "name": "TAPI",
- "xml": "<outcome value='TAPI'>\n",
+ "name": "1",
+ "xml": "<outcome value='1'>\n",
"comments": "",
"outputs": 1,
- "x": 324,
- "y": 428,
- "z": "7b1b071a.92faa",
+ "x": 589.4000549316406,
+ "y": 1522.39990234375,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "c4af063b.a8dc38"
+ "96d3d87a.161f98"
]
]
},
{
- "id": "d9880526.733f4",
+ "id": "362cac69.39ad1c",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 507,
- "y": 326,
- "z": "7b1b071a.92faa",
+ "x": 740.4000244140625,
+ "y": 1353.3999633789062,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "827658b9.c24fd"
+ ]
+ ]
+ },
+ {
+ "id": "827658b9.c24fd",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$service1-status`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 882.75,
+ "y": 1358.5999145507812,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "bfd79d0e.9f7ee8"
+ "30018cf9.344a24",
+ "7de52130.2c5fc"
]
]
},
{
- "id": "c4af063b.a8dc38",
+ "id": "f7b9ef6.7932f9",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 475,
- "y": 421,
- "z": "7b1b071a.92faa",
+ "x": 1217.75,
+ "y": 1300.7999877929688,
+ "z": "e2f7091c.1492b8",
"wires": [
[
- "5c1ca252.745f4c"
+ "2fd5efbb.db2cd8",
+ "a5309500.d76bc"
]
]
},
{
- "id": "5c1ca252.745f4c",
- "type": "call",
- "name": "call TAPI DELETE DG",
- "xml": "<call module='optical-service' rpc='service-delete-tapi' mode='sync' >\n",
+ "id": "2fd5efbb.db2cd8",
+ "type": "delete",
+ "name": "delete",
+ "xml": "<delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n resource=\"SQL\"\n key=\"DELETE FROM REQUEST_DETAILS WHERE request_id = $access-id\"> ",
"comments": "",
"outputs": 1,
- "x": 643,
- "y": 524,
- "z": "7b1b071a.92faa",
+ "x": 1381.75,
+ "y": 1297.8001098632812,
+ "z": "e2f7091c.1492b8",
"wires": [
[]
]
+ },
+ {
+ "id": "a5309500.d76bc",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"Service Deleted Successfully\" />\n<parameter name='ack-final-indicator' value='Y' />",
+ "comments": "",
+ "x": 1423.75,
+ "y": 1481.8001098632812,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "30018cf9.344a24",
+ "type": "outcome",
+ "name": "200",
+ "xml": "<outcome value='200'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1056.199951171875,
+ "y": 1308.2499389648438,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "f7b9ef6.7932f9"
+ ]
+ ]
+ },
+ {
+ "id": "7de52130.2c5fc",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1033.199951171875,
+ "y": 1460.2499389648438,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "6461eb1d.8fedb4"
+ ]
+ ]
+ },
+ {
+ "id": "d7f1c2ce.8da74",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$service1-status == $service2-status == 200`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 857.75,
+ "y": 1529.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "d0c11e44.eff1b8",
+ "ebfe8068.c9971"
+ ]
+ ]
+ },
+ {
+ "id": "d0c11e44.eff1b8",
+ "type": "outcomeTrue",
+ "name": "true",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1015.75,
+ "y": 1538.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "505e7a53.be6c6c"
+ ]
+ ]
+ },
+ {
+ "id": "505e7a53.be6c6c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1155.75,
+ "y": 1545.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "2406e71c.d43e8",
+ "37282d8f.acde4a"
+ ]
+ ]
+ },
+ {
+ "id": "2406e71c.d43e8",
+ "type": "delete",
+ "name": "delete",
+ "xml": "<delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'\n resource=\"SQL\"\n key=\"DELETE FROM REQUEST_DETAILS WHERE request_id = $access-id\"> ",
+ "comments": "",
+ "outputs": 1,
+ "x": 1319.75,
+ "y": 1545.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ebfe8068.c9971",
+ "type": "outcomeFalse",
+ "name": "false",
+ "xml": "<outcome value='false'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1003.75,
+ "y": 1670.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "383c08d1.28a08"
+ ]
+ ]
+ },
+ {
+ "id": "383c08d1.28a08",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1147.75,
+ "y": 1683.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "495cad00.8d5f24"
+ ]
+ ]
+ },
+ {
+ "id": "495cad00.8d5f24",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Access service request entry cannot be deleted' />\n<parameter name='ack-final-indicator' value=\"Y\" />",
+ "comments": "",
+ "x": 1322.75,
+ "y": 1676.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "37282d8f.acde4a",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"Service Deleted Successfully\" />\n<parameter name='ack-final-indicator' value='Y' />",
+ "comments": "",
+ "x": 1337.75,
+ "y": 1626.599853515625,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "70ec6ec4.5ccf08",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Access service request entry cannot be deleted' />\n<parameter name='ack-final-indicator' value=\"Y\" />",
+ "comments": "",
+ "x": 1211.5,
+ "y": 1472.3998413085938,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "96d3d87a.161f98",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 736.4000244140625,
+ "y": 1523.39990234375,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "d7f1c2ce.8da74"
+ ]
+ ]
+ },
+ {
+ "id": "fb442d76.8c0b1",
+ "type": "get-resource",
+ "name": "get resources from DB -controller_id",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT controller_id\nfrom REQUEST_DETAILS\nWHERE request_id = $domain-service1'\npfx='detail-db11'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1377.6666259765625,
+ "y": 680.6666259765625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "84c6499.61865b8"
+ ]
+ ]
+ },
+ {
+ "id": "84c6499.61865b8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1623.6666259765625,
+ "y": 684.6666259765625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "4427d502.6c96cc"
+ ]
+ ]
+ },
+ {
+ "id": "4427d502.6c96cc",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='controller-id11' value='`$detail-db11.controller-id`' />\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 1791.6666259765625,
+ "y": 686.6666259765625,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "e8836a64.f81ae",
+ "type": "execute",
+ "name": "split node-id a-end retrieved from DB",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$controller-id11`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"domain1\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1398.6666259765625,
+ "y": 756.6666259765625,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4d169812.58b88",
+ "type": "get-resource",
+ "name": "get resources from DB -controller_id",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\nkey='SELECT controller_id\nfrom REQUEST_DETAILS\nWHERE request_id = $domain-service2'\npfx='detail-db22'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1324.6666259765625,
+ "y": 1056.666748046875,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "e0ea4817.5936a"
+ ]
+ ]
+ },
+ {
+ "id": "e0ea4817.5936a",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1569.6666259765625,
+ "y": 1060.666748046875,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "9748df16.f21cf8"
+ ]
+ ]
+ },
+ {
+ "id": "9748df16.f21cf8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='controller-id22' value='`$detail-db22.controller-id`' />\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 1718.6666259765625,
+ "y": 1064.666748046875,
+ "z": "e2f7091c.1492b8",
+ "wires": []
+ },
+ {
+ "id": "8f4e881d.558318",
+ "type": "execute",
+ "name": "split node-id a-end retrieved from DB",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$controller-id22`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"domain2\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1327.6666259765625,
+ "y": 1118.666748046875,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9e23ba6e.b8b718",
+ "type": "update",
+ "name": "update",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' \nforce='true'\nresource='logical-link'\nkey = 'pnf.pnf-name = $a-end-pnf-name\n AND p-interface.interface-name = $optical-service-create-input.payload.service-aend.port-id'\n local-only='false'>\n<parameter name='available-capacity' value='`$available-bandwidth-aend`' />\n\n\n\n<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link'\nkey='logical-link.link-name = $tmp.link-id' >\n <parameter name='link-name' value='`$tmp.link-id`' />\n <parameter name='link-type' value='`$link.link-type`' />\n <parameter name='in-maint' value='true' />\n <parameter name='speed-value' value='100' />\n <parameter name='speed-units' value='Gbps' />\n <parameter name='operational-status' value='`$link.administrative-state`' />\n <parameter name='available-capacity' value='100' />\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1418.6666717529297,
+ "y": 1385.6666717529297,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6461eb1d.8fedb4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1130.3333740234375,
+ "y": 1413.3331909179688,
+ "z": "e2f7091c.1492b8",
+ "wires": [
+ [
+ "70ec6ec4.5ccf08"
+ ]
+ ]
}
] \ No newline at end of file
diff --git a/platform-logic/optical-service/src/main/json/optical-service_service-delete-msa.json b/platform-logic/optical-service/src/main/json/optical-service_service-delete-msa.json
new file mode 100644
index 00000000..df94ddfb
--- /dev/null
+++ b/platform-logic/optical-service/src/main/json/optical-service_service-delete-msa.json
@@ -0,0 +1,365 @@
+[
+ {
+ "id": "53abb973.be3358",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 320.566650390625,
+ "y": 127.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "a8f6adda.0744"
+ ]
+ ]
+ },
+ {
+ "id": "a8f6adda.0744",
+ "type": "service-logic",
+ "name": "optical-service ${project.version}",
+ "module": "optical-service",
+ "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='optical-service' version='${project.version}'>",
+ "outputs": 1,
+ "x": 333.566650390625,
+ "y": 187.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "18e37cee.ceb953"
+ ]
+ ]
+ },
+ {
+ "id": "18e37cee.ceb953",
+ "type": "method",
+ "name": "method service-delete-msa-sync",
+ "xml": "<method rpc='service-delete-msa' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 353.566650390625,
+ "y": 267.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "64d96c24.58677c"
+ ]
+ ]
+ },
+ {
+ "id": "64d96c24.58677c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 601.066650390625,
+ "y": 267.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "d0c8eab9.2acb7",
+ "7e4b0c6a.d80e4c"
+ ]
+ ]
+ },
+ {
+ "id": "d0c8eab9.2acb7",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='optical-service-create-input.request-id' value=\"`$domain-service1`\" />\n<parameter name='optical-service-delete-input.payload.service-name' value=\"`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN-MSA'`\"/>\n",
+ "comments": "",
+ "x": 783.566650390625,
+ "y": 242.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": []
+ },
+ {
+ "id": "7e4b0c6a.d80e4c",
+ "type": "execute",
+ "name": "Call MSA Controller",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/optical-service-delete-msa.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$controller-ip + '/cxf/openroadm/openroadm-services/' + $optical-service-delete-input.payload.service-name`\"/>\n<parameter name='restapiUser' value='admin' />\n<parameter name='restapiPassword' value='admin' />\n<parameter name=\"httpMethod\" value=\"DELETE\"/>\n<parameter name=\"responsePrefix\" value=\"service-delete-response\"/>\n<parameter name='contentType' value='application/json' />\n<parameter name='format' value='json' />\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.msa.jks\"/> \n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/> \n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 781.566650390625,
+ "y": 344.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "e8374b35.9489e8",
+ "59601e7a.333fb8"
+ ]
+ ]
+ },
+ {
+ "id": "59601e7a.333fb8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 960.566650390625,
+ "y": 415.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "f7639000.8d09b"
+ ]
+ ]
+ },
+ {
+ "id": "e8374b35.9489e8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 957.566650390625,
+ "y": 301.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "44136677.41a668"
+ ]
+ ]
+ },
+ {
+ "id": "44136677.41a668",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1119.566650390625,
+ "y": 296.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "656a3cd0.5027ec"
+ ]
+ ]
+ },
+ {
+ "id": "f7639000.8d09b",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1133.566650390625,
+ "y": 418.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "6f5cb50c.47cb9c",
+ "61d2d42e.74ce34"
+ ]
+ ]
+ },
+ {
+ "id": "656a3cd0.5027ec",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Error deleting the Service' />\n",
+ "comments": "",
+ "x": 1287.566650390625,
+ "y": 293.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": []
+ },
+ {
+ "id": "6f5cb50c.47cb9c",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/optical-service-create.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Successfully sent the request\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1314.566650390625,
+ "y": 377.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "61d2d42e.74ce34",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$service-delete-response.configuration-response-common.response-code`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1307.566650390625,
+ "y": 468.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "6a32e2cb.011efc",
+ "126ef311.e5b135"
+ ]
+ ]
+ },
+ {
+ "id": "6a32e2cb.011efc",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1450.566650390625,
+ "y": 443.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "20f6b725.7d2e3"
+ ]
+ ]
+ },
+ {
+ "id": "20f6b725.7d2e3",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='`$service-delete-response.configuration-response-common.response-code`' />\n<parameter name='error-message' value='`$service-delete-response.configuration-response-common.response-message`' />\n",
+ "comments": "",
+ "x": 1647.566650390625,
+ "y": 441.56666564941406,
+ "z": "8588d9b2.517e38",
+ "wires": []
+ },
+ {
+ "id": "126ef311.e5b135",
+ "type": "outcome",
+ "name": "200",
+ "xml": "<outcome value='200'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1474.566650390625,
+ "y": 557.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "47d51f0e.38e19"
+ ]
+ ]
+ },
+ {
+ "id": "47d51f0e.38e19",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1638.566650390625,
+ "y": 552.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "b9afc35f.499458",
+ "f8b135a9.17c5d8",
+ "70aa5b37.57ec94",
+ "a77548a2.59db78",
+ "ba4b7b38.d871e"
+ ]
+ ]
+ },
+ {
+ "id": "b9afc35f.499458",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/optical-service-create.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Inside controller\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1810.566650390625,
+ "y": 520.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "f8b135a9.17c5d8",
+ "type": "save",
+ "name": "save",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \nresource='SQL' \nkey='UPDATE REQUEST_DETAILS SET status = \"DELETING\" WHERE request_id = $optical-service-delete-input.request-id' \nforce='true' pfx='save-result'>\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1820.566650390625,
+ "y": 607.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "70aa5b37.57ec94",
+ "type": "get-resource",
+ "name": "get-resource",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL' \nkey='SELECT *\nfrom REQUEST_DETAILS \nWHERE request_id = $optical-service-delete-input.request-id'\npfx='db.request-details'>\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1826.566650390625,
+ "y": 683.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "84297f07.a526"
+ ]
+ ]
+ },
+ {
+ "id": "84297f07.a526",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1984.566650390625,
+ "y": 674.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ [
+ "aff15672.da7fa8"
+ ]
+ ]
+ },
+ {
+ "id": "aff15672.da7fa8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='instance-id' value='`$db.request-details.service-instance-id`' />\n<parameter name='customer-id' value='`$db.request-details.global-customer-id`' />\n<parameter name='service-id' value='`$db.request-details.service-type`' />\n\n\n\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 2133.566650390625,
+ "y": 677.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": []
+ },
+ {
+ "id": "a77548a2.59db78",
+ "type": "update",
+ "name": "update",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' \nforce='true' \nresource='service-instance' \nkey = 'customer.global-customer-id = $customer-id AND\n service-subscription.service-type = $service-id AND\n service-instance.service-instance-id = $instance-id'\nlocal-only='false'>\n <parameter name='orchestration-status' value='DELETING' />\n\n \n \n \n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1799.566650390625,
+ "y": 750.5666656494141,
+ "z": "8588d9b2.517e38",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "ba4b7b38.d871e",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='final-response-code' value=\"200\" />\n",
+ "comments": "",
+ "x": 1790.566650390625,
+ "y": 859.566650390625,
+ "z": "8588d9b2.517e38",
+ "wires": []
+ }
+] \ No newline at end of file
diff --git a/platform-logic/optical-service/src/main/json/optical-service_service-delete-tapi.json b/platform-logic/optical-service/src/main/json/optical-service_service-delete-tapi.json
index cef6bc48..587c1dd7 100644
--- a/platform-logic/optical-service/src/main/json/optical-service_service-delete-tapi.json
+++ b/platform-logic/optical-service/src/main/json/optical-service_service-delete-tapi.json
@@ -269,7 +269,6 @@
"wires": [
[
"4644be9d.89b97",
- "652250d1.df0d6",
"29655b58.ca1ca4",
"aad55652.80ccf8",
"82da300b.4f57c",
@@ -277,7 +276,8 @@
"9f9c7a46.ce0ff8",
"70a0ebe0.92bcd4",
"33fa91ea.5695ce",
- "425e8f1f.07ad6"
+ "425e8f1f.07ad6",
+ "94aa81a4.d0a7a8"
]
]
},
@@ -326,17 +326,6 @@
"wires": []
},
{
- "id": "652250d1.df0d6",
- "type": "returnSuccess",
- "name": "return success",
- "xml": "<return status='success'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='Service deleted successfully' />\n<parameter name='ack-final-indicator' value=\"Y\" />\n",
- "comments": "",
- "x": 1297.7775955200195,
- "y": 1231.1110696792603,
- "z": "ecded786.86d6f8",
- "wires": []
- },
- {
"id": "29655b58.ca1ca4",
"type": "switchNode",
"name": "switch",
@@ -670,5 +659,16 @@
"wires": [
[]
]
+ },
+ {
+ "id": "94aa81a4.d0a7a8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='final-response-code' value=\"200\" />\n",
+ "comments": "",
+ "x": 1325,
+ "y": 1257,
+ "z": "ecded786.86d6f8",
+ "wires": []
}
] \ No newline at end of file
diff --git a/platform-logic/optical-service/src/main/resources/graph.versions b/platform-logic/optical-service/src/main/resources/graph.versions
index ffe85330..417792c1 100644
--- a/platform-logic/optical-service/src/main/resources/graph.versions
+++ b/platform-logic/optical-service/src/main/resources/graph.versions
@@ -22,4 +22,5 @@ optical-service optical-service_delete-bandwidth-update-odu3 ${project.version}
optical-service optical-service_delete-bandwidth-update-odu4 ${project.version} sync
optical-service optical-service_inter-domain-handling ${project.version} sync
optical-service optical-service_create-service-relationship ${project.version} sync
-
+optical-service main-create ${project.version} sync
+optical-service service-delete-msa ${project.version} sync
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_main-create.xml b/platform-logic/optical-service/src/main/xml/optical-service_main-create.xml
new file mode 100644
index 00000000..91062b0f
--- /dev/null
+++ b/platform-logic/optical-service/src/main/xml/optical-service_main-create.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='optical-service' version='${project.version}'>
+ <method rpc='main-create' mode='sync'>
+ <block atomic='true'>
+ <call module='optical-service' rpc='optical-validate-input-params' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='/opt/onap/sdnc/data/properties/optical-service-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT controller_id
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE interface_name = $optical-service-create-input.payload.service-aend.port-id'
+pfx='controllerid'>
+ <outcome value='success'>
+ <set>
+ <parameter name='controller-id' value='`$controllerid.controller-id`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$controller-id`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name='controller-ip' value='`$param-prefix[1]`' />
+ <parameter name='domain-type' value='`$param-prefix[0]`' />
+ </set>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT *
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE interface_name = $optical-service-create-input.payload.service-aend.port-id'
+pfx='db-aend'>
+ <outcome value='success'>
+ <set>
+ <parameter name='aend-nodeid' value='`$db-aend.pnf-id`' />
+ <parameter name='a-end-pnf-name' value='`$db-aend.pnf-name`' />
+ <parameter name='aend-clli' value='`$db-aend.clli`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT *
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE interface_name = $optical-service-create-input.payload.service-zend.port-id'
+pfx='db-zend'>
+ <outcome value='success'>
+ <set>
+ <parameter name='zend-nodeid' value='`$db-zend.pnf-id`' />
+ <parameter name='z-end-pnf-name' value='`$db-zend.pnf-name`' />
+ <parameter name='zend-clli' value='`$db-zend.clli`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <switch test='`$domain-type`'>
+ <outcome value='MSA'>
+ <block atomic='true'>
+ <call module='optical-service' rpc='service-create-msa' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block atomic='true'>
+ <call module='optical-service' rpc='service-create-tapi' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml
index 4b42278c..ce1937f3 100644
--- a/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml
+++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml
@@ -8,113 +8,271 @@
<parameter name='contextPrefix' value='prop' />
</execute>
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
-key='SELECT controller_id
+key='SELECT *
from REQUEST_DETAILS
WHERE request_id = $optical-service-delete-input.request-id'
-pfx='controllerid'>
+pfx='detail-db'>
<outcome value='success'>
<set>
- <parameter name='controller-id' value='`$controllerid.controller-id`' />
+ <parameter name='domain-req' value='`$detail-db.domain-requests`' />
</set>
</outcome>
</get-resource>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
- <parameter name="original_string" value='`$controller-id`'/>
- <parameter name="regex" value="_"/>
- <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ <parameter name="original_string" value='`$domain-req`'/>
+ <parameter name="regex" value=","/>
+ <parameter name="ctx_memory_result_key" value="param-prefix1"/>
</execute>
<set>
- <parameter name='controller-ip' value='`$param-prefix[1]`' />
- <parameter name='domain-type' value='`$param-prefix[0]`' />
- <parameter name='notification-url' value="`$prop.controller.url + '/' + $prop.sdnc.async.url`" />
+ <parameter name='notification-url' value="http://167.254.204.152:31817/asyncNotification" />
+ <parameter name='domain-service1' value='`$param-prefix1[0]`' />
+ <parameter name='domain-service2' value='`$param-prefix1[1]`' />
</set>
- <switch test='`$domain-type`'>
- <outcome value='MSA'>
- <block>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/optical-service-delete-msa.json'`" />
- <parameter name="restapiUrl" value="`$controller-ip + '/cxf/openroadm/openroadm-services/' + $optical-service-delete-input.payload.service-name`"/>
- <parameter name='restapiUser' value='admin' />
- <parameter name='restapiPassword' value='admin' />
- <parameter name="httpMethod" value="DELETE"/>
- <parameter name="responsePrefix" value="service-delete-response"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='format' value='json' />
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.msa.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <outcome value='failure'>
- <block atomic='true'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='Error deleting the Service' />
- </return>
- </block>
- </outcome>
- <outcome value='success'>
- <block atomic='true'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
- <parameter name="level" value="info" />
- <parameter name="field1" value="Successfully sent the request"/>
- </record>
- <switch test='`$service-delete-response.configuration-response-common.response-code`'>
- <outcome value='Other'>
+ <set>
+ <parameter name='access-id' value="`$optical-service-delete-input.request-id`" />
+ </set>
+ <for index='ppx' start='0' end='`$param-prefix1_length`' >
+ <switch test='`$param-prefix1_length`'>
+ <outcome value='1'>
+ <block atomic='true'>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT controller_id
+from REQUEST_DETAILS
+WHERE request_id = $domain-service1'
+pfx='detail-db1'>
+ <outcome value='success'>
+ <set>
+ <parameter name='controller-id1' value='`$detail-db1.controller-id`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$controller-id1`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name='domain-type' value='`$param-prefix[0]`' />
+ <parameter name='controller-ip' value='`$param-prefix[1]`' />
+ <parameter name='optical-service-delete-input.request-id' value="`$domain-service1`" />
+ <parameter name='optical-service-delete-input.payload.service-name' value="`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN'`"/>
+ </set>
+ <switch test='`$domain-type`'>
+ <outcome value='MSA'>
+ <block>
+ <call module='optical-service' rpc='service-delete-msa' mode='sync' >
+ <outcome value='success'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service1-status' value='`$final-response-code`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Failed to call MSA DG' />
+ <parameter name='ack-final-indicator' value="Y" />
+ </return>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block>
+ <call module='optical-service' rpc='service-delete-tapi' mode='sync' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='service1-status' value='`$final-response-code`' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/service-delete-tapi.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="`$service1-status`"/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Failed to call MSA DG' />
+ <parameter name='ack-final-indicator' value="Y" />
+ </return>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='2'>
+ <switch test='`$ppx`'>
+ <outcome value='0'>
+ <block>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT controller_id
+from REQUEST_DETAILS
+WHERE request_id = $domain-service1'
+pfx='detail-db11'>
+ <outcome value='success'>
+ <set>
+ <parameter name='controller-id11' value='`$detail-db11.controller-id`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$controller-id11`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="domain1"/>
+ </execute>
+ <set>
+ <parameter name='optical-service-delete-input.request-id' value="`$domain-service1`" />
+ <parameter name='optical-service-delete-input.payload.service-name' value="`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN-TAPI-1'`"/>
+ <parameter name='domain-type' value='`$domain1[0]`' />
+ <parameter name='controller-ip' value='`$domain1[1]`' />
+ </set>
+ <call module='optical-service' rpc='service-delete-tapi' mode='sync' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='service1-status' value='`$final-response-code`' />
+ </set>
+ <switch test='`$service1-status == 200`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='service1' value='success' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='service1' value='failure' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='failure'>
<return status='failure'>
- <parameter name='error-code' value='`$service-delete-response.configuration-response-common.response-code`' />
- <parameter name='error-message' value='`$service-delete-response.configuration-response-common.response-message`' />
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Main Delete Dg not available' />
+ <parameter name='ack-final-indicator' value="Y" />
</return>
</outcome>
- <outcome value='200'>
- <block atomic='true'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
- <parameter name="level" value="info" />
- <parameter name="field1" value="Inside controller"/>
- </record>
- <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
-resource='SQL'
-key='UPDATE REQUEST_DETAILS SET status = "DELETING" WHERE request_id = $optical-service-delete-input.request-id'
-force='true' pfx='save-result'></save>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
-key='SELECT *
-from REQUEST_DETAILS
-WHERE request_id = $optical-service-delete-input.request-id'
-pfx='db.request-details'>
- <outcome value='success'>
+ </call>
+ </block>
+ </outcome>
+ <outcome value='1'>
+ <block>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT controller_id
+from REQUEST_DETAILS
+WHERE request_id = $domain-service2'
+pfx='detail-db22'>
+ <outcome value='success'>
+ <set>
+ <parameter name='controller-id22' value='`$detail-db22.controller-id`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$controller-id22`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="domain2"/>
+ </execute>
+ <set>
+ <parameter name='optical-service-delete-input.request-id' value="`$domain-service2`" />
+ <parameter name='optical-service-delete-input.payload.service-name' value="`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN-TAPI-2'`"/>
+ <parameter name='domain-type' value='`$domain2[0]`' />
+ <parameter name='controller-ip' value='`$domain2[1]`' />
+ </set>
+ <call module='optical-service' rpc='service-delete-tapi' mode='sync' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='service2-status' value='`$final-response-code`' />
+ </set>
+ <switch test='`$service2-status == 200`'>
+ <outcome value='true'>
<set>
- <parameter name='instance-id' value='`$db.request-details.service-instance-id`' />
- <parameter name='customer-id' value='`$db.request-details.global-customer-id`' />
- <parameter name='service-id' value='`$db.request-details.service-type`' />
+ <parameter name='service2' value='success' />
</set>
</outcome>
- </get-resource>
- <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
-force='true'
-resource='service-instance'
-key = 'customer.global-customer-id = $customer-id AND
- service-subscription.service-type = $service-id AND
- service-instance.service-instance-id = $instance-id'
-local-only='false'>
- <parameter name='orchestration-status' value='DELETING' />
- </update>
- <return status='success'>
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="Service Deletion in Progress" />
- <parameter name='ack-final-indicator' value='N' />
- </return>
+ <outcome value='false'>
+ <set>
+ <parameter name='service2' value='failure' />
+ </set>
+ </outcome>
+ </switch>
</block>
</outcome>
- </switch>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Main Delete Dg not available' />
+ <parameter name='ack-final-indicator' value="Y" />
+ </return>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$ppx`'>
+ <outcome value='0'>
+ <block>
+ <switch test='`$service1-status`'>
+ <outcome value='200'>
+ <block>
+ <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource="SQL"
+ key="DELETE FROM REQUEST_DETAILS WHERE request_id = $access-id"></delete>
+ <return status='success'>
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="Service Deleted Successfully" />
+ <parameter name='ack-final-indicator' value='Y' />
+ </return>
</block>
</outcome>
- </execute>
+ <outcome value='Other'>
+ <block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Access service request entry cannot be deleted' />
+ <parameter name='ack-final-indicator' value="Y" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
</block>
</outcome>
- <outcome value='TAPI'>
+ <outcome value='1'>
<block>
- <call module='optical-service' rpc='service-delete-tapi' mode='sync' ></call>
+ <switch test='`$service1-status == $service2-status == 200`'>
+ <outcome value='true'>
+ <block>
+ <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource="SQL"
+ key="DELETE FROM REQUEST_DETAILS WHERE request_id = $access-id"></delete>
+ <return status='success'>
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="Service Deleted Successfully" />
+ <parameter name='ack-final-indicator' value='Y' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Access service request entry cannot be deleted' />
+ <parameter name='ack-final-indicator' value="Y" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
</block>
</outcome>
</switch>
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml b/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml
new file mode 100644
index 00000000..562195a0
--- /dev/null
+++ b/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml
@@ -0,0 +1,89 @@
+<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='optical-service' version='${project.version}'>
+ <method rpc='service-delete-msa' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='optical-service-create-input.request-id' value="`$domain-service1`" />
+ <parameter name='optical-service-delete-input.payload.service-name' value="`$optical-service-delete-input.payload.param[0].value + '_MDONS-OTN-MSA'`"/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/optical-service-delete-msa.json'`" />
+ <parameter name="restapiUrl" value="`$controller-ip + '/cxf/openroadm/openroadm-services/' + $optical-service-delete-input.payload.service-name`"/>
+ <parameter name='restapiUser' value='admin' />
+ <parameter name='restapiPassword' value='admin' />
+ <parameter name="httpMethod" value="DELETE"/>
+ <parameter name="responsePrefix" value="service-delete-response"/>
+ <parameter name='contentType' value='application/json' />
+ <parameter name='format' value='json' />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.msa.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='failure'>
+ <block atomic='true'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Error deleting the Service' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Successfully sent the request"/>
+ </record>
+ <switch test='`$service-delete-response.configuration-response-common.response-code`'>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='`$service-delete-response.configuration-response-common.response-code`' />
+ <parameter name='error-message' value='`$service-delete-response.configuration-response-common.response-message`' />
+ </return>
+ </outcome>
+ <outcome value='200'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Inside controller"/>
+ </record>
+ <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+resource='SQL'
+key='UPDATE REQUEST_DETAILS SET status = "DELETING" WHERE request_id = $optical-service-delete-input.request-id'
+force='true' pfx='save-result'></save>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT *
+from REQUEST_DETAILS
+WHERE request_id = $optical-service-delete-input.request-id'
+pfx='db.request-details'>
+ <outcome value='success'>
+ <set>
+ <parameter name='instance-id' value='`$db.request-details.service-instance-id`' />
+ <parameter name='customer-id' value='`$db.request-details.global-customer-id`' />
+ <parameter name='service-id' value='`$db.request-details.service-type`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='service-instance'
+key = 'customer.global-customer-id = $customer-id AND
+ service-subscription.service-type = $service-id AND
+ service-instance.service-instance-id = $instance-id'
+local-only='false'>
+ <parameter name='orchestration-status' value='DELETING' />
+ </update>
+ <set>
+ <parameter name='final-response-code' value="200" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_service-delete-tapi.xml b/platform-logic/optical-service/src/main/xml/optical-service_service-delete-tapi.xml
index 919c5548..24b52fbb 100644
--- a/platform-logic/optical-service/src/main/xml/optical-service_service-delete-tapi.xml
+++ b/platform-logic/optical-service/src/main/xml/optical-service_service-delete-tapi.xml
@@ -136,11 +136,9 @@ service-instance.service-instance-id = $output.service-instance-id'></delete>
<delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
resource="SQL"
key="DELETE FROM REQUEST_DETAILS WHERE request_id = $request-id"></delete>
- <return status='success'>
- <parameter name='error-code' value='200' />
- <parameter name='error-message' value='Service deleted successfully' />
- <parameter name='ack-final-indicator' value="Y" />
- </return>
+ <set>
+ <parameter name='final-response-code' value="200" />
+ </set>
</block>
</outcome>
</execute>