diff options
Diffstat (limited to 'platform-logic/optical-service/src/main')
11 files changed, 2570 insertions, 0 deletions
diff --git a/platform-logic/optical-service/src/main/json/optical-service_optical-service-create-sync-success.json b/platform-logic/optical-service/src/main/json/optical-service_optical-service-create-sync-success.json new file mode 100644 index 00000000..34039b4e --- /dev/null +++ b/platform-logic/optical-service/src/main/json/optical-service_optical-service-create-sync-success.json @@ -0,0 +1,322 @@ +[
+ {
+ "id": "27072996.28603e",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 184,
+ "y": 103,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "6ffe569c.fa109"
+ ]
+ ]
+ },
+ {
+ "id": "cc951b5b.220708",
+ "type": "method",
+ "name": "method",
+ "xml": "<method rpc='optical-service-create-sync-success' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 378,
+ "y": 75,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "532eb08a.251b5"
+ ]
+ ]
+ },
+ {
+ "id": "6ffe569c.fa109",
+ "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": 219.5,
+ "y": 226,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "cc951b5b.220708"
+ ]
+ ]
+ },
+ {
+ "id": "532eb08a.251b5",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 481,
+ "y": 139,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "59831fea.3da9b8",
+ "de3d717d.5418b8",
+ "32dae8f5.5da2a",
+ "8a15eff0.fb43c8",
+ "2407f854.80a4a",
+ "4b9498a0.6b56d8",
+ "38b45c59.81b3bc",
+ "7c78c7d.3f8aeb8",
+ "4b5d7c6c.dfedd4"
+ ]
+ ]
+ },
+ {
+ "id": "32dae8f5.5da2a",
+ "type": "save",
+ "name": "update rate in aend in DB",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \nresource='SQL' \nkey='UPDATE TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE SET rate = $available-bandwidth-aend WHERE \ninterface_name = $optical-service-create-input.payload.service-aend.port-id'\nforce='true' pfx='save-result'>\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\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 882,
+ "y": 183,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2407f854.80a4a",
+ "type": "update",
+ "name": "update p-interface a-End in AAI",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' \nforce='true'\nresource='p-interface'\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\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 806,
+ "y": 313,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "8a15eff0.fb43c8",
+ "type": "save",
+ "name": "update rate in azend DB",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \nresource='SQL' \nkey='UPDATE TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE SET rate = $available-bandwidth-zend WHERE \ninterface_name = $optical-service-create-input.payload.service-zend.port-id'\nforce='true' pfx='save-result'>\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\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 820,
+ "y": 257,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4b9498a0.6b56d8",
+ "type": "update",
+ "name": "update p-interface z-End in AAI",
+ "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' \nforce='true'\nresource='p-interface'\nkey = 'pnf.pnf-name = $z-end-pnf-name\n AND p-interface.interface-name = $optical-service-create-input.payload.service-zend.port-id'\n local-only='false'>\n<parameter name='available-capacity' value='`$available-bandwidth-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",
+ "comments": "",
+ "outputs": 1,
+ "x": 802,
+ "y": 385,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "59831fea.3da9b8",
+ "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 sync success\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 641,
+ "y": 86,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "de3d717d.5418b8",
+ "type": "set",
+ "name": "set available rate as 0",
+ "xml": "<set>\n<parameter name='available-bandwidth-aend' value='0' />\n<parameter name='available-bandwidth-zend' value='0' />\n\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "x": 753,
+ "y": 136,
+ "z": "7d0d9c37.54e5a4",
+ "wires": []
+ },
+ {
+ "id": "8efcdbce.63cc68",
+ "type": "save",
+ "name": "save Service Request Details in DB",
+ "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\" key=\"INSERT INTO REQUEST_DETAILS (request_id, controller_id, status, service_rate, service_instance_id, service_type, global_customer_id, notification_url) VALUES ( $optical-service-create-input.request-id , $controller-id , 'CREATING' , $optical-service-create-input.payload.service-rate , $optical-service-create-input.service-id , $optical-service-create-input.service-type , $optical-service-create-input.global-customer-id , $optical-service-create-input.notification-url );\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1245,
+ "y": 339,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "efcf557d.c3a5f8",
+ "type": "save",
+ "name": "save service-instance details in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance' \n key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND\n service-subscription.service-type = $optical-service-create-input.service-type AND\n service-instance.service-instance-id = $optical-service-create-input.service-id' >\n<parameter name='service-instance-id' value='`$optical-service-create-input.service-id`' />\n<parameter name='service-instance-name' value='`$optical-service-create-input.payload.service-name`' />\n<parameter name='service-type' value='Domain-Service' />\n<parameter name='orchestration-status' value='CREATING' />\n<parameter name='service-rate' value='`$optical-service-create-input.payload.service-rate`' />\n<parameter name='service-layer' value='`$optical-service-create-input.payload.service-layer`' />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1255,
+ "y": 431,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "38b45c59.81b3bc",
+ "type": "save",
+ "name": "save service-instance relation with p-interface",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND\n service-subscription.service-type = $optical-service-create-input.service-type AND\n service-instance.service-instance-id = $optical-service-create-input.service-id' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"p-interface\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/pnfs/pnf/' + $a-end-pnf-name + '/p-interfaces/p-interface/' + $optical-service-create-input.payload.service-aend.port-id `\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"pnf.pnf-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$a-end-pnf-name`\" /> \n<parameter name=\"relationship-list.relationship[1].related-to\" value=\"p-interface\" />\n<parameter name=\"relationship-list.relationship[1].related-link\" value=\"`'/network/pnfs/pnf/' + $z-end-pnf-name + '/p-interfaces/p-interface/' + $optical-service-create-input.payload.service-zend.port-id `\" />\n<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-key\" value=\"pnf.pnf-name\" />\n<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-value\" value=\"`$z-end-pnf-name`\" />\n \n ",
+ "comments": "",
+ "outputs": 1,
+ "x": 700,
+ "y": 602,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7c78c7d.3f8aeb8",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='Service Creation in Progress' />\n<parameter name='ack-final-indicator' value='N' />\n",
+ "comments": "",
+ "x": 526,
+ "y": 670,
+ "z": "7d0d9c37.54e5a4",
+ "wires": []
+ },
+ {
+ "id": "4b5d7c6c.dfedd4",
+ "type": "switchNode",
+ "name": "switch domain-type",
+ "xml": "<switch test='`$optical-service-create-input.payload.domain-type`'>\n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 705,
+ "y": 477,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "d809de29.7d03f8",
+ "c1db711f.fdedc"
+ ]
+ ]
+ },
+ {
+ "id": "d809de29.7d03f8",
+ "type": "outcome",
+ "name": "MSA",
+ "xml": "<outcome value='MSA'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 878,
+ "y": 442,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "4f2bcf28.f836e8"
+ ]
+ ]
+ },
+ {
+ "id": "c1db711f.fdedc",
+ "type": "outcome",
+ "name": "TAPI",
+ "xml": "<outcome value='TAPI'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 875,
+ "y": 518,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "1de8f6d7.6e55d9"
+ ]
+ ]
+ },
+ {
+ "id": "4f2bcf28.f836e8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1001,
+ "y": 437,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "8efcdbce.63cc68",
+ "efcf557d.c3a5f8"
+ ]
+ ]
+ },
+ {
+ "id": "1de8f6d7.6e55d9",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1008,
+ "y": 548,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ [
+ "35944f6f.0c2038",
+ "a30d1744.eb9978"
+ ]
+ ]
+ },
+ {
+ "id": "35944f6f.0c2038",
+ "type": "save",
+ "name": "save Service Request Details in DB",
+ "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\" key=\"INSERT INTO REQUEST_DETAILS (request_id, controller_id, status, service_rate, service_instance_id, service_type, global_customer_id, notification_url) VALUES ( $optical-service-create-input.request-id , $controller-id , 'CREATED' , $optical-service-create-input.payload.service-rate , $optical-service-create-input.service-id , $optical-service-create-input.service-type , $optical-service-create-input.global-customer-id , $optical-service-create-input.notification-url );\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1243,
+ "y": 514,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a30d1744.eb9978",
+ "type": "save",
+ "name": "save service-instance details in AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance' \n key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND\n service-subscription.service-type = $optical-service-create-input.service-type AND\n service-instance.service-instance-id = $optical-service-create-input.service-id' >\n<parameter name='service-instance-id' value='`$optical-service-create-input.service-id`' />\n<parameter name='service-instance-name' value='`$optical-service-create-input.payload.service-name`' />\n<parameter name='service-type' value='Domain-Service' />\n<parameter name='orchestration-status' value='CREATED' />\n<parameter name='service-rate' value='`$optical-service-create-input.payload.service-rate`' />\n<parameter name='service-layer' value='`$optical-service-create-input.payload.service-layer`' />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1245,
+ "y": 592,
+ "z": "7d0d9c37.54e5a4",
+ "wires": [
+ []
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/json/optical-service_optical-service-create.json b/platform-logic/optical-service/src/main/json/optical-service_optical-service-create.json new file mode 100644 index 00000000..6b76a2d5 --- /dev/null +++ b/platform-logic/optical-service/src/main/json/optical-service_optical-service-create.json @@ -0,0 +1,367 @@ +[
+ {
+ "id": "a60c3a75.bbec5",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 213,
+ "y": 182,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "5b510e2a.808e9"
+ ]
+ ]
+ },
+ {
+ "id": "c50c5fff.124b48",
+ "type": "method",
+ "name": "method",
+ "xml": "<method rpc='optical-service-create' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 212,
+ "y": 257,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "95411f3f.dd7f98"
+ ]
+ ]
+ },
+ {
+ "id": "5b510e2a.808e9",
+ "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": 430.5,
+ "y": 165,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "c50c5fff.124b48"
+ ]
+ ]
+ },
+ {
+ "id": "95411f3f.dd7f98",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 388,
+ "y": 270,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "3ce1c2e1.3b2f6e",
+ "4f2664fb.690704",
+ "8396ec44.a3b3f",
+ "98a2e7e3.d11d58",
+ "dbd48c3a.1af36",
+ "79f9f3f0.aa019c",
+ "a32436b4.dcfeb8",
+ "6cb71359.685f54"
+ ]
+ ]
+ },
+ {
+ "id": "4f2664fb.690704",
+ "type": "switchNode",
+ "name": "switch : domain-type",
+ "xml": "<switch test='`$optical-service-create-input.payload.domain-type`'>\n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 265.5,
+ "y": 583,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "d95d35a6.d10db",
+ "6077e8a.adc5618"
+ ]
+ ]
+ },
+ {
+ "id": "d95d35a6.d10db",
+ "type": "outcome",
+ "name": "MSA",
+ "xml": "<outcome value='MSA'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 568,
+ "y": 553,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "7a015c66.3154ec"
+ ]
+ ]
+ },
+ {
+ "id": "6077e8a.adc5618",
+ "type": "outcome",
+ "name": "TAPI",
+ "xml": "<outcome value='TAPI'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 564,
+ "y": 662,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "ebb70e0a.9be68"
+ ]
+ ]
+ },
+ {
+ "id": "3ce1c2e1.3b2f6e",
+ "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": 770,
+ "y": 145,
+ "z": "f1813121.5d5738",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7a015c66.3154ec",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 756,
+ "y": 554,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "3e4acd01.4d0db2"
+ ]
+ ]
+ },
+ {
+ "id": "ebb70e0a.9be68",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 749,
+ "y": 667,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "9e442bec.ab7e8"
+ ]
+ ]
+ },
+ {
+ "id": "8396ec44.a3b3f",
+ "type": "call",
+ "name": "call validate-input-parameters",
+ "xml": "<call module='optical-service' rpc='optical-validate-input-params' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 856,
+ "y": 92,
+ "z": "f1813121.5d5738",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9e442bec.ab7e8",
+ "type": "call",
+ "name": "call TAPI DG",
+ "xml": "<call module='optical-service' rpc='service-create-tapi' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 948,
+ "y": 665,
+ "z": "f1813121.5d5738",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3e4acd01.4d0db2",
+ "type": "call",
+ "name": "call MSA DG",
+ "xml": "<call module='optical-service' rpc='service-create-msa' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 960,
+ "y": 550,
+ "z": "f1813121.5d5738",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "98a2e7e3.d11d58",
+ "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\nAND interface_id = $optical-service-create-input.payload.service-aend.port-name'\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": 746,
+ "y": 230,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "130f8c79.83a0ec"
+ ]
+ ]
+ },
+ {
+ "id": "dbd48c3a.1af36",
+ "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": 765,
+ "y": 283,
+ "z": "f1813121.5d5738",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "130f8c79.83a0ec",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 976,
+ "y": 229,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "526e75aa.f179f4"
+ ]
+ ]
+ },
+ {
+ "id": "526e75aa.f179f4",
+ "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": 1129,
+ "y": 232,
+ "z": "f1813121.5d5738",
+ "wires": []
+ },
+ {
+ "id": "79f9f3f0.aa019c",
+ "type": "set",
+ "name": "set controller-ip",
+ "xml": "<set>\n<parameter name='controller-ip' value='`$param-prefix[1]`' />\n",
+ "comments": "",
+ "x": 705,
+ "y": 341,
+ "z": "f1813121.5d5738",
+ "wires": []
+ },
+ {
+ "id": "a32436b4.dcfeb8",
+ "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\nAND interface_id = $optical-service-create-input.payload.service-aend.port-name'\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": 616,
+ "y": 405,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "73558010.2c724"
+ ]
+ ]
+ },
+ {
+ "id": "6cb71359.685f54",
+ "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\nAND interface_id = $optical-service-create-input.payload.service-zend.port-name'\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": 612,
+ "y": 477,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "c9ac9911.a76998"
+ ]
+ ]
+ },
+ {
+ "id": "73558010.2c724",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 805,
+ "y": 402,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "35f9f711.be4718"
+ ]
+ ]
+ },
+ {
+ "id": "35f9f711.be4718",
+ "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": 967,
+ "y": 401,
+ "z": "f1813121.5d5738",
+ "wires": []
+ },
+ {
+ "id": "c9ac9911.a76998",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 803,
+ "y": 476,
+ "z": "f1813121.5d5738",
+ "wires": [
+ [
+ "1b6fe865.a8bca8"
+ ]
+ ]
+ },
+ {
+ "id": "1b6fe865.a8bca8",
+ "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": 971,
+ "y": 473,
+ "z": "f1813121.5d5738",
+ "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 new file mode 100644 index 00000000..270a3cf9 --- /dev/null +++ b/platform-logic/optical-service/src/main/json/optical-service_optical-service-delete.json @@ -0,0 +1,536 @@ +[
+ {
+ "id": "7d351c38.c4c6cc",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 146,
+ "y": 70,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "6c3e5cdb.13fe9c"
+ ]
+ ]
+ },
+ {
+ "id": "6c3e5cdb.13fe9c",
+ "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": 254.5,
+ "y": 148,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "c9af40a8.771678"
+ ]
+ ]
+ },
+ {
+ "id": "c9af40a8.771678",
+ "type": "method",
+ "name": "method",
+ "xml": "<method rpc='optical-service-delete' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 123,
+ "y": 239,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "487722a8.b389a4"
+ ]
+ ]
+ },
+ {
+ "id": "487722a8.b389a4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 309,
+ "y": 235,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "a1fed560.31e7a8",
+ "4b9bbd62.4750fc",
+ "eac944ef.f83328",
+ "b567b7de.be2de8",
+ "c0977e42.e4156"
+ ]
+ ]
+ },
+ {
+ "id": "bfd79d0e.9f7ee8",
+ "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": 700,
+ "y": 326,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "582ceeba.7fcce",
+ "867ca716.d4515"
+ ]
+ ]
+ },
+ {
+ "id": "a1fed560.31e7a8",
+ "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": 553,
+ "y": 36,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "582ceeba.7fcce",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 894,
+ "y": 306,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "c3bd28c6.e626b"
+ ]
+ ]
+ },
+ {
+ "id": "867ca716.d4515",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 869,
+ "y": 410,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "791a6dc2.40ab1c"
+ ]
+ ]
+ },
+ {
+ "id": "c3bd28c6.e626b",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1053,
+ "y": 301,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "caa7c35f.0456c8"
+ ]
+ ]
+ },
+ {
+ "id": "caa7c35f.0456c8",
+ "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": 1285,
+ "y": 245,
+ "z": "7b1b071a.92faa",
+ "wires": []
+ },
+ {
+ "id": "2041d7aa.c3ae1",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1424,
+ "y": 549,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "27f66eb0.3c9aaa",
+ "e6dae4f7.8c52b",
+ "276e2c67.21f3ec",
+ "126b611e.fd67af",
+ "881b58f7.fb4a6"
+ ]
+ ]
+ },
+ {
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1639,
+ "y": 464,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1641,
+ "y": 550,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1637,
+ "y": 626,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "ccbf1f5f.52d948"
+ ]
+ ]
+ },
+ {
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1238,
+ "y": 332,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "791a6dc2.40ab1c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1036,
+ "y": 413,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "cdc717d5.1094b8",
+ "d4fa1dc0.5c15a8"
+ ]
+ ]
+ },
+ {
+ "id": "d4fa1dc0.5c15a8",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$service-delete-response.configuration-response-common.response-code`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1221,
+ "y": 410,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "bbeca38a.ba0cc",
+ "86f8972f.01b4c8"
+ ]
+ ]
+ },
+ {
+ "id": "bbeca38a.ba0cc",
+ "type": "outcome",
+ "name": "200 success",
+ "xml": "<outcome value='200'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1409,
+ "y": 416,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "2041d7aa.c3ae1"
+ ]
+ ]
+ },
+ {
+ "id": "86f8972f.01b4c8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1395,
+ "y": 295,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "8b978b7.90f6978"
+ ]
+ ]
+ },
+ {
+ "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",
+ "comments": "",
+ "x": 1582,
+ "y": 294,
+ "z": "7b1b071a.92faa",
+ "wires": []
+ },
+ {
+ "id": "ccbf1f5f.52d948",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1847,
+ "y": 621,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "ae1d75fe.230f18"
+ ]
+ ]
+ },
+ {
+ "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",
+ "comments": "",
+ "x": 1986,
+ "y": 622,
+ "z": "7b1b071a.92faa",
+ "wires": []
+ },
+ {
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1730,
+ "y": 714,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "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' />",
+ "comments": "",
+ "x": 1619,
+ "y": 810,
+ "z": "7b1b071a.92faa",
+ "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'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 665,
+ "y": 109,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "3249f019.f6152"
+ ]
+ ]
+ },
+ {
+ "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",
+ "comments": "",
+ "outputs": 1,
+ "x": 646,
+ "y": 168,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3249f019.f6152",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 892,
+ "y": 104,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "cc783b3b.8e16b"
+ ]
+ ]
+ },
+ {
+ "id": "cc783b3b.8e16b",
+ "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": 1083,
+ "y": 106,
+ "z": "7b1b071a.92faa",
+ "wires": []
+ },
+ {
+ "id": "b567b7de.be2de8",
+ "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",
+ "comments": "",
+ "x": 593,
+ "y": 223,
+ "z": "7b1b071a.92faa",
+ "wires": []
+ },
+ {
+ "id": "c0977e42.e4156",
+ "type": "switchNode",
+ "name": "switch domain-type",
+ "xml": "<switch test='`$domain-type`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 188,
+ "y": 324,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "1f20cc0f.cf39ec",
+ "fe8682d2.0d3618"
+ ]
+ ]
+ },
+ {
+ "id": "1f20cc0f.cf39ec",
+ "type": "outcome",
+ "name": "MSA",
+ "xml": "<outcome value='MSA'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 363,
+ "y": 325,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "d9880526.733f4"
+ ]
+ ]
+ },
+ {
+ "id": "fe8682d2.0d3618",
+ "type": "outcome",
+ "name": "TAPI",
+ "xml": "<outcome value='TAPI'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 324,
+ "y": 428,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "c4af063b.a8dc38"
+ ]
+ ]
+ },
+ {
+ "id": "d9880526.733f4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 507,
+ "y": 326,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "bfd79d0e.9f7ee8"
+ ]
+ ]
+ },
+ {
+ "id": "c4af063b.a8dc38",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 475,
+ "y": 421,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ [
+ "5c1ca252.745f4c"
+ ]
+ ]
+ },
+ {
+ "id": "5c1ca252.745f4c",
+ "type": "call",
+ "name": "call TAPI DELETE DG",
+ "xml": "<call module='optical-service' rpc='service-delete-tapi' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 643,
+ "y": 524,
+ "z": "7b1b071a.92faa",
+ "wires": [
+ []
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/json/optical-service_optical-validate-input-params.json b/platform-logic/optical-service/src/main/json/optical-service_optical-validate-input-params.json new file mode 100644 index 00000000..491f1ae8 --- /dev/null +++ b/platform-logic/optical-service/src/main/json/optical-service_optical-validate-input-params.json @@ -0,0 +1,446 @@ +[
+ {
+ "id": "45fe0f03.73594",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 157,
+ "y": 128,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "c0c6bb78.ab7328"
+ ]
+ ]
+ },
+ {
+ "id": "85b96b99.939c28",
+ "type": "method",
+ "name": "method",
+ "xml": "<method rpc='optical-validate-input-params' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 426,
+ "y": 187,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "f0b2b5e5.a9ccf"
+ ]
+ ]
+ },
+ {
+ "id": "c0c6bb78.ab7328",
+ "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": 405.5,
+ "y": 122,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "85b96b99.939c28"
+ ]
+ ]
+ },
+ {
+ "id": "f0b2b5e5.a9ccf",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 471,
+ "y": 256,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "d38614d0.bc36",
+ "671058f0.99ab9",
+ "f4433d75.377228",
+ "a9973cda.a8ef68",
+ "bc906c4e.a81f98"
+ ]
+ ]
+ },
+ {
+ "id": "d38614d0.bc36",
+ "type": "switchNode",
+ "name": "request-id",
+ "xml": "<switch test='`$optical-service-create-input.request-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 646,
+ "y": 148,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "23efd503.0cf412",
+ "1d6aa3e0.f6a834"
+ ]
+ ]
+ },
+ {
+ "id": "f4433d75.377228",
+ "type": "switchNode",
+ "name": "global-customer-id",
+ "xml": "<switch test='`$optical-service-create-input.global-customer-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 655,
+ "y": 361,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "728c9f28.f9d0e8",
+ "46df5e01.d1113"
+ ]
+ ]
+ },
+ {
+ "id": "a9973cda.a8ef68",
+ "type": "switchNode",
+ "name": "service-id",
+ "xml": "<switch test='`$optical-service-create-input.service-id`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 633,
+ "y": 538,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "d26d7cce.773f38",
+ "2c3d9568.5117a2"
+ ]
+ ]
+ },
+ {
+ "id": "671058f0.99ab9",
+ "type": "switchNode",
+ "name": "service-type",
+ "xml": "<switch test='`$optical-service-create-input.service-type`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 648,
+ "y": 241,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "f2f4ba89.3681a8",
+ "b7e00225.a8cb18"
+ ]
+ ]
+ },
+ {
+ "id": "23efd503.0cf412",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value='``'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 798,
+ "y": 143,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "34e9eaa3.5c0fee"
+ ]
+ ]
+ },
+ {
+ "id": "34e9eaa3.5c0fee",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='request-id is a mandatory field' />\n",
+ "comments": "",
+ "x": 972,
+ "y": 141,
+ "z": "d427ef29.f00798",
+ "wires": []
+ },
+ {
+ "id": "728c9f28.f9d0e8",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value='``'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 798,
+ "y": 375,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "a83e9b81.69057"
+ ]
+ ]
+ },
+ {
+ "id": "d26d7cce.773f38",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value='``'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 796,
+ "y": 532,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "946c93a2.ec4708"
+ ]
+ ]
+ },
+ {
+ "id": "f2f4ba89.3681a8",
+ "type": "outcome",
+ "name": "NULL",
+ "xml": "<outcome value='``'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 804,
+ "y": 249,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "fbae657d.c4d4c8"
+ ]
+ ]
+ },
+ {
+ "id": "a83e9b81.69057",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='global-customer-id is a mandatory field' />\n",
+ "comments": "",
+ "x": 969,
+ "y": 378,
+ "z": "d427ef29.f00798",
+ "wires": []
+ },
+ {
+ "id": "fbae657d.c4d4c8",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='service-type is a mandatory field' />\n",
+ "comments": "",
+ "x": 970,
+ "y": 241,
+ "z": "d427ef29.f00798",
+ "wires": []
+ },
+ {
+ "id": "946c93a2.ec4708",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='service-id is a mandatory field' />\n",
+ "comments": "",
+ "x": 970,
+ "y": 518,
+ "z": "d427ef29.f00798",
+ "wires": []
+ },
+ {
+ "id": "46df5e01.d1113",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 804,
+ "y": 436,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "622cee2e.97fdc8"
+ ]
+ ]
+ },
+ {
+ "id": "622cee2e.97fdc8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 964,
+ "y": 431,
+ "z": "d427ef29.f00798",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1d6aa3e0.f6a834",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 784,
+ "y": 190,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "e5940f9b.9dd578"
+ ]
+ ]
+ },
+ {
+ "id": "e5940f9b.9dd578",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 973,
+ "y": 189,
+ "z": "d427ef29.f00798",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b7e00225.a8cb18",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 811,
+ "y": 302,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "f8b5a2fb.5adfe"
+ ]
+ ]
+ },
+ {
+ "id": "f8b5a2fb.5adfe",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 954,
+ "y": 294,
+ "z": "d427ef29.f00798",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2c3d9568.5117a2",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 794,
+ "y": 577,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "b2fd7e25.913c4"
+ ]
+ ]
+ },
+ {
+ "id": "b2fd7e25.913c4",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 969,
+ "y": 570,
+ "z": "d427ef29.f00798",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "bc906c4e.a81f98",
+ "type": "switchNode",
+ "name": "source",
+ "xml": "<switch test='`$optical-service-create-input.source`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 607,
+ "y": 661,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "6a791b88.4d9444",
+ "a73ceec7.d4e338"
+ ]
+ ]
+ },
+ {
+ "id": "6a791b88.4d9444",
+ "type": "outcome",
+ "name": "SO",
+ "xml": "<outcome value='SO'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 788,
+ "y": 679,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "77e76807.687ab8"
+ ]
+ ]
+ },
+ {
+ "id": "a73ceec7.d4e338",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 792,
+ "y": 748,
+ "z": "d427ef29.f00798",
+ "wires": [
+ [
+ "2a90f153.aeb8ae"
+ ]
+ ]
+ },
+ {
+ "id": "77e76807.687ab8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 965,
+ "y": 677,
+ "z": "d427ef29.f00798",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2a90f153.aeb8ae",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='source must be SO' />\n",
+ "comments": "",
+ "x": 965,
+ "y": 749,
+ "z": "d427ef29.f00798",
+ "wires": []
+ }
+]
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/json/optical-service_service-create-msa.json b/platform-logic/optical-service/src/main/json/optical-service_service-create-msa.json new file mode 100644 index 00000000..fd253262 --- /dev/null +++ b/platform-logic/optical-service/src/main/json/optical-service_service-create-msa.json @@ -0,0 +1,445 @@ +[
+ {
+ "id": "3ea35ee.ad0f6a2",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 116,
+ "y": 81,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "11cee705.bf2a31"
+ ]
+ ]
+ },
+ {
+ "id": "d850b04.b54af5",
+ "type": "method",
+ "name": "method",
+ "xml": "<method rpc='service-create-msa' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 174,
+ "y": 206,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "488da689.489b18"
+ ]
+ ]
+ },
+ {
+ "id": "11cee705.bf2a31",
+ "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": 360.5,
+ "y": 84,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "d850b04.b54af5"
+ ]
+ ]
+ },
+ {
+ "id": "8d61ef5.90ff99",
+ "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-create-msa.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$controller-ip + '/cxf/openroadm/openroadm-services'`\"/>\n<parameter name='restapiUser' value='admin' />\n<parameter name='restapiPassword' value='admin' />\n<parameter name=\"httpMethod\" value=\"POST\"/>\n<parameter name=\"responsePrefix\" value=\"service-create-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\"/> ",
+ "comments": "",
+ "outputs": 1,
+ "x": 809,
+ "y": 533,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "ccc1ac83.fb8f3",
+ "2f9f6425.084e84"
+ ]
+ ]
+ },
+ {
+ "id": "ccc1ac83.fb8f3",
+ "type": "outcome",
+ "name": "Failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1038,
+ "y": 508,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "a1397508.3503c8"
+ ]
+ ]
+ },
+ {
+ "id": "2f9f6425.084e84",
+ "type": "outcome",
+ "name": "Success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1033,
+ "y": 609,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "ef5192a4.4e4b1"
+ ]
+ ]
+ },
+ {
+ "id": "a1e42279.d92258",
+ "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": 1535,
+ "y": 641,
+ "z": "c2959a97.94a74",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "5e2abc18.1b66ac",
+ "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=\"Failure\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1562,
+ "y": 467,
+ "z": "c2959a97.94a74",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "488da689.489b18",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 413,
+ "y": 198,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "8d61ef5.90ff99",
+ "a3b8c6ad.cc7648",
+ "8ad2ed4f.9eaef8",
+ "35d2d9b2.cbceee",
+ "5929fa76.a7464c",
+ "b065abfd.9e90f8"
+ ]
+ ]
+ },
+ {
+ "id": "ef5192a4.4e4b1",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1281,
+ "y": 611,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "a1e42279.d92258",
+ "893ecee0.5f1a6"
+ ]
+ ]
+ },
+ {
+ "id": "629b93c5.786c2c",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Could not connect to Controller' />\n",
+ "comments": "",
+ "x": 1548,
+ "y": 559,
+ "z": "c2959a97.94a74",
+ "wires": []
+ },
+ {
+ "id": "a1397508.3503c8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1272,
+ "y": 509,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "5e2abc18.1b66ac",
+ "629b93c5.786c2c"
+ ]
+ ]
+ },
+ {
+ "id": "893ecee0.5f1a6",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$service-create-response.configuration-response-common.response-code`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1530,
+ "y": 723,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "5758035.e2b987c",
+ "ec22434b.def97"
+ ]
+ ]
+ },
+ {
+ "id": "5758035.e2b987c",
+ "type": "outcome",
+ "name": "outcome",
+ "xml": "<outcome value='200'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1698,
+ "y": 724,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "211ff3f4.659f1c"
+ ]
+ ]
+ },
+ {
+ "id": "ec22434b.def97",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1706,
+ "y": 790,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "c3dd586d.2d9ff"
+ ]
+ ]
+ },
+ {
+ "id": "c3dd586d.2d9ff",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='`$service-create-response.configuration-response-common.response-code`' />\n<parameter name='error-message' value='`$service-create-response.configuration-response-common.response-message`' />\n",
+ "comments": "",
+ "x": 1885,
+ "y": 790,
+ "z": "c2959a97.94a74",
+ "wires": []
+ },
+ {
+ "id": "211ff3f4.659f1c",
+ "type": "call",
+ "name": "call sync success DG",
+ "xml": "<call module='optical-service' rpc='optical-service-create-sync-success' mode='sync' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1900,
+ "y": 721,
+ "z": "c2959a97.94a74",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "a3b8c6ad.cc7648",
+ "type": "set",
+ "name": "set parameters",
+ "xml": "<set>\n<parameter name='notification-url' value=\"`$prop.controller.url + '/' + $prop.sdnc.async.url`\" />\n<parameter name='service-aend-nodeid' value='`$param-prefix[0]`' />\n<parameter name='service-zend-nodeid' value='`$param-prefix1[0]`' />\n",
+ "comments": "",
+ "x": 831,
+ "y": 276,
+ "z": "c2959a97.94a74",
+ "wires": []
+ },
+ {
+ "id": "8ad2ed4f.9eaef8",
+ "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=\"Logical link name\"/>\n<parameter name=\"field2\" value=\"`$logical-link-check`\"/>\n<parameter name=\"field3\" value=\"`$a-end-pnf-name`\"/>\n<parameter name=\"field4\" value=\"`$z-end-pnf-name`\"/>\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 817,
+ "y": 223,
+ "z": "c2959a97.94a74",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "35d2d9b2.cbceee",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$optical-service-create-input.payload.service-protocol`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 919,
+ "y": 361,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "377ae9e5.0edff6",
+ "6ebfa6a3.e8164"
+ ]
+ ]
+ },
+ {
+ "id": "377ae9e5.0edff6",
+ "type": "outcome",
+ "name": "Ethernet",
+ "xml": "<outcome value='Ethernet'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1096,
+ "y": 355,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "d04153bc.9f4338"
+ ]
+ ]
+ },
+ {
+ "id": "18dafb4f.277ba5",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test='`$optical-service-create-input.payload.coding-func`'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1460,
+ "y": 351,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "bff9d743.e28a08",
+ "80d30a7a.cb97f"
+ ]
+ ]
+ },
+ {
+ "id": "d04153bc.9f4338",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1286,
+ "y": 353,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "18dafb4f.277ba5"
+ ]
+ ]
+ },
+ {
+ "id": "6ebfa6a3.e8164",
+ "type": "other",
+ "name": "Do Nothing",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1101,
+ "y": 422,
+ "z": "c2959a97.94a74",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "bff9d743.e28a08",
+ "type": "outcome",
+ "name": "10GBASE-R",
+ "xml": "<outcome value='10GBASE-R'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1619,
+ "y": 346,
+ "z": "c2959a97.94a74",
+ "wires": [
+ [
+ "1fad8a48.e66316"
+ ]
+ ]
+ },
+ {
+ "id": "80d30a7a.cb97f",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1612,
+ "y": 414,
+ "z": "c2959a97.94a74",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1fad8a48.e66316",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='mapping-mode-aend' value='mapping-mode' />\n<parameter name='mapping-mode-zend' value='mapping-mode' />\n<parameter name='mapping-mode.value' value='GFP-F' />\n",
+ "comments": "",
+ "x": 1828,
+ "y": 345,
+ "z": "c2959a97.94a74",
+ "wires": []
+ },
+ {
+ "id": "5929fa76.a7464c",
+ "type": "execute",
+ "name": "split node-id z-end",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$zend-nodeid`'/>\n<parameter name=\"regex\" value=\"-\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix1\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 834,
+ "y": 157,
+ "z": "c2959a97.94a74",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b065abfd.9e90f8",
+ "type": "execute",
+ "name": "split node-id a-end",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$aend-nodeid`'/>\n<parameter name=\"regex\" value=\"-\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 837,
+ "y": 93,
+ "z": "c2959a97.94a74",
+ "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 new file mode 100644 index 00000000..026c2ea3 --- /dev/null +++ b/platform-logic/optical-service/src/main/resources/graph.versions @@ -0,0 +1,5 @@ +optical-service optical-validate-input-params ${project.version} sync +optical-service optical-service-create ${project.version} sync +optical-service optical-service-create-sync-success ${project.version} sync +optical-service service-create-msa ${project.version} sync +optical-service optical-service-delete ${project.version} sync diff --git a/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create-sync-success.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create-sync-success.xml new file mode 100644 index 00000000..43359c40 --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create-sync-success.xml @@ -0,0 +1,95 @@ +<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='optical-service-create-sync-success' mode='sync'>
+ <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 sync success"/>
+ </record>
+ <set>
+ <parameter name='available-bandwidth-aend' value='0' />
+ <parameter name='available-bandwidth-zend' value='0' />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+resource='SQL'
+key='UPDATE TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE SET rate = $available-bandwidth-aend WHERE
+interface_name = $optical-service-create-input.payload.service-aend.port-id'
+force='true' pfx='save-result'></save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+resource='SQL'
+key='UPDATE TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE SET rate = $available-bandwidth-zend WHERE
+interface_name = $optical-service-create-input.payload.service-zend.port-id'
+force='true' pfx='save-result'></save>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='p-interface'
+key = 'pnf.pnf-name = $a-end-pnf-name
+ AND p-interface.interface-name = $optical-service-create-input.payload.service-aend.port-id'
+ local-only='false'>
+ <parameter name='available-capacity' value='`$available-bandwidth-aend`' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='p-interface'
+key = 'pnf.pnf-name = $z-end-pnf-name
+ AND p-interface.interface-name = $optical-service-create-input.payload.service-zend.port-id'
+ local-only='false'>
+ <parameter name='available-capacity' value='`$available-bandwidth-zend`' />
+ </update>
+ <switch test='`$optical-service-create-input.payload.domain-type`'>
+ <outcome value='MSA'>
+ <block>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="INSERT INTO REQUEST_DETAILS (request_id, controller_id, status, service_rate, service_instance_id, service_type, global_customer_id, notification_url) VALUES ( $optical-service-create-input.request-id , $controller-id , 'CREATING' , $optical-service-create-input.payload.service-rate , $optical-service-create-input.service-id , $optical-service-create-input.service-type , $optical-service-create-input.global-customer-id , $optical-service-create-input.notification-url );"></save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance'
+ key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND
+ service-subscription.service-type = $optical-service-create-input.service-type AND
+ service-instance.service-instance-id = $optical-service-create-input.service-id' >
+ <parameter name='service-instance-id' value='`$optical-service-create-input.service-id`' />
+ <parameter name='service-instance-name' value='`$optical-service-create-input.payload.service-name`' />
+ <parameter name='service-type' value='Domain-Service' />
+ <parameter name='orchestration-status' value='CREATING' />
+ <parameter name='service-rate' value='`$optical-service-create-input.payload.service-rate`' />
+ <parameter name='service-layer' value='`$optical-service-create-input.payload.service-layer`' />
+ </save>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="INSERT INTO REQUEST_DETAILS (request_id, controller_id, status, service_rate, service_instance_id, service_type, global_customer_id, notification_url) VALUES ( $optical-service-create-input.request-id , $controller-id , 'CREATED' , $optical-service-create-input.payload.service-rate , $optical-service-create-input.service-id , $optical-service-create-input.service-type , $optical-service-create-input.global-customer-id , $optical-service-create-input.notification-url );"></save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance'
+ key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND
+ service-subscription.service-type = $optical-service-create-input.service-type AND
+ service-instance.service-instance-id = $optical-service-create-input.service-id' >
+ <parameter name='service-instance-id' value='`$optical-service-create-input.service-id`' />
+ <parameter name='service-instance-name' value='`$optical-service-create-input.payload.service-name`' />
+ <parameter name='service-type' value='Domain-Service' />
+ <parameter name='orchestration-status' value='CREATED' />
+ <parameter name='service-rate' value='`$optical-service-create-input.payload.service-rate`' />
+ <parameter name='service-layer' value='`$optical-service-create-input.payload.service-layer`' />
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ key='customer.global-customer-id = $optical-service-create-input.global-customer-id AND
+ service-subscription.service-type = $optical-service-create-input.service-type AND
+ service-instance.service-instance-id = $optical-service-create-input.service-id' force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="p-interface" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $a-end-pnf-name + '/p-interfaces/p-interface/' + $optical-service-create-input.payload.service-aend.port-id `" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="pnf.pnf-name" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$a-end-pnf-name`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="p-interface" />
+ <parameter name="relationship-list.relationship[1].related-link" value="`'/network/pnfs/pnf/' + $z-end-pnf-name + '/p-interfaces/p-interface/' + $optical-service-create-input.payload.service-zend.port-id `" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="pnf.pnf-name" />
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$z-end-pnf-name`" />
+ </save>
+ <return status='success'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='Service Creation in Progress' />
+ <parameter name='ack-final-indicator' value='N' />
+ </return>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create.xml new file mode 100644 index 00000000..240316ab --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-create.xml @@ -0,0 +1,73 @@ +<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='optical-service-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
+AND interface_id = $optical-service-create-input.payload.service-aend.port-name'
+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]`' />
+ </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
+AND interface_id = $optical-service-create-input.payload.service-aend.port-name'
+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
+AND interface_id = $optical-service-create-input.payload.service-zend.port-name'
+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='`$optical-service-create-input.payload.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 new file mode 100644 index 00000000..4b42278c --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-service-delete.xml @@ -0,0 +1,123 @@ +<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='optical-service-delete' mode='sync'>
+ <block atomic='true'>
+ <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 REQUEST_DETAILS
+WHERE request_id = $optical-service-delete-input.request-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]`' />
+ <parameter name='notification-url' value="`$prop.controller.url + '/' + $prop.sdnc.async.url`" />
+ </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'>
+ <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>
+ <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>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block>
+ <call module='optical-service' rpc='service-delete-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-validate-input-params.xml b/platform-logic/optical-service/src/main/xml/optical-service_optical-validate-input-params.xml new file mode 100644 index 00000000..b6517f99 --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_optical-validate-input-params.xml @@ -0,0 +1,63 @@ +<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='optical-validate-input-params' mode='sync'>
+ <block atomic='true'>
+ <switch test='`$optical-service-create-input.request-id`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='request-id is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.service-type`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='service-type is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.global-customer-id`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='global-customer-id is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.service-id`'>
+ <outcome value='``'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='service-id is a mandatory field' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'></block>
+ </outcome>
+ </switch>
+ <switch test='`$optical-service-create-input.source`'>
+ <outcome value='SO'>
+ <block atomic='true'></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='source must be SO' />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/optical-service/src/main/xml/optical-service_service-create-msa.xml b/platform-logic/optical-service/src/main/xml/optical-service_service-create-msa.xml new file mode 100644 index 00000000..db2d29f6 --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_service-create-msa.xml @@ -0,0 +1,95 @@ +<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-create-msa' mode='sync'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$aend-nodeid`'/>
+ <parameter name="regex" value="-"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$zend-nodeid`'/>
+ <parameter name="regex" value="-"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix1"/>
+ </execute>
+ <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="Logical link name"/>
+ <parameter name="field2" value="`$logical-link-check`"/>
+ <parameter name="field3" value="`$a-end-pnf-name`"/>
+ <parameter name="field4" value="`$z-end-pnf-name`"/>
+ </record>
+ <set>
+ <parameter name='notification-url' value="`$prop.controller.url + '/' + $prop.sdnc.async.url`" />
+ <parameter name='service-aend-nodeid' value='`$param-prefix[0]`' />
+ <parameter name='service-zend-nodeid' value='`$param-prefix1[0]`' />
+ </set>
+ <switch test='`$optical-service-create-input.payload.service-protocol`'>
+ <outcome value='Ethernet'>
+ <block atomic='true'>
+ <switch test='`$optical-service-create-input.payload.coding-func`'>
+ <outcome value='10GBASE-R'>
+ <set>
+ <parameter name='mapping-mode-aend' value='mapping-mode' />
+ <parameter name='mapping-mode-zend' value='mapping-mode' />
+ <parameter name='mapping-mode.value' value='GFP-F' />
+ </set>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/optical-service-create-msa.json'`" />
+ <parameter name="restapiUrl" value="`$controller-ip + '/cxf/openroadm/openroadm-services'`"/>
+ <parameter name='restapiUser' value='admin' />
+ <parameter name='restapiPassword' value='admin' />
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="service-create-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'>
+ <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="Failure"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Could not connect to Controller' />
+ </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-create-response.configuration-response-common.response-code`'>
+ <outcome value='200'>
+ <call module='optical-service' rpc='optical-service-create-sync-success' mode='sync' ></call>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='`$service-create-response.configuration-response-common.response-code`' />
+ <parameter name='error-message' value='`$service-create-response.configuration-response-common.response-message`' />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |