diff options
author | Franklin Dsilva <franklin.dsilva@us.fujitsu.com> | 2020-02-20 05:14:28 +0000 |
---|---|---|
committer | Franklin Dsilva <franklin.dsilva@us.fujitsu.com> | 2020-02-20 05:14:40 +0000 |
commit | 1b4700191e39fcd7b40e8bd20270451d39d0c225 (patch) | |
tree | 4a7940b38902342e71cb3e8d8d392841aef00f50 | |
parent | 8bbe748d631353b8c48c7d71eb733cf85712884c (diff) |
Topology Discovery and optical-service DGs
to support MDONS usecase
Change-Id: I1c28e799cc83325e8913d17ee8b718b0a4160cb2
Issue-ID: SDNC-928
Signed-off-by: Franklin Dsilva <franklin.dsilva@us.fujitsu.com>
Former-commit-id: 6a42d5eee5d71870527c8a302308f3e49829a496
24 files changed, 4618 insertions, 356 deletions
diff --git a/installation/sdnc/pom.xml b/installation/sdnc/pom.xml index 3d8d14e4..0128aba9 100644 --- a/installation/sdnc/pom.xml +++ b/installation/sdnc/pom.xml @@ -47,8 +47,15 @@ <version>${sdnc.northbound.version}</version> <classifier>repo</classifier> <type>zip</type> + </dependency> + <dependency> + <groupId>org.onap.sdnc.northbound</groupId> + <artifactId>optical-service-installer</artifactId> + <version>${sdnc.northbound.version}</version> + <classifier>repo</classifier> + <type>zip</type> </dependency> - <dependency> + <dependency> <groupId>org.onap.sdnc.northbound</groupId> <artifactId>vnftools-installer</artifactId> <version>${sdnc.northbound.version}</version> diff --git a/installation/sdnc/src/main/resources/sdnctl.dump b/installation/sdnc/src/main/resources/sdnctl.dump index 47766661..2fc7bcff 100644 --- a/installation/sdnc/src/main/resources/sdnctl.dump +++ b/installation/sdnc/src/main/resources/sdnctl.dump @@ -1891,6 +1891,26 @@ CREATE TABLE `RANGE_RULE` ( /*!40101 SET character_set_client = @saved_cs_client */; -- +-- Table structure for table `REQUEST_DETAILS` +-- + +DROP TABLE IF EXISTS `REQUEST_DETAILS`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `REQUEST_DETAILS` ( + `request_id` varchar(255) NOT NULL, + `controller_id` varchar(255) DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `service_rate` varchar(255) DEFAULT NULL, + `service_instance_id` varchar(255) DEFAULT NULL, + `service_type` varchar(255) DEFAULT NULL, + `global_customer_id` varchar(255) DEFAULT NULL, + `notification_url` varchar(255) DEFAULT NULL, + PRIMARY KEY (`request_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- -- Table structure for table `REQUEST_PROGRESS` -- @@ -2421,6 +2441,26 @@ CREATE TABLE `TOPOLOGY_PARAMETER_TO_ENTRIES` ( /*!40101 SET character_set_client = @saved_cs_client */; -- +-- Table structure for table `TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE` +-- + +DROP TABLE IF EXISTS `TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE` ( + `interface_name` varchar(255) NOT NULL, + `interface_id` varchar(255) NOT NULL, + `pnf_name` varchar(255) NOT NULL, + `pnf_id` varchar(255) NOT NULL, + `controller_id` varchar(255) DEFAULT NULL, + `rate` varchar(255) DEFAULT NULL, + `clli` varchar(255) DEFAULT NULL, + `connection_point` varchar(255) DEFAULT NULL, + PRIMARY KEY (`interface_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- -- Table structure for table `TRANSACTION_LOG` -- diff --git a/installation/src/main/properties/optical-service-dg.properties b/installation/src/main/properties/optical-service-dg.properties new file mode 100644 index 00000000..c4a5b174 --- /dev/null +++ b/installation/src/main/properties/optical-service-dg.properties @@ -0,0 +1,18 @@ +restapi.templateDir=/opt/onap/sdnc/restapi/templates +controller.url=http://sdnc.onap:8282 +controller.user=admin +controller.pwd=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + + +#Templates +restapi.template.optical.service.create.filename=optical-service-create-msa.json +restapi.template.optical.service.delete.filename=optical-service-delete-msa.json +restapi.template.so.response.filename=async-response-so.json + +#URLS + +sdnc.async.url=/asyncNotification +so.username=sdncaBpmn +so.password=password1$ +tapi.cep.details.url=/cxf/tapi/v2/connectivities/service-interface-points?topology-id-or-name=otn&sip-id-or-name= +tapi.delete.service.url=/cxf/tapi/v2/connectivities/tapi-services?topology-id-or-name=otn&service-id-or-name= diff --git a/installation/src/main/properties/rpc-message-sliapi-execute-async.vt b/installation/src/main/properties/rpc-message-sliapi-execute-async.vt new file mode 100644 index 00000000..b47a6733 --- /dev/null +++ b/installation/src/main/properties/rpc-message-sliapi-execute-async.vt @@ -0,0 +1,10 @@ +{ + "input": { + "module-name": "optical-service", + "rpc-name": $rpc_name, + "mode": "sync", + "sli-parameter": $sli_parameters + } +} + + diff --git a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json index 7c2cc108..9b95dc5a 100644 --- a/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json +++ b/platform-logic/datachange/src/main/json/DataChange_esr-thirdparty-sdnc-discovery.json @@ -1,251 +1,251 @@ [
{
- "id": "41629315.bd4abc",
+ "id": "36e96ed4.41d832",
"type": "other",
"name": "update",
"xml": "<outcome value='Update'>\n",
"comments": "",
"outputs": 1,
- "x": 724.9999961853027,
- "y": 349.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 665.5,
+ "y": 329,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "9970355a.979a58"
+ "8acc6f21.be6fc8"
]
]
},
{
- "id": "bb11b779.ca75f8",
+ "id": "6f06aa61.f248ec",
"type": "other",
"name": "delete",
"xml": "<outcome value='delete'>\n",
"comments": "",
"outputs": 1,
- "x": 724.9999961853027,
- "y": 429.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 665.5,
+ "y": 409,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "7e0497f8.ddad68"
+ "a603632c.68bff"
]
]
},
{
- "id": "7e0497f8.ddad68",
+ "id": "a603632c.68bff",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 866.4999961853027,
- "y": 429.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 807,
+ "y": 409,
+ "z": "35b097d7.5fa018",
"wires": [
[]
]
},
{
- "id": "c60c87fa.e5d1a8",
+ "id": "68bed413.930adc",
"type": "comment",
"name": "TODO: Delete topology from AAI",
"info": "",
"comments": "",
- "x": 799.3335151672363,
- "y": 397.96898913383484,
- "z": "43e1d1ad.d6a8e",
+ "x": 739.8335189819336,
+ "y": 376.96899485588074,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "cb414b17.62b928",
+ "id": "50de7689.c1ed4",
"type": "switchNode",
"name": "switch aai-event-trigger",
"xml": "<switch test=\"`$data-change-notification-input.aai-event-trigger`\">\n",
"comments": "",
"outputs": 1,
- "x": 555.4999961853027,
- "y": 389.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 496,
+ "y": 369,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "41629315.bd4abc",
- "bb11b779.ca75f8"
+ "36e96ed4.41d832",
+ "6f06aa61.f248ec"
]
]
},
{
- "id": "5f482ccf.0ae764",
+ "id": "e12b7948.8a8be",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
- "x": 1252.4999961853027,
- "y": 260.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1193,
+ "y": 240,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "d220c063.b8e9a",
- "9a482a6d.6b7268",
- "97f2ea03.107968",
- "f06d5e7a.dcdff",
- "1b8d7ae8.41c4c5"
+ "484845a5.2238e4",
+ "4e058d3f.ebbc8c",
+ "19259d76.96fc3b",
+ "ac66ccfd.381a88",
+ "da47859b.4ec77"
]
]
},
{
- "id": "9a482a6d.6b7268",
+ "id": "4e058d3f.ebbc8c",
"type": "execute",
"name": "execute RestApiCallNode Get token",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
"comments": "",
"outputs": 1,
- "x": 1525.5001945495605,
- "y": 182.00000381469727,
- "z": "43e1d1ad.d6a8e",
+ "x": 1466.0001983642578,
+ "y": 161.00000953674316,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "6b4e87a7.382818",
- "8968e872.1395d8"
+ "916502a3.877388",
+ "e44e3e68.a49fd8"
]
]
},
{
- "id": "6b4e87a7.382818",
+ "id": "916502a3.877388",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 1815.0002403259277,
- "y": 173.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1755.500244140625,
+ "y": 153,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "abb4b716.9e6c48"
+ "a8c3cc1.f5d4bb"
]
]
},
{
- "id": "8968e872.1395d8",
+ "id": "e44e3e68.a49fd8",
"type": "failure",
"name": "failure",
"xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
- "x": 1811.0002403259277,
- "y": 213.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1751.500244140625,
+ "y": 193,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "570488eb.f03fc8"
+ "e40e8527.2ee67"
]
]
},
{
- "id": "abb4b716.9e6c48",
+ "id": "a8c3cc1.f5d4bb",
"type": "set",
"name": "set token-id",
"xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
"comments": "",
- "x": 1965.5002403259277,
- "y": 173.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1906.000244140625,
+ "y": 153,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "157313d5.db8b4c",
+ "id": "f1eb21a4.8d1378",
"type": "execute",
"name": "execute RestApiCallNode Get Topology",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"topology\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
"comments": "",
"outputs": 1,
- "x": 2032.5002403259277,
- "y": 293.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1973.000244140625,
+ "y": 273,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "33873b8b.c155b4",
- "ce710140.b905e"
+ "8660dd2a.bc5478",
+ "f7ff1324.a58c28"
]
]
},
{
- "id": "33873b8b.c155b4",
+ "id": "8660dd2a.bc5478",
"type": "success",
"name": "success",
"xml": "<outcome value='success'>\n",
"comments": "",
"outputs": 1,
- "x": 2275.0002403259277,
- "y": 313.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 2215.500244140625,
+ "y": 293,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "e5513b6e.ef8ac8"
+ "73cb768c.3647e"
]
]
},
{
- "id": "e5513b6e.ef8ac8",
+ "id": "73cb768c.3647e",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"comments": "",
"outputs": 1,
- "x": 2432.5002403259277,
- "y": 313.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 2373.000244140625,
+ "y": 293,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "5d082e27.1f397"
+ "92b164bb.975a38"
]
]
},
{
- "id": "528cf13c.0c237",
+ "id": "33371bb9.421c84",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n <parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing Create vpn rest api\" />\n",
"comments": "",
- "x": 2409.0002403259277,
- "y": 213.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 2349.500244140625,
+ "y": 193,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "ce710140.b905e",
+ "id": "f7ff1324.a58c28",
"type": "failure",
"name": "failure",
"xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
- "x": 2271.0002403259277,
- "y": 213.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 2211.500244140625,
+ "y": 193,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "528cf13c.0c237"
+ "33371bb9.421c84"
]
]
},
{
- "id": "e8420532.df1058",
+ "id": "ea734627.c2c7d8",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
- "x": 124.99999618530273,
- "y": 124.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 118.5,
+ "y": 104,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "8ccfff99.445d6"
+ "89ca9d8b.bbc328"
]
]
},
{
- "id": "8ccfff99.445d6",
+ "id": "89ca9d8b.bbc328",
"type": "service-logic",
"name": "DataChange ${project.version}",
"module": "DataChange",
@@ -253,385 +253,676 @@ "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='DataChange' version='${project.version}'>",
"outputs": 1,
- "x": 190.99999618530273,
- "y": 184.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 131.5,
+ "y": 164,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "9ae5c632.b6f538"
+ "789b0d9d.02f75c"
]
]
},
{
- "id": "9ae5c632.b6f538",
+ "id": "789b0d9d.02f75c",
"type": "method",
"name": "method esr-thirdparty-sdnc-discovery",
"xml": "<method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>\n",
"comments": "",
"outputs": 1,
- "x": 210.99999618530273,
- "y": 264.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 151.5,
+ "y": 244,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "12028600.fb215a"
+ "19dd5973.ca5fbf"
]
]
},
{
- "id": "12028600.fb215a",
+ "id": "19dd5973.ca5fbf",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 458.49999618530273,
- "y": 264.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 399,
+ "y": 244,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "807f3d.fff210c"
+ "72476c1.b3cb514"
]
]
},
{
- "id": "5d082e27.1f397",
+ "id": "92b164bb.975a38",
"type": "for",
"name": "for each Network",
"xml": "<for index='nidx' start='0' end='`$topology.networks.network_length`' >\n",
"comments": "",
"outputs": 1,
- "x": 1858.5002555847168,
- "y": 413.00000953674316,
- "z": "43e1d1ad.d6a8e",
+ "x": 1799.000259399414,
+ "y": 392.00001525878906,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "e62b44ce.a0e368"
+ "a33c6916.e2063"
]
]
},
{
- "id": "e62b44ce.a0e368",
+ "id": "a33c6916.e2063",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 2007.0002555847168,
- "y": 413.00000953674316,
- "z": "43e1d1ad.d6a8e",
+ "x": 1947.500259399414,
+ "y": 392.00001525878906,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "69d3f3bb.60d83c",
- "4e20c7e0.4989a8"
+ "70a92c18.3741ec",
+ "6196a44a.543cec"
]
]
},
{
- "id": "69d3f3bb.60d83c",
+ "id": "70a92c18.3741ec",
"type": "call",
"name": "call update-network-to-aai",
"xml": "<call module='DataChange' rpc='update-network-to-aai' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 2186.000255584717,
- "y": 433.00000953674316,
- "z": "43e1d1ad.d6a8e",
+ "x": 2126.500259399414,
+ "y": 412.00001525878906,
+ "z": "35b097d7.5fa018",
"wires": [
[]
]
},
{
- "id": "4e20c7e0.4989a8",
+ "id": "6196a44a.543cec",
"type": "set",
"name": "set network",
"xml": "<set>\n<parameter name='network.' value='`$topology.networks.network[$nidx].`' />\n",
"comments": "",
- "x": 2141.000255584717,
- "y": 393.00000953674316,
- "z": "43e1d1ad.d6a8e",
+ "x": 2081.500259399414,
+ "y": 372.00001525878906,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "570488eb.f03fc8",
+ "id": "e40e8527.2ee67",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 1931.0002403259277,
- "y": 213.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1871.500244140625,
+ "y": 193,
+ "z": "35b097d7.5fa018",
"wires": [
[]
]
},
{
- "id": "8485b334.0774f",
+ "id": "984ef742.f7de98",
"type": "comment",
"name": "Do Nothing",
"info": "",
"comments": "",
- "x": 2101.0002403259277,
- "y": 253.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 2041.500244140625,
+ "y": 233,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "4662cdd1.b4f8a4",
+ "id": "4308651d.5eb474",
"type": "switchNode",
"name": "switch type",
"xml": "<switch test=\"`$prop.sdncRestApi.type`\">\n",
"comments": "",
"outputs": 1,
- "x": 977.9999961853027,
- "y": 349.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 918.5,
+ "y": 329,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "c4659524.ddaee8",
- "b8841114.e40fb"
+ "98c19260.813238",
+ "3ccd2719.ec5e88",
+ "c0dd9c59.c4eff8",
+ "4451a4e9.723244"
]
]
},
{
- "id": "9970355a.979a58",
+ "id": "8acc6f21.be6fc8",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
- "x": 844.9999961853027,
- "y": 349.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 785.5,
+ "y": 329,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "4662cdd1.b4f8a4"
+ "4308651d.5eb474"
]
]
},
{
- "id": "c4659524.ddaee8",
+ "id": "98c19260.813238",
"type": "other",
"name": "SOTN",
"xml": "<outcome value='SOTN'>\n",
"comments": "",
"outputs": 1,
- "x": 1090.9999961853027,
- "y": 260.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1031.5,
+ "y": 240,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "5f482ccf.0ae764"
+ "e12b7948.8a8be"
]
]
},
{
- "id": "b8841114.e40fb",
+ "id": "3ccd2719.ec5e88",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1106.0000038146973,
- "y": 500.00002670288086,
- "z": "43e1d1ad.d6a8e",
+ "x": 1033.500087738037,
+ "y": 789.0001106262207,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "3b070a5d.7f8e96"
+ "f4c76776.724b28"
]
]
},
{
- "id": "3b070a5d.7f8e96",
+ "id": "f4c76776.724b28",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'Unsupported type = ' + $prop.sdncRestApi.type`\" />\n\n",
"comments": "",
- "x": 1284.0000038146973,
- "y": 500.00002670288086,
- "z": "43e1d1ad.d6a8e",
+ "x": 1183.5000610351562,
+ "y": 785.0000972747803,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "d220c063.b8e9a",
+ "id": "484845a5.2238e4",
"type": "execute",
"name": "execute Properties",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n",
"comments": "",
"outputs": 1,
- "x": 1472.0001945495605,
- "y": 142.00000381469727,
- "z": "43e1d1ad.d6a8e",
+ "x": 1412.5001983642578,
+ "y": 121.00000953674316,
+ "z": "35b097d7.5fa018",
"wires": [
[]
]
},
{
- "id": "97f2ea03.107968",
+ "id": "19259d76.96fc3b",
"type": "switchNode",
"name": "switch prop.sdncRestApi.token_id",
"xml": "<switch test=\"`$prop.sdncRestApi.token_id`\">\n",
"comments": "",
"outputs": 1,
- "x": 1518.5001945495605,
- "y": 262.00000381469727,
- "z": "43e1d1ad.d6a8e",
+ "x": 1459.0001983642578,
+ "y": 241.00000953674316,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "a5358ccb.9e8dd",
- "7f5cb122.be2df"
+ "2313a899.da913",
+ "531d5829.4a09a8"
]
]
},
{
- "id": "a5358ccb.9e8dd",
+ "id": "2313a899.da913",
"type": "other",
"name": "Null",
"xml": "<outcome value=''>\n",
"comments": "",
"outputs": 1,
- "x": 1811.0002403259277,
- "y": 253.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1751.500244140625,
+ "y": 233,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "ef0365d3.97ff38"
+ "c60b8cf4.53a21"
]
]
},
{
- "id": "7f5cb122.be2df",
+ "id": "531d5829.4a09a8",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
- "x": 1811.0002403259277,
- "y": 293.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1751.500244140625,
+ "y": 273,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "157313d5.db8b4c"
+ "f1eb21a4.8d1378"
]
]
},
{
- "id": "ef0365d3.97ff38",
+ "id": "c60b8cf4.53a21",
"type": "execute",
"name": "execute RestApiCallNode Get Topology",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"topology\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n",
"comments": "",
"outputs": 1,
- "x": 2032.5002403259277,
- "y": 253.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 1973.000244140625,
+ "y": 233,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "ce710140.b905e",
- "33873b8b.c155b4"
+ "f7ff1324.a58c28",
+ "8660dd2a.bc5478"
]
]
},
{
- "id": "1b8d7ae8.41c4c5",
+ "id": "da47859b.4ec77",
"type": "execute",
"name": "execute RestconfDiscoveryNode",
"xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode' method='establishSubscription' >\n<parameter name=\"subscriberId\" value=\"sotn-controller\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"sseConnectURL\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`\" />\n<parameter name=\"dirPath\" value=\"/opt/sdnc/restconfapi/yang/notification\" />\n<parameter name=\"format\" value=\"json\" />\n<parameter name=\"httpMethod\" value=\"post\" />\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />\n<parameter name=\"module\" value=\"DataChange\" />\n<parameter name=\"rpc\" value=\"sotn-notification-handler\" />\n<parameter name=\"mode\" value=\"sync\" />",
"comments": "",
"outputs": 1,
- "x": 1517.0001525878906,
- "y": 400.9999828338623,
- "z": "43e1d1ad.d6a8e",
+ "x": 1455.5001983642578,
+ "y": 381.00000953674316,
+ "z": "35b097d7.5fa018",
"wires": [
[]
]
},
{
- "id": "f06d5e7a.dcdff",
+ "id": "ac66ccfd.381a88",
"type": "set",
"name": "set encoding-format",
- "xml": "<set>\n<parameter name='ietf-subscribed-notifications_establish-subscription.input.encoding' value=\"encode-json\" />",
+ "xml": "<set>\n<parameter name='input' value='ietf-subscribed-notifications:establish-subscription.input.' />\n<parameter name=\"`$input + 'encoding'`\" value=\"encode-json\" />",
"comments": "",
- "x": 1475.0001945495605,
- "y": 362.00000381469727,
- "z": "43e1d1ad.d6a8e",
+ "x": 1415.5001983642578,
+ "y": 341.00000953674316,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "971a117b.a06b9",
+ "id": "fa1a511.33260b",
"type": "comment",
"name": "Notification subscription",
"info": "",
"comments": "",
- "x": 1480.0003395080566,
- "y": 319.00000286102295,
- "z": "43e1d1ad.d6a8e",
+ "x": 1420.500343322754,
+ "y": 298.00000858306885,
+ "z": "35b097d7.5fa018",
"wires": []
},
{
- "id": "807f3d.fff210c",
+ "id": "72476c1.b3cb514",
"type": "switchNode",
"name": "switch",
"xml": "<switch test=\"`$prop.sdncRestApi.vendor == 'ZTE'`\">\n",
"comments": "",
"outputs": 1,
- "x": 164.99999618530273,
- "y": 389.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 105.5,
+ "y": 369,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "1b70ca9c.7c9985",
- "c9877e2e.2d6a5"
+ "7ff38366.3f2f34",
+ "18555fe6.542308"
]
]
},
{
- "id": "1b70ca9c.7c9985",
+ "id": "7ff38366.3f2f34",
"type": "outcomeFalse",
"name": "false",
"xml": "<outcome value='false'>\n",
"comments": "",
"outputs": 1,
- "x": 351.99999618530273,
- "y": 389.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 292.5,
+ "y": 369,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "cb414b17.62b928"
+ "50de7689.c1ed4"
]
]
},
{
- "id": "c9877e2e.2d6a5",
+ "id": "18555fe6.542308",
"type": "outcomeTrue",
"name": "true",
"xml": "<outcome value='true'>\n",
"comments": "",
"outputs": 1,
- "x": 352.99999618530273,
- "y": 514.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 293.5,
+ "y": 494,
+ "z": "35b097d7.5fa018",
"wires": [
[
- "66b25f6e.ea9c2"
+ "46364a8c.43d47c"
]
]
},
{
- "id": "66b25f6e.ea9c2",
+ "id": "46364a8c.43d47c",
"type": "call",
"name": "call esr-thirdparty-sdnc-of-zte",
"xml": "<call module='DataChange' rpc='esr-thirdparty-sdnc-of-zte' mode='sync' >\n",
"comments": "",
"outputs": 1,
- "x": 575.9999961853027,
- "y": 514.9999942779541,
- "z": "43e1d1ad.d6a8e",
+ "x": 516.5,
+ "y": 494,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "c0dd9c59.c4eff8",
+ "type": "other",
+ "name": "TAPI",
+ "xml": "<outcome value='TAPI'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1109.5,
+ "y": 474,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "b4761a0a.e9187"
+ ]
+ ]
+ },
+ {
+ "id": "b4761a0a.e9187",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1272.5,
+ "y": 473,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "5f4972dc.a8c76c"
+ ]
+ ]
+ },
+ {
+ "id": "5f4972dc.a8c76c",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/tapi/v2/topologies?topology-id-or-name=otn'`\"/> \n <parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\"/> \n <parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\"/> \n <parameter name=\"format\" value=\"json\"/> \n <parameter name=\"httpMethod\" value=\"get\"/> \n <parameter name=\"responsePrefix\" value=\"topologies\"/>\n <parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.tapi.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": 1433.5,
+ "y": 472,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "cef3a525.157f48",
+ "aa2154d5.57633"
+ ]
+ ]
+ },
+ {
+ "id": "aa2154d5.57633",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1575.5,
+ "y": 548,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "80d535c0.0a3eb"
+ ]
+ ]
+ },
+ {
+ "id": "cef3a525.157f48",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1609.5,
+ "y": 469,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "9d726edf.4a00d"
+ ]
+ ]
+ },
+ {
+ "id": "9d726edf.4a00d",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n <parameter name='ack-final' value='Y'/>\n <parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing get topology TAPI rest api\" />\n\n",
+ "comments": "",
+ "x": 1779.5,
+ "y": 468,
+ "z": "35b097d7.5fa018",
+ "wires": []
+ },
+ {
+ "id": "80d535c0.0a3eb",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1736.5,
+ "y": 547,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "73db98e4.daca9"
+ ]
+ ]
+ },
+ {
+ "id": "73db98e4.daca9",
+ "type": "for",
+ "name": "for each topology",
+ "xml": "<for index='tidx' start='0' end=\"`$topologies.topology_length`\" >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1915.5,
+ "y": 547,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "d273e3f9.ce07"
+ ]
+ ]
+ },
+ {
+ "id": "d273e3f9.ce07",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 2082.5,
+ "y": 548,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "e1c04d4.8fe4cb",
+ "3d2b44f0.5e96ec"
+ ]
+ ]
+ },
+ {
+ "id": "e1c04d4.8fe4cb",
+ "type": "set",
+ "name": "set topology",
+ "xml": "<set>\n<parameter name='topology.' value='`$topologies.topology[$tidx].`' />\n",
+ "comments": "",
+ "x": 2241.5,
+ "y": 549,
+ "z": "35b097d7.5fa018",
+ "wires": []
+ },
+ {
+ "id": "3d2b44f0.5e96ec",
+ "type": "call",
+ "name": "call tapi-update-network-to-aai",
+ "xml": "<call module='DataChange' rpc='tapi-update-network-to-aai' mode='sync' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2232.5,
+ "y": 615,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4451a4e9.723244",
+ "type": "outcome",
+ "name": "MSA",
+ "xml": "<outcome value='MSA'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1080.177324295044,
+ "y": 630.8993349075317,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "fe364eaa.3f7b08"
+ ]
+ ]
+ },
+ {
+ "id": "fe364eaa.3f7b08",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1242.1773872375488,
+ "y": 628.899335861206,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "3e697d7a.72d032"
+ ]
+ ]
+ },
+ {
+ "id": "3e697d7a.72d032",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/openroadm/v2/networks/otn-topology'`\"/> \n <parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\"/> \n <parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\"/> \n <parameter name=\"format\" value=\"json\"/> \n <parameter name=\"httpMethod\" value=\"get\"/> \n <parameter name=\"responsePrefix\" value=\"networks\"/>\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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1419.1771354675293,
+ "y": 620.8992919921875,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "65bb501c.2cef98",
+ "d2559ee1.0d8548"
+ ]
+ ]
+ },
+ {
+ "id": "65bb501c.2cef98",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1572.1771354675293,
+ "y": 617.8992919921875,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "6d2f6447.367f94"
+ ]
+ ]
+ },
+ {
+ "id": "6d2f6447.367f94",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n <parameter name='ack-final' value='Y'/>\n <parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"Error executing get topology MSA rest api\" />\n\n",
+ "comments": "",
+ "x": 1747.1771354675293,
+ "y": 616.8992919921875,
+ "z": "35b097d7.5fa018",
+ "wires": []
+ },
+ {
+ "id": "d2559ee1.0d8548",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1578.1771354675293,
+ "y": 690.8992919921875,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "81b6558e.8743c"
+ ]
+ ]
+ },
+ {
+ "id": "81b6558e.8743c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic=\"true\">",
+ "atomic": "true",
+ "outputs": 1,
+ "x": 1762.1771354675293,
+ "y": 692.8992919921875,
+ "z": "35b097d7.5fa018",
+ "wires": [
+ [
+ "4139e8ab.39b6d8"
+ ]
+ ]
+ },
+ {
+ "id": "4139e8ab.39b6d8",
+ "type": "call",
+ "name": "call msa-update-network-to-aai",
+ "xml": "<call module='DataChange' rpc='msa-update-network-to-aai' mode='sync' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2041.177001953125,
+ "y": 690.8992919921875,
+ "z": "35b097d7.5fa018",
"wires": [
[]
]
diff --git a/platform-logic/datachange/src/main/json/DataChange_msa-update-network-to-aai.json b/platform-logic/datachange/src/main/json/DataChange_msa-update-network-to-aai.json new file mode 100644 index 00000000..1dd336e8 --- /dev/null +++ b/platform-logic/datachange/src/main/json/DataChange_msa-update-network-to-aai.json @@ -0,0 +1,904 @@ +[
+ {
+ "id": "8b4dcfe.e866f3",
+ "type": "service-logic",
+ "name": "DataChange ${project.version}",
+ "module": "DataChange",
+ "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='DataChange' version='${project.version}'>",
+ "outputs": 1,
+ "x": 401,
+ "y": 62,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "adc1d56c.b72ff"
+ ]
+ ]
+ },
+ {
+ "id": "adc1d56c.b72ff",
+ "type": "method",
+ "name": "method msa-update-network-to-aai",
+ "xml": "<method rpc='msa-update-network-to-aai' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 144,
+ "y": 136,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "106658a8.d884c7"
+ ]
+ ]
+ },
+ {
+ "id": "106658a8.d884c7",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 382.00003814697266,
+ "y": 136.00001335144043,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "4b7c5962.7cf4f8"
+ ]
+ ]
+ },
+ {
+ "id": "8e1c9818.33b57",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 123,
+ "y": 64,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "8b4dcfe.e866f3"
+ ]
+ ]
+ },
+ {
+ "id": "4b7c5962.7cf4f8",
+ "type": "switchNode",
+ "name": "switch network-id",
+ "xml": "<switch test=\"`$networks.network-id`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 178.5104522705078,
+ "y": 247.0000114440918,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "b84da364.adfac",
+ "3a113c69.68266c"
+ ]
+ ]
+ },
+ {
+ "id": "b84da364.adfac",
+ "type": "other",
+ "name": "other: Do Nothing",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 443.5104064941406,
+ "y": 469.99993896484375,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3a113c69.68266c",
+ "type": "outcome",
+ "name": "otn-topology",
+ "xml": "<outcome value='otn-topology'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 410,
+ "y": 247,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "5112d334.33a61c"
+ ]
+ ]
+ },
+ {
+ "id": "5112d334.33a61c",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 605,
+ "y": 247,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "4a7e5696.0715b",
+ "d2e8624a.31b89",
+ "22d90846.8bc5b8",
+ "6c4d9e05.4fa72",
+ "1587342a.1379dc"
+ ]
+ ]
+ },
+ {
+ "id": "4a7e5696.0715b",
+ "type": "save",
+ "name": "save network-resource",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='network-resource' \n key='network-resource.network-id = $networks.network-id' >\n<parameter name='network-id' value='`$networks.network-id`' />\n<parameter name='network-type' value='`$networks.network-types`' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 897,
+ "y": 100,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d2e8624a.31b89",
+ "type": "save",
+ "name": "save network-resource relation with esr-thirdparty-sdnc",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list' \n key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/network-resources/network-resource/' + $networks.network-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-resource.network-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$networks.network-id`\" />",
+ "comments": "",
+ "outputs": 1,
+ "x": 987,
+ "y": 159,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "22d90846.8bc5b8",
+ "type": "for",
+ "name": "for each node",
+ "xml": "<for index='nidx' start='0' end='`$networks.node_length`' >\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 831,
+ "y": 301,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "f56585e4.72bcc",
+ "b3dc81c8.6f70f8"
+ ]
+ ]
+ },
+ {
+ "id": "f56585e4.72bcc",
+ "type": "set",
+ "name": "set node",
+ "xml": "<set>\n<parameter name='node.' value='`$networks.node[$nidx].`' />\n",
+ "comments": "",
+ "x": 1013,
+ "y": 300,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "b3dc81c8.6f70f8",
+ "type": "switchNode",
+ "name": "switch node-type",
+ "xml": "<switch test=\"`$node.node-type`\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1034,
+ "y": 400,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "ac532b61.57fca8",
+ "a021c2b4.589bc"
+ ]
+ ]
+ },
+ {
+ "id": "ac532b61.57fca8",
+ "type": "outcome",
+ "name": "SWITCH",
+ "xml": "<outcome value='SWITCH'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1219,
+ "y": 401,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "8591e2ec.94b2d8"
+ ]
+ ]
+ },
+ {
+ "id": "a021c2b4.589bc",
+ "type": "other",
+ "name": "other : Do Nothing",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1262,
+ "y": 524,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "8591e2ec.94b2d8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1390,
+ "y": 402,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "8d6438ce.9a465",
+ "7c327396.cf8004",
+ "92a0366b.9648d8",
+ "506cbe9f.0da148",
+ "9a96883c.2c0c6",
+ "76be62e9.bf594c"
+ ]
+ ]
+ },
+ {
+ "id": "8d6438ce.9a465",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"pnfname\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1569,
+ "y": 194,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "7c327396.cf8004",
+ "type": "save",
+ "name": "save pnf details to AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'\nkey='pnf.pnf-name = $pnfname' >\n <parameter name='pnf-name' value='`$pnfname`' />\n <parameter name='pnf-id' value='`$node.node-id`' />\n <parameter name='operational-status' value='`$node.node-status`' />\n <parameter name='in-maint' value='true' />\n <parameter name='equip-type' value='`$node.node-type`' />\n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1624,
+ "y": 250,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "92a0366b.9648d8",
+ "type": "save",
+ "name": "save pnf relationship to network-resource in AAI",
+ "xml": "\n<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n key='pnf.pnf-name = $pnfname' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/network-resources/network-resource/' + $networks.network-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-resource.network-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$networks.network-id`\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1727,
+ "y": 314,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "506cbe9f.0da148",
+ "type": "for",
+ "name": "for each termination point",
+ "xml": "<for index='tpidx' start='0' end='`$node.termination-point_length`' >\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1595,
+ "y": 575,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "a9a91cea.c7d998",
+ "3e218bee.5222ec",
+ "763d8580.7328c4",
+ "a8ff331a.025d",
+ "8e2b2ac1.d11b2",
+ "6bb4981.68f2ee8",
+ "9bf5664b.07737"
+ ]
+ ]
+ },
+ {
+ "id": "a9a91cea.c7d998",
+ "type": "set",
+ "name": "set termination point",
+ "xml": "<set>\n<parameter name='tp.' value='`$node.termination-point[$tpidx].`' />\n",
+ "comments": "",
+ "x": 1865,
+ "y": 606,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "a8ff331a.025d",
+ "type": "save",
+ "name": "save p-interface to AAI",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n key='pnf.pnf-name = $pnfname\n AND p-interface.interface-name = $interfaceName' > \n<parameter name='interface-name' value='`$interfaceName`' />\n<parameter name='port-description' value='`$tp.tp-id`' />\n<parameter name='network-ref' value='`$tp.network-ref`' />\n<parameter name='interface-type' value='`$tp.tp-type`' />\n<parameter name='in-maint' value=\"true\" />\n<parameter name='network-interface-type' value='`$network-interface-type`' />\n<parameter name='speed-units' value=\"Gbps\" />\n<parameter name='speed-value' value='100' />\n<parameter name='available-capacity' value='100' />\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1862,
+ "y": 814,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "763d8580.7328c4",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"interfaceName\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1839,
+ "y": 752,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3e218bee.5222ec",
+ "type": "switchNode",
+ "name": "switch tp-type",
+ "xml": "<switch test=\"`$tp.tp-type`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1852,
+ "y": 674,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "88cb4971.2e8588",
+ "43b07fb6.69d3f",
+ "818ba69d.e74cf8"
+ ]
+ ]
+ },
+ {
+ "id": "88cb4971.2e8588",
+ "type": "outcome",
+ "name": "XPONDER-NETWORK",
+ "xml": "<outcome value='XPONDER-NETWORK'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2090,
+ "y": 630,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "4bf140e7.df7828"
+ ]
+ ]
+ },
+ {
+ "id": "43b07fb6.69d3f",
+ "type": "outcome",
+ "name": "XPONDER-CLIENT",
+ "xml": "<outcome value='XPONDER-CLIENT'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2080,
+ "y": 707,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "d2a50717.2a1d9"
+ ]
+ ]
+ },
+ {
+ "id": "818ba69d.e74cf8",
+ "type": "other",
+ "name": "other : Do Nothing",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 2090,
+ "y": 780,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6c4d9e05.4fa72",
+ "type": "for",
+ "name": "for each link",
+ "xml": "<for index='lidx' start='0' end='`$networks.link_length`' >\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 792,
+ "y": 575,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "575b0050.f3102",
+ "f4b57e4d.f91c18"
+ ]
+ ]
+ },
+ {
+ "id": "575b0050.f3102",
+ "type": "set",
+ "name": "set link",
+ "xml": "<set>\n<parameter name='link.' value='`$networks.link[$lidx].`' />\n",
+ "comments": "",
+ "x": 987,
+ "y": 521,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "f4b57e4d.f91c18",
+ "type": "switchNode",
+ "name": "switch link-type",
+ "xml": "<switch test=\"`$link.link-type`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 954,
+ "y": 661,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "c7be7986.f3d7",
+ "b81cc555.59f47"
+ ]
+ ]
+ },
+ {
+ "id": "c7be7986.f3d7",
+ "type": "outcome",
+ "name": "OTN-LINK",
+ "xml": "<outcome value='OTN-LINK'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1167,
+ "y": 657,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "b99bdbf4.fe7ab8"
+ ]
+ ]
+ },
+ {
+ "id": "b81cc555.59f47",
+ "type": "other",
+ "name": "other : Do Nothing",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1119,
+ "y": 761,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "b99bdbf4.fe7ab8",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1168,
+ "y": 1158,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "eb78e1a4.f6c888",
+ "9c6cd27.ce7a0b",
+ "8d15fb9d.87f2c8",
+ "df343460.1e46a",
+ "d885100b.8f343",
+ "3c142cb3.61690c",
+ "14cce7fe.30486",
+ "4284a26f.1ce334"
+ ]
+ ]
+ },
+ {
+ "id": "eb78e1a4.f6c888",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$link.link-id`\"/>\n <parameter name=\"outputPath\" value=\"tmp.link-id\"/>\n <parameter name=\"target\" value=\"#\"/>\n <parameter name=\"replacement\" value=\"_\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1428,
+ "y": 1017,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9c6cd27.ce7a0b",
+ "type": "save",
+ "name": "save logical-link details to AAI",
+ "xml": "<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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1517,
+ "y": 1157,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4bf140e7.df7828",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 2304,
+ "y": 631,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "dd7793ee.4f994"
+ ]
+ ]
+ },
+ {
+ "id": "d2a50717.2a1d9",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 2291,
+ "y": 710,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "765312cb.e91374"
+ ]
+ ]
+ },
+ {
+ "id": "dd7793ee.4f994",
+ "type": "set",
+ "name": "set network-interface-type as NNI",
+ "xml": "<set>\n<parameter name='network-interface-type' value='NNI' />\n",
+ "comments": "",
+ "x": 2545,
+ "y": 630,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "765312cb.e91374",
+ "type": "set",
+ "name": "set network-interface-type as UNI",
+ "xml": "<set>\n<parameter name='network-interface-type' value='UNI' />\n",
+ "comments": "",
+ "x": 2548,
+ "y": 708,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "8e2b2ac1.d11b2",
+ "type": "set",
+ "name": "set speed-value as null",
+ "xml": "<set>\n<parameter name='speed-value' value='' />\n<parameter name='available-capacity' value='' />\n<parameter name='network-interface-type' value='' />\n",
+ "comments": "",
+ "x": 1874,
+ "y": 523,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "8d15fb9d.87f2c8",
+ "type": "set",
+ "name": "set link-parameters",
+ "xml": "<set>\n<parameter name='interface1' value=\"`$link.source.source-tp`\" />\n<parameter name='interface2' value=\"`$link.destination.dest-tp`\" />\n<parameter name='pnf1' value=\"`$link.source.source-node`\" />\n<parameter name='pnf2' value=\"`$link.destination.dest-node`\" />\n",
+ "comments": "",
+ "x": 1489,
+ "y": 1066,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "df343460.1e46a",
+ "type": "save",
+ "name": "save logical-link relationship to p-interface",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list' \n key='logical-link.link-name = $tmp.link-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/' + $pnfname1 + '/p-interfaces/p-interface/' + $pinterface1 `\" />\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=\"`$pnfname1`\" /> \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/' + $pnfname2 + '/p-interfaces/p-interface/' + $pinterface2 `\" />\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=\"`$pnfname2`\" /> ",
+ "comments": "",
+ "outputs": 1,
+ "x": 1500,
+ "y": 1528,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "6bb4981.68f2ee8",
+ "type": "save",
+ "name": "save pnf & p-interface in DB",
+ "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource\" resource=\"SQL\" key=\"INSERT INTO TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE VALUES ( $interfaceName , $tp.tp-id , $pnfname , $node.node-id , '100' , $clli , null );\">\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1788,
+ "y": 998,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "d885100b.8f343",
+ "type": "get-resource",
+ "name": "get source pnf-name and interface-name UUID from DB",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL' \nkey='SELECT pnf_name, interface_name \nfrom TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE \nWHERE pnf_id = $link.source.source-node\nAND interface_id = $link.source.source-tp' \npfx='db.source'>\n \n \n \n \n \n \n \n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1613,
+ "y": 1308,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "4c55d475.77aecc"
+ ]
+ ]
+ },
+ {
+ "id": "3c142cb3.61690c",
+ "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/svclogic.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"print direct name\"/>\n<parameter name=\"field2\" value=\"`$pnfname1`\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1468,
+ "y": 1366,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4c55d475.77aecc",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1931,
+ "y": 1312,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "2acd3a80.9f5afe"
+ ]
+ ]
+ },
+ {
+ "id": "2acd3a80.9f5afe",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='pnfname1' value='`$db.source.pnf-name`' />\n<parameter name='pinterface1' value='`$db.source.interface-name`' />\n\n\n\n\n\n",
+ "comments": "",
+ "x": 2085,
+ "y": 1304,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "14cce7fe.30486",
+ "type": "get-resource",
+ "name": "get destination pnf-name and interface-name UUID from DB",
+ "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL' \nkey='SELECT pnf_name, interface_name \nfrom TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE \nWHERE pnf_id = $link.destination.dest-node\nAND interface_id = $link.destination.dest-tp' \npfx='db1.destination'>\n \n \n \n \n \n \n \n \n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1584,
+ "y": 1443,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "2b2056ba.68c06a"
+ ]
+ ]
+ },
+ {
+ "id": "2b2056ba.68c06a",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1917,
+ "y": 1436,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "190b0926.27e49f"
+ ]
+ ]
+ },
+ {
+ "id": "190b0926.27e49f",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='pnfname2' value='`$db1.destination.pnf-name`' />\n<parameter name='pinterface2' value='`$db1.destination.interface-name`' />\n\n\n\n\n\n",
+ "comments": "",
+ "x": 2077,
+ "y": 1438,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "4284a26f.1ce334",
+ "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\n<parameter name=\"field1\" value=\"`$pnf1`\"/>\n<parameter name=\"field2\" value=\"`$interface1`\"/>\n<parameter name=\"field3\" value=\"`$pnf2`\"/>\n<parameter name=\"field4\" value=\"`$interface2`\"/>\n\n\n\n\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1459,
+ "y": 1109,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9a96883c.2c0c6",
+ "type": "execute",
+ "name": "split node-id",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$node.node-id`'/>\n<parameter name=\"regex\" value=\"-\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix1\"/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1627,
+ "y": 370,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "76be62e9.bf594c",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/openroadm/v2/networks/openroadm-network/nodes/' + $param-prefix1[0]`\"/> \n <parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\"/> \n <parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\"/> \n <parameter name=\"format\" value=\"json\"/> \n <parameter name=\"httpMethod\" value=\"get\"/> \n <parameter name=\"responsePrefix\" value=\"cllires\"/>\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",
+ "comments": "",
+ "outputs": 1,
+ "x": 1626,
+ "y": 429,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "c6fee13e.a22228",
+ "4241c0e7.e68e5"
+ ]
+ ]
+ },
+ {
+ "id": "b707b093.cd8c68",
+ "type": "block",
+ "name": "block : atomic",
+ "xml": "<block atomic='true'>",
+ "atomic": "true",
+ "comments": "",
+ "outputs": 1,
+ "x": 1941,
+ "y": 444,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "bfdcc473.e8754"
+ ]
+ ]
+ },
+ {
+ "id": "bfdcc473.e8754",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='clli' value='`$cllires.supporting-node[0].node-ref`' />\n",
+ "comments": "",
+ "x": 2123,
+ "y": 439,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ },
+ {
+ "id": "4241c0e7.e68e5",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1804,
+ "y": 376,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "8f6ab8.a5f3cd48"
+ ]
+ ]
+ },
+ {
+ "id": "c6fee13e.a22228",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1770,
+ "y": 445,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ [
+ "b707b093.cd8c68"
+ ]
+ ]
+ },
+ {
+ "id": "8f6ab8.a5f3cd48",
+ "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-delete.log\" />\n<parameter name=\"level\" value=\"info\" />\n<parameter name=\"field1\" value=\"Getting clli failed\"/>\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1945,
+ "y": 370,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "9bf5664b.07737",
+ "type": "save",
+ "name": "save",
+ "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='custom-query' \n key=\"format='resource'\"\n force=\"true\"\n local-only=\"false\"\n pfx=\"data\"> \n<parameter name='interface-name' value='`$interfaceName`' />\n<parameter name='port-description' value='`$tp.tp-id`' />",
+ "comments": "",
+ "outputs": 1,
+ "x": 1803.5,
+ "y": 886,
+ "z": "d8656b08.07aab8",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1587342a.1379dc",
+ "type": "set",
+ "name": "set controller_id",
+ "xml": "<set>\n<parameter name='controller_id' value=\"`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url`\" />\n\n\n\n",
+ "comments": "",
+ "x": 860,
+ "y": 218,
+ "z": "d8656b08.07aab8",
+ "wires": []
+ }
+]
\ No newline at end of file diff --git a/platform-logic/datachange/src/main/resources/graph.versions b/platform-logic/datachange/src/main/resources/graph.versions index 1901fd05..53a1d02a 100644 --- a/platform-logic/datachange/src/main/resources/graph.versions +++ b/platform-logic/datachange/src/main/resources/graph.versions @@ -5,3 +5,4 @@ DataChange validate-esr-thirdparty-sdnc-input ${project.version} sync DataChange esr-thirdparty-sdnc-discovery ${project.version} sync DataChange esr-thirdparty-sdnc-discovery-of-zte ${project.version} sync DataChange update-network-to-aai ${project.version} sync +DataChange msa-update-network-to-aai ${project.version} sync diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml index f6cd4d19..c90a5cb2 100644 --- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml +++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml @@ -1,148 +1,214 @@ -<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="DataChange" version="${project.version}">
- <method rpc="esr-thirdparty-sdnc-discovery" mode="sync">
- <block atomic="true">
- <switch test="`$prop.sdncRestApi.vendor == 'ZTE'`">
- <outcome value="false">
- <switch test="`$data-change-notification-input.aai-event-trigger`">
- <outcome value="Update">
- <block>
- <switch test="`$prop.sdncRestApi.type`">
- <outcome value="SOTN">
- <block atomic="true">
- <execute plugin="org.onap.ccsdk.sli.plugins.prop.PropertiesNode" method="readProperties">
- <parameter name="fileName" value="%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties"/>
- <parameter name="contextPrefix" value="prop"/>
- </execute>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`"/>
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="responsePrefix" value="token-result"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <outcome value="success">
- <set>
- <parameter name="prop.sdncRestApi.token_id" value="`$token-result.data.token_id`"/>
- </set>
+<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='DataChange' version='${project.version}'>
+ <method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>
+ <block atomic="true">
+ <switch test="`$prop.sdncRestApi.vendor == 'ZTE'`">
+ <outcome value='false'>
+ <switch test="`$data-change-notification-input.aai-event-trigger`">
+ <outcome value='Update'>
+ <block>
+ <switch test="`$prop.sdncRestApi.type`">
+ <outcome value='SOTN'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ </execute>
+ <switch test="`$prop.sdncRestApi.token_id`">
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.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'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <block>
+ <set>
+ <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ </set>
+ <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='Other'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <block>
+ <set>
+ <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ </set>
+ <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='input' value='ietf-subscribed-notifications:establish-subscription.input.' />
+ <parameter name="`$input + 'encoding'`" value="encode-json" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode' method='establishSubscription' >
+ <parameter name="subscriberId" value="sotn-controller" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="sseConnectURL" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`" />
+ <parameter name="dirPath" value="/opt/sdnc/restconfapi/yang/notification" />
+ <parameter name="format" value="json" />
+ <parameter name="httpMethod" value="post" />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <parameter name="module" value="DataChange" />
+ <parameter name="rpc" value="sotn-notification-handler" />
+ <parameter name="mode" value="sync" />
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/tapi/v2/topologies?topology-id-or-name=otn'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="topologies"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.tapi.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'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing get topology TAPI rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='tidx' start='0' end="`$topologies.topology_length`" >
+ <block>
+ <set>
+ <parameter name='topology.' value='`$topologies.topology[$tidx].`' />
+ </set>
+ <call module='DataChange' rpc='tapi-update-network-to-aai' mode='sync' ></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='MSA'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/openroadm/v2/networks/otn-topology'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="networks"/>
+ <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'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing get topology MSA rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <call module='DataChange' rpc='msa-update-network-to-aai' mode='sync' ></call>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
</outcome>
- <outcome value="failure">
- <block></block>
+ <outcome value='delete'>
+ <block atomic="true"></block>
</outcome>
- </execute>
- <switch test="`$prop.sdncRestApi.token_id`">
- <outcome value="">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`"/>
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="get"/>
- <parameter name="responsePrefix" value="topology"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.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">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="Error executing Create vpn rest api"/>
- </return>
- </outcome>
- <outcome value="success">
- <block atomic="true">
- <for index="nidx" start="0" end="`$topology.networks.network_length`">
- <block>
- <set>
- <parameter name="network." value="`$topology.networks.network[$nidx].`"/>
- </set>
- <call module="DataChange" rpc="update-network-to-aai" mode="sync"></call>
- </block>
- </for>
- </block>
- </outcome>
- </execute>
- </outcome>
- <outcome value="Other">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`"/>
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="get"/>
- <parameter name="responsePrefix" value="topology"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`"/>
- <outcome value="failure">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="Error executing Create vpn rest api"/>
- </return>
- </outcome>
- <outcome value="success">
- <block atomic="true">
- <for index="nidx" start="0" end="`$topology.networks.network_length`">
- <block>
- <set>
- <parameter name="network." value="`$topology.networks.network[$nidx].`"/>
- </set>
- <call module="DataChange" rpc="update-network-to-aai" mode="sync"></call>
- </block>
- </for>
- </block>
- </outcome>
- </execute>
- </outcome>
- </switch>
- <set>
- <parameter name="ietf-subscribed-notifications_establish-subscription.input.encoding" value="encode-json"/>
- </set>
- <execute plugin="org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode" method="establishSubscription">
- <parameter name="subscriberId" value="sotn-controller"/>
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`"/>
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
- <parameter name="sseConnectURL" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`"/>
- <parameter name="dirPath" value="/opt/sdnc/restconfapi/yang/notification"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`"/>
- <parameter name="module" value="DataChange"/>
- <parameter name="rpc" value="sotn-notification-handler"/>
- <parameter name="mode" value="sync"/>
- </execute>
- </block>
- </outcome>
- <outcome value="Other">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`"/>
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
- <outcome value="delete">
- <block atomic="true"/>
- </outcome>
- </switch>
- </outcome>
- <outcome value="true">
- <call module="DataChange" rpc="esr-thirdparty-sdnc-of-zte" mode="sync"></call>
- </outcome>
- </switch>
- </block>
- </method>
+ </switch>
+ </outcome>
+ <outcome value='true'>
+ <call module='DataChange' rpc='esr-thirdparty-sdnc-of-zte' mode='sync' ></call>
+ </outcome>
+ </switch>
+ </block>
+ </method>
</service-logic>
\ No newline at end of file diff --git a/platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml b/platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml new file mode 100644 index 00000000..a370575d --- /dev/null +++ b/platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml @@ -0,0 +1,229 @@ +<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='DataChange' version='${project.version}'>
+ <method rpc='msa-update-network-to-aai' mode='sync'>
+ <block atomic='true'>
+ <switch test="`$networks.network-id`">
+ <outcome value='otn-topology'>
+ <block atomic='true'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='network-resource'
+ key='network-resource.network-id = $networks.network-id' >
+ <parameter name='network-id' value='`$networks.network-id`' />
+ <parameter name='network-type' value='`$networks.network-types`' />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list'
+ key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="network-resource" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/network-resources/network-resource/' + $networks.network-id`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-resource.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$networks.network-id`" />
+ </save>
+ <set>
+ <parameter name='controller_id' value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url`" />
+ </set>
+ <for index='nidx' start='0' end='`$networks.node_length`' >
+ <set>
+ <parameter name='node.' value='`$networks.node[$nidx].`' />
+ </set>
+ <switch test="`$node.node-type`">
+ <outcome value='SWITCH'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="pnfname"/>
+ </execute>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'
+key='pnf.pnf-name = $pnfname' >
+ <parameter name='pnf-name' value='`$pnfname`' />
+ <parameter name='pnf-id' value='`$node.node-id`' />
+ <parameter name='operational-status' value='`$node.node-status`' />
+ <parameter name='in-maint' value='true' />
+ <parameter name='equip-type' value='`$node.node-type`' />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list'
+ key='pnf.pnf-name = $pnfname' force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="network-resource" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/network-resources/network-resource/' + $networks.network-id`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-resource.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$networks.network-id`" />
+ </save>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$node.node-id`'/>
+ <parameter name="regex" value="-"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix1"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/openroadm/v2/networks/openroadm-network/nodes/' + $param-prefix1[0]`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="cllires"/>
+ <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'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-delete.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Getting clli failed"/>
+ </record>
+ </outcome>
+ <outcome value='success'>
+ <block atomic='true'>
+ <set>
+ <parameter name='clli' value='`$cllires.supporting-node[0].node-ref`' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ <for index='tpidx' start='0' end='`$node.termination-point_length`' >
+ <set>
+ <parameter name='speed-value' value='' />
+ <parameter name='available-capacity' value='' />
+ <parameter name='network-interface-type' value='' />
+ </set>
+ <set>
+ <parameter name='tp.' value='`$node.termination-point[$tpidx].`' />
+ </set>
+ <switch test="`$tp.tp-type`">
+ <outcome value='XPONDER-NETWORK'>
+ <block atomic='true'>
+ <set>
+ <parameter name='network-interface-type' value='NNI' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='XPONDER-CLIENT'>
+ <block atomic='true'>
+ <set>
+ <parameter name='network-interface-type' value='UNI' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="interfaceName"/>
+ </execute>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
+ key='pnf.pnf-name = $pnfname
+ AND p-interface.interface-name = $interfaceName' >
+ <parameter name='interface-name' value='`$interfaceName`' />
+ <parameter name='port-description' value='`$tp.tp-id`' />
+ <parameter name='network-ref' value='`$tp.network-ref`' />
+ <parameter name='interface-type' value='`$tp.tp-type`' />
+ <parameter name='in-maint' value="true" />
+ <parameter name='network-interface-type' value='`$network-interface-type`' />
+ <parameter name='speed-units' value="Gbps" />
+ <parameter name='speed-value' value='100' />
+ <parameter name='available-capacity' value='100' />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='custom-query'
+ key="format='resource'"
+ force="true"
+ local-only="false"
+ pfx="data">
+ <parameter name='interface-name' value='`$interfaceName`' />
+ <parameter name='port-description' value='`$tp.tp-id`' />
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="INSERT INTO TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE VALUES ( $interfaceName , $tp.tp-id , $pnfname , $node.node-id , '100' , $clli , null );"></save>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ </for>
+ <for index='lidx' start='0' end='`$networks.link_length`' >
+ <set>
+ <parameter name='link.' value='`$networks.link[$lidx].`' />
+ </set>
+ <switch test="`$link.link-type`">
+ <outcome value='OTN-LINK'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$link.link-id`"/>
+ <parameter name="outputPath" value="tmp.link-id"/>
+ <parameter name="target" value="#"/>
+ <parameter name="replacement" value="_"/>
+ </execute>
+ <set>
+ <parameter name='interface1' value="`$link.source.source-tp`" />
+ <parameter name='interface2' value="`$link.destination.dest-tp`" />
+ <parameter name='pnf1' value="`$link.source.source-node`" />
+ <parameter name='pnf2' value="`$link.destination.dest-node`" />
+ </set>
+ <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="`$pnf1`"/>
+ <parameter name="field2" value="`$interface1`"/>
+ <parameter name="field3" value="`$pnf2`"/>
+ <parameter name="field4" value="`$interface2`"/>
+ </record>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link'
+key='logical-link.link-name = $tmp.link-id' >
+ <parameter name='link-name' value='`$tmp.link-id`' />
+ <parameter name='link-type' value='`$link.link-type`' />
+ <parameter name='in-maint' value='true' />
+ <parameter name='speed-value' value='100' />
+ <parameter name='speed-units' value='Gbps' />
+ <parameter name='operational-status' value='`$link.administrative-state`' />
+ <parameter name='available-capacity' value='100' />
+ </save>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT pnf_name, interface_name
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE pnf_id = $link.source.source-node
+AND interface_id = $link.source.source-tp'
+pfx='db.source'>
+ <outcome value='success'>
+ <set>
+ <parameter name='pnfname1' value='`$db.source.pnf-name`' />
+ <parameter name='pinterface1' value='`$db.source.interface-name`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="print direct name"/>
+ <parameter name="field2" value="`$pnfname1`"/>
+ </record>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+key='SELECT pnf_name, interface_name
+from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
+WHERE pnf_id = $link.destination.dest-node
+AND interface_id = $link.destination.dest-tp'
+pfx='db1.destination'>
+ <outcome value='success'>
+ <set>
+ <parameter name='pnfname2' value='`$db1.destination.pnf-name`' />
+ <parameter name='pinterface2' value='`$db1.destination.interface-name`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
+ key='logical-link.link-name = $tmp.link-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/' + $pnfname1 + '/p-interfaces/p-interface/' + $pinterface1 `" />
+ <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="`$pnfname1`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="p-interface" />
+ <parameter name="relationship-list.relationship[1].related-link" value="`'/network/pnfs/pnf/' + $pnfname2 + '/p-interfaces/p-interface/' + $pinterface2 `" />
+ <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="`$pnfname2`" />
+ </save>
+ </block>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/optical-service/pom.xml b/platform-logic/optical-service/pom.xml new file mode 100644 index 00000000..06b5a80f --- /dev/null +++ b/platform-logic/optical-service/pom.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>odlparent-lite</artifactId> + <version>1.5.1</version> + <relativePath/> + </parent> + + <groupId>org.onap.sdnc.oam</groupId> + <artifactId>platform-logic-optical-service</artifactId> + <version>1.8.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>sdnc-oam :: platform-logic :: ${project.artifactId}</name> + <description>Contains platform-level service logic for the optical service</description> + + <build> + <plugins> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>copy-version</id> + <goals> + <goal>copy-resources</goal> + </goals><!-- here the phase you need --> + <phase>validate</phase> + <configuration> + <outputDirectory>../target/svclogic/graphs/optical-service</outputDirectory> + <resources> + <resource> + <directory>src/main/xml</directory> + <includes> + <include>**/*.xml</include> + </includes> + <filtering>true</filtering> + </resource> + <resource> + <directory>src/main/resources</directory> + <includes> + <include>graph.versions</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> 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 diff --git a/platform-logic/pom.xml b/platform-logic/pom.xml index de79e850..a279e0c3 100644 --- a/platform-logic/pom.xml +++ b/platform-logic/pom.xml @@ -24,7 +24,8 @@ <module>setup</module> <module>generic-resource-api</module> <module>vnfapi</module> - <module>lcm</module> + <module>lcm</module> + <module>optical-service</module> <module>restapi-templates</module> <module>restconfapi-yang</module> <module>datachange</module> diff --git a/platform-logic/restapi-templates/src/main/json/optical-service-create-msa.json b/platform-logic/restapi-templates/src/main/json/optical-service-create-msa.json new file mode 100644 index 00000000..cd26b7e6 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/optical-service-create-msa.json @@ -0,0 +1,56 @@ +{ + "service-name": ${optical-service-create-input.payload.service-name}, + "common-id": ${optical-service-create-input.service-id}, + "connection-type":"service", + "sdnc-request-header":{ + "request-id": ${optical-service-create-input.request-id}, + "rpc-action":"service-create", + "notification-url": ${notification-url}, + "request-system-id":"SDN-ONAP" + }, + "service-a-end":{ + "service-rate": ${optical-service-create-input.payload.service-rate}, + "service-format": ${optical-service-create-input.payload.service-protocol}, + "node-id": ${service-aend-nodeid}, + "clli": ${aend-clli}, + "optic-type":"gray", + "ethernet-encoding": ${optical-service-create-input.payload.coding-func}, + ${mapping-mode-aend}: ${mapping-mode.value}, + "tx-direction":{ + "port":{ + "port-device-name": "router-1", + "port-name": "R1" + } + }, + "rx-direction":{ + "port":{ + "port-device-name": "router-1", + "port-name": "R1" + + } + } + }, + "service-z-end":{ + "service-rate": ${optical-service-create-input.payload.service-rate}, + "service-format": ${optical-service-create-input.payload.service-protocol}, + "node-id": ${service-zend-nodeid}, + "clli": ${zend-clli}, + "optic-type":"gray", + "ethernet-encoding": ${optical-service-create-input.payload.coding-func}, + ${mapping-mode-zend}: ${mapping-mode.value}, + "tx-direction":{ + "port":{ + "port-device-name": "router-2", + "port-name": "R2" + } + }, + "rx-direction":{ + "port":{ + "port-device-name": "router-2", + "port-name": "R2" + } + } + }, + "service-layer": "otn" +} + diff --git a/platform-logic/restapi-templates/src/main/json/optical-service-delete-msa.json b/platform-logic/restapi-templates/src/main/json/optical-service-delete-msa.json new file mode 100644 index 00000000..e777f99a --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/optical-service-delete-msa.json @@ -0,0 +1,13 @@ +{ + "sdnc-request-header":{ + "request-id": ${optical-service-delete-input.request-id}, + "rpc-action": "service-delete", + "notification-url": ${notification-url}, + "request-system-id": "SDN-ONAP" + }, + "service-delete-req-info":{ + "tail-retention": "no", + "service-name": ${optical-service-delete-input.payload.service-name} + } +} + |