From c7c592a42d9cb50a8da2081d838474607cbea879 Mon Sep 17 00:00:00 2001 From: Sandeep Shah Date: Tue, 3 Mar 2020 10:59:21 -0600 Subject: [PATCH] Platform/DG logic support for CMNotify Structure to include Directed Graphs for CMNotify VES events Issue-ID: CCSDK-2132 Signed-off-by: SandeepLinux Change-Id: I57f46fac85092f211884d05e36690a09cb6152e1 --- .../sdnr-CMNotify-api-dg.properties.properties | 36 ++ platform-logic/cMNotify-api/pom.xml | 54 ++ .../CM-NOTIFY-API_nbrlist-change-notification.json | 590 +++++++++++++++++++++ .../cMNotify-api/src/main/resources/graph.versions | 1 + .../CM-NOTIFY-API_nbrlist-change-notification.xml | 126 +++++ platform-logic/pom.xml | 1 + ...d-nbr-to-configdb-per-nbrlist-change-notif.json | 4 + 7 files changed, 812 insertions(+) create mode 100644 odlsli/odlsli-alpine/src/main/properties/sdnr-CMNotify-api-dg.properties.properties create mode 100644 platform-logic/cMNotify-api/pom.xml create mode 100644 platform-logic/cMNotify-api/src/main/json/CM-NOTIFY-API_nbrlist-change-notification.json create mode 100644 platform-logic/cMNotify-api/src/main/resources/graph.versions create mode 100644 platform-logic/cMNotify-api/src/main/xml/CM-NOTIFY-API_nbrlist-change-notification.xml create mode 100644 platform-logic/restapi-templates/src/main/json/CMNotify-add-nbr-to-configdb-per-nbrlist-change-notif.json diff --git a/odlsli/odlsli-alpine/src/main/properties/sdnr-CMNotify-api-dg.properties.properties b/odlsli/odlsli-alpine/src/main/properties/sdnr-CMNotify-api-dg.properties.properties new file mode 100644 index 00000000..8fa3735c --- /dev/null +++ b/odlsli/odlsli-alpine/src/main/properties/sdnr-CMNotify-api-dg.properties.properties @@ -0,0 +1,36 @@ +restapi.templateDir=/opt/onap/ccsdk/restapi/templates +controller.url=http://sdnc.onap:8282 +controller.user=admin +controller.pwd=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U +ransim-mounted=false + +restapi.trustStoreFileName=/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks +restapi.trustStorePassword=adminadmin +restapi.keyStoreFileName=/opt/onap/sdnc/data/stores/sdnc.p12 +restapi.keyStorePassword=adminadmin +restapi.connection-oof-url=http://oof.api.simpledemo.onap.org:8698/api/oof/v1/route +naming.gen-name.url=http://neng-serv:8080 +naming.gen-name.user=ccsdkapps +naming.gen-name.pwd=ccsdkapps + + +# Templates +restapi.pci-patch.templatefile=CMNotify-pci-patch.json +restapi.neighbor-add.templatefile=CMNotify-addNeighbor.json +restapi.neighbor-delete.templatefile=CMNotify-deleteNeighbor.json +restapi.generic-neighbor-patch.template=CMNotify-generic-neighbor-patch.json +restapi.add-nbr-to-configdb-per-notif.template=CMNotify-add-nbr-to-configdb-per-nbrlist-change-notif.json +restapi.dmaap-publish.template=CMNotify-dmaap-publish-template.json + +#URLs for ConfigDB +restapi.configdb.add-nbrlist-change-per-notif=/createNbr/{cellId} +configdb.url=http://10.12.6.45:8080/api/sdnc-config-db/v3 + +#DMAAP Publish +dmaap-message-router.url=message-router.onap:3904/events +CMNotify-dmaap.nbrlist-change.topic=/CM-NOTIFICATION-RSP + +CMNotify-dmaap.requestID=9d2d790e-a5f0-11e8-98d0-529269fb1459 +CMNotify-dmaap.aai= +CMNotify-dmaap.version=1.0.2 +CMNotify-dmaap.nbrlistchange.action=NeighborListModified diff --git a/platform-logic/cMNotify-api/pom.xml b/platform-logic/cMNotify-api/pom.xml new file mode 100644 index 00000000..426e4bac --- /dev/null +++ b/platform-logic/cMNotify-api/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + + + org.onap.ccsdk.distribution + distribution-platform-logic + 0.7.1-SNAPSHOT + + + platform-logic-cMNotifyai + 0.7.1-SNAPSHOT + pom + + ccsdk-distribution :: platform-logic :: ${project.artifactId} + Contains platform-level service logic for responding to ORAN VES events + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ../target/graphs/cMNotifyapi + + + src/main/xml + + *.xml + + true + + + src/main/resources + + graph.versions + + true + + + + + + + + + diff --git a/platform-logic/cMNotify-api/src/main/json/CM-NOTIFY-API_nbrlist-change-notification.json b/platform-logic/cMNotify-api/src/main/json/CM-NOTIFY-API_nbrlist-change-notification.json new file mode 100644 index 00000000..1438b5d5 --- /dev/null +++ b/platform-logic/cMNotify-api/src/main/json/CM-NOTIFY-API_nbrlist-change-notification.json @@ -0,0 +1,590 @@ +[ + { + "id": "d7426cda.853c3", + "type": "method", + "name": "method", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 139, + "y": 192.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "e01172f2.eb605" + ] + ] + }, + { + "id": "384d1619.9cd7ea", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 142, + "y": 42, + "z": "e365f261.0028d", + "wires": [ + [ + "a139909c.cc021" + ] + ] + }, + { + "id": "a139909c.cc021", + "type": "service-logic", + "name": "CM-NOTIFY-API ${project.version}", + "module": "CM-NOTIFY-API", + "version": "${project.version}", + "comments": "", + "xml": "", + "outputs": 1, + "x": 199.99998474121094, + "y": 103.00009536743164, + "z": "e365f261.0028d", + "wires": [ + [ + "d7426cda.853c3" + ] + ] + }, + { + "id": "e01172f2.eb605", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 161.48959732055664, + "y": 361.0000343322754, + "z": "e365f261.0028d", + "wires": [ + [ + "ce9ff91f.9fd7b8", + "8f754eb6.4c563", + "12096927.430627", + "1c34cf50.e940a1", + "681abe9f.71ebb", + "cacad6a.74e6028" + ] + ] + }, + { + "id": "ce9ff91f.9fd7b8", + "type": "returnSuccess", + "name": "return success", + "xml": "\n\n\n\n", + "comments": "", + "x": 258.0002670288086, + "y": 591.000186920166, + "z": "e365f261.0028d", + "wires": [] + }, + { + "id": "46b206d1.328288", + "type": "record", + "name": "record", + "xml": "\n\n\n\n\n\n\n\n\n\n", + "comments": "", + "outputs": 1, + "x": 826.0005493164062, + "y": 58.00004959106445, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "c791a89f.b094f8", + "type": "comment", + "name": "CMNotify VES: nbrlist-change-notification", + "info": "", + "comments": "", + "x": 424, + "y": 35.010414123535156, + "z": "e365f261.0028d", + "wires": [] + }, + { + "id": "12096927.430627", + "type": "for", + "name": "for", + "xml": "", + "comments": "", + "outputs": 1, + "x": 495.085693359375, + "y": 130.9635887145996, + "z": "e365f261.0028d", + "wires": [ + [ + "c2a6556d.4d96f8" + ] + ] + }, + { + "id": "8f754eb6.4c563", + "type": "record", + "name": "record", + "xml": "\n\n\n\n\n", + "comments": "", + "outputs": 1, + "x": 311.0002975463867, + "y": 170.02084732055664, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "3b43614d.42cd1e", + "type": "set", + "name": "set tmp variables for notif input parms", + "xml": "\n\n\n\n\n", + "comments": "", + "x": 781.0010986328125, + "y": 225.89947891235352, + "z": "e365f261.0028d", + "wires": [] + }, + { + "id": "1c34cf50.e940a1", + "type": "execute", + "name": "execute Properties", + "xml": "\n \n \n", + "comments": "", + "outputs": 1, + "x": 506.00018310546875, + "y": 191.02083206176758, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "681abe9f.71ebb", + "type": "record", + "name": "record", + "xml": "\n\n\n\n\n\n\n\n\n\n", + "comments": "", + "outputs": 1, + "x": 471.00030517578125, + "y": 245.0209083557129, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "c2a6556d.4d96f8", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 647, + "y": 93.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "46b206d1.328288", + "dd208eef.5b405" + ] + ] + }, + { + "id": "dd208eef.5b405", + "type": "for", + "name": "for", + "xml": "", + "comments": "", + "outputs": 1, + "x": 819, + "y": 123.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "654cb6f6.2f7848" + ] + ] + }, + { + "id": "654cb6f6.2f7848", + "type": "record", + "name": "record", + "xml": "\n\n\n\n\n\n\n\n\n", + "comments": "", + "outputs": 1, + "x": 970, + "y": 117.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "cacad6a.74e6028", + "type": "for", + "name": "for", + "xml": "", + "comments": "", + "outputs": 1, + "x": 346, + "y": 371, + "z": "e365f261.0028d", + "wires": [ + [ + "23ccad8.b78ea52" + ] + ] + }, + { + "id": "23ccad8.b78ea52", + "type": "block", + "name": "block : ConfigDB Update", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 525, + "y": 362.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "3b43614d.42cd1e", + "7a2468e9.edebc8" + ] + ] + }, + { + "id": "7a2468e9.edebc8", + "type": "for", + "name": "for", + "xml": "", + "comments": "", + "outputs": 1, + "x": 742, + "y": 336.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "8e06e48c.36b168" + ] + ] + }, + { + "id": "b1c0b593.fe96b8", + "type": "set", + "name": "set tmp variables for notif neigbor input parms", + "xml": "\n\n\n\n\n", + "comments": "", + "x": 1140, + "y": 210.00000381469727, + "z": "e365f261.0028d", + "wires": [] + }, + { + "id": "8e06e48c.36b168", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 875, + "y": 284.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "b1c0b593.fe96b8", + "c91fd3ed.ea1a9", + "8ff49992.4b25f8", + "30d460ed.4d3f2" + ] + ] + }, + { + "id": "c91fd3ed.ea1a9", + "type": "execute", + "name": "generate configdb add URL for nbr", + "xml": "\n \n \n \n ", + "comments": "", + "outputs": 1, + "x": 1138, + "y": 256.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "8ff49992.4b25f8", + "type": "record", + "name": "record configdb RestAPI parms", + "xml": "\n\n\n\n\n\n\n", + "comments": "", + "outputs": 1, + "x": 1133, + "y": 305.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "30d460ed.4d3f2", + "type": "execute", + "name": "Add neighbor to Cell", + "xml": "\n\n\n\n\n \n\n", + "comments": "", + "outputs": 1, + "x": 1104, + "y": 383.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "bef59603.eb6c28", + "82674e19.0b984" + ] + ] + }, + { + "id": "bef59603.eb6c28", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1306, + "y": 350.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "2af0bc2d.9a03f4" + ] + ] + }, + { + "id": "82674e19.0b984", + "type": "success", + "name": "success", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1298.999891281128, + "y": 428.9999132156372, + "z": "e365f261.0028d", + "wires": [ + [ + "9972d4be.cec088" + ] + ] + }, + { + "id": "2af0bc2d.9a03f4", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1466.9998779296875, + "y": 307.0000343322754, + "z": "e365f261.0028d", + "wires": [ + [ + "9186101c.ebef7" + ] + ] + }, + { + "id": "9186101c.ebef7", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\n\n", + "comments": "", + "x": 1645.999568939209, + "y": 304.00000190734863, + "z": "e365f261.0028d", + "wires": [] + }, + { + "id": "9972d4be.cec088", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1456.9996337890625, + "y": 394.99997329711914, + "z": "e365f261.0028d", + "wires": [ + [ + "400b8692.be8148" + ] + ] + }, + { + "id": "400b8692.be8148", + "type": "record", + "name": "record", + "xml": "\n\n\n", + "comments": "", + "outputs": 1, + "x": 1635.9997024536133, + "y": 393.9999599456787, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "9491fd51.6d973", + "type": "execute", + "name": "execute DmaapMsg", + "xml": "\n \n \n \n \n \n ", + "comments": "", + "outputs": 1, + "x": 676.5, + "y": 521.0833168029785, + "z": "e365f261.0028d", + "wires": [ + [ + "c2fb651f.83fdf8", + "f266f5d2.b65708" + ] + ] + }, + { + "id": "d9c9c262.acaa7", + "type": "set", + "name": "set", + "xml": "\n\n\n\n\n", + "comments": "", + "x": 671.166748046875, + "y": 427.0833168029785, + "z": "e365f261.0028d", + "wires": [] + }, + { + "id": "c2fb651f.83fdf8", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 872, + "y": 461.00000381469727, + "z": "e365f261.0028d", + "wires": [ + [ + "1c059a5a.142026" + ] + ] + }, + { + "id": "f266f5d2.b65708", + "type": "success", + "name": "success", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 857.9998779296875, + "y": 594.999942779541, + "z": "e365f261.0028d", + "wires": [ + [ + "f560935d.61fab" + ] + ] + }, + { + "id": "1c059a5a.142026", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1062.9998779296875, + "y": 491.0000343322754, + "z": "e365f261.0028d", + "wires": [ + [ + "47ce8954.135548" + ] + ] + }, + { + "id": "47ce8954.135548", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\n\n", + "comments": "", + "x": 1241.999568939209, + "y": 488.00000190734863, + "z": "e365f261.0028d", + "wires": [] + }, + { + "id": "f560935d.61fab", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1052.9996337890625, + "y": 578.9999732971191, + "z": "e365f261.0028d", + "wires": [ + [ + "9d733460.1d7b38" + ] + ] + }, + { + "id": "9d733460.1d7b38", + "type": "record", + "name": "record", + "xml": "\n\n\n", + "comments": "", + "outputs": 1, + "x": 1231.9997024536133, + "y": 577.9999599456787, + "z": "e365f261.0028d", + "wires": [ + [] + ] + }, + { + "id": "7c1b714b.48842", + "type": "block", + "name": "block : Publish DMAAP Message", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 427, + "y": 465, + "z": "e365f261.0028d", + "wires": [ + [ + "d9c9c262.acaa7", + "9491fd51.6d973" + ] + ] + }, + { + "id": "78866421.b367ac", + "type": "comment", + "name": "DMAAP Publish Not Reqd. Just a placeholder", + "info": "", + "comments": "", + "x": 391, + "y": 519, + "z": "e365f261.0028d", + "wires": [] + } +] diff --git a/platform-logic/cMNotify-api/src/main/resources/graph.versions b/platform-logic/cMNotify-api/src/main/resources/graph.versions new file mode 100644 index 00000000..a5e04b2c --- /dev/null +++ b/platform-logic/cMNotify-api/src/main/resources/graph.versions @@ -0,0 +1 @@ +CM-NOTIFY-API nbrlist-change-notification ${project.version} sync diff --git a/platform-logic/cMNotify-api/src/main/xml/CM-NOTIFY-API_nbrlist-change-notification.xml b/platform-logic/cMNotify-api/src/main/xml/CM-NOTIFY-API_nbrlist-change-notification.xml new file mode 100644 index 00000000..58380642 --- /dev/null +++ b/platform-logic/cMNotify-api/src/main/xml/CM-NOTIFY-API_nbrlist-change-notification.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform-logic/pom.xml b/platform-logic/pom.xml index 1d8c373d..8b243ea7 100644 --- a/platform-logic/pom.xml +++ b/platform-logic/pom.xml @@ -23,6 +23,7 @@ sliapi oofpcipoc-api a1Adapter-api + cMNotify-api restapi-templates installer diff --git a/platform-logic/restapi-templates/src/main/json/CMNotify-add-nbr-to-configdb-per-nbrlist-change-notif.json b/platform-logic/restapi-templates/src/main/json/CMNotify-add-nbr-to-configdb-per-nbrlist-change-notif.json new file mode 100644 index 00000000..5751e150 --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/CMNotify-add-nbr-to-configdb-per-nbrlist-change-notif.json @@ -0,0 +1,4 @@ +{ + "targetCellId": ${tmp.nbr.cid}, + "ho": ${tmp.nbr.blacklisted} +} -- 2.16.6