diff options
author | Sandeep Shah <sandeep.shah2@techmahindra.com> | 2019-06-13 09:02:06 -0500 |
---|---|---|
committer | Sandeep Shah <sandeep.shah2@techmahindra.com> | 2019-06-13 09:02:06 -0500 |
commit | 25af4c606c3d92371775897bf1224f03716d0c8f (patch) | |
tree | 9133e1d257e9bdf0807ccf4f4c7cd9cb1b93fda9 /platform-logic/oofpcipoc-api/src/main/xml | |
parent | 428403f72cd97df8bdded8dadb624cd01dde459a (diff) |
DG's to support SDNR RANSIM Netconf Notification
DG's to handle Netconf notification from the RAN network regarding
neighbor list change. DG will update ConfigDB and also publish DMAAP
message to be consumed by Policy for closed loop automation SON use
case.
Issue-ID: CCSDK-1397
Signed-off-by: SandeepLinux <sandeeplinux1068@gmail.com>
Change-Id: I6a153e08b6abea035fd34208ad91f0c58c9ba4ef
Diffstat (limited to 'platform-logic/oofpcipoc-api/src/main/xml')
-rw-r--r-- | platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_handle-nbrlist-change-notif.xml | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_handle-nbrlist-change-notif.xml b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_handle-nbrlist-change-notif.xml new file mode 100644 index 00000000..dca5ce47 --- /dev/null +++ b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_handle-nbrlist-change-notif.xml @@ -0,0 +1,161 @@ +<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='oofpcipoc-api' version='${project.version}'> + <method rpc='handle-nbrlist-change-notif' mode='sync'> + <block atomic='true'> + <for index='idx' start='0' end="`$handle-nbrlist-change-notif-input.fap-service-number-of-entries-changed`" > + <block atomic='true'> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/handle-nbrlist-change-notif.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Input RPC Payload request. FAP #: "/> + <parameter name="field2" value="`$idx`"/> + <parameter name="field3" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].alias`"/> + <parameter name="field4" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].cid`"/> + <parameter name="field5" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].phy-cell-id-in-use`"/> + <parameter name="field6" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].pnf-name`"/> + <parameter name="field7" value="Number of neigbors Changed/To Be Added #: "/> + <parameter name="field8" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-cell-number-of-entries`"/> + </record> + <for index='idy' start='0' end="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-cell-number-of-entries`" > + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/handle-nbrlist-change-notif.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Neighbor #: "/> + <parameter name="field2" value="`$idy`"/> + <parameter name="field3" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].plmnid`"/> + <parameter name="field4" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].cid`"/> + <parameter name="field5" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].phy-cell-id`"/> + <parameter name="field6" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].pnf-name`"/> + <parameter name="field7" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].blacklisted`"/> + </record> + </for> + </block> + </for> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/handle-nbrlist-change-notif.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RPC to handle nbrlist change notification invoked. Number of FAP services for which neighbors have changed: "/> + <parameter name="field2" value="`$handle-nbrlist-change-notif-input.fap-service-number-of-entries-changed`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' > + <parameter name='fileName' value='%SDNC_CONFIG_DIR%/sdnr-oofpcipoc-api-dg.properties' /> + <parameter name='contextPrefix' value='prop' /> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/handle-nbrlist-change-notif.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Properties read ..configDB URL"/> + <parameter name="field2" value="`$prop.configdb.url`"/> + <parameter name="field3" value="Properties read ..DMAAP Msg Router URL"/> + <parameter name="field4" value="`$prop.configdb.url`"/> + <parameter name="field5" value="`$prop.dmaap-message-router.url`"/> + <parameter name="field6" value="`$prop.controller.pwd`"/> + <parameter name="field7" value="`$prop.controller.url`"/> + </record> + <for index='idx' start='0' end="`$handle-nbrlist-change-notif-input.fap-service-number-of-entries-changed`" > + <block atomic='true'> + <set> + <parameter name="tmp.alias" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].alias`"/> + <parameter name="tmp.cid" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].cid`"/> + <parameter name="tmp.phy-cell-id-in-use" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].phy-cell-id-in-use`"/> + <parameter name="tmp.pnf-name" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].pnf-name`"/> + <parameter name="tmp.lte-cell-number-of-entries" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-cell-number-of-entries`"/> + </set> + <for index='idy' start='0' end="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-cell-number-of-entries`" > + <block atomic='true'> + <set> + <parameter name="tmp.nbr.plmnid" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].plmnid`"/> + <parameter name="tmp.nbr.cid" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].cid`"/> + <parameter name="tmp.nbr.phy-cell-id" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].phy-cell-id`"/> + <parameter name="tmp.nbr.pnf-name" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].pnf-name`"/> + <parameter name="tmp.nbr.blacklisted" value="`$handle-nbrlist-change-notif-input.fap-service[$idx].lte-ran-neighbor-list-in-use-lte-cell-changed[$idy].blacklisted`"/> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.configdb.add-nbrlist-change-per-notif`"/> + <parameter name="outputPath" value="tmp.configdb.add-nbrlist-change-per-notif.url"/> + <parameter name="target" value="{cellId}"/> + <parameter name="replacement" value="`$tmp.cid`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/handle-nbrlist-change-notif.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="URL for configDB neighbor cell ADD"/> + <parameter name='field2' value="`$prop.configdb.url + $tmp.configdb.add-nbrlist-change-per-notif.url`" /> + <parameter name='field3' value="`$tmp.nbr.cid`" /> + <parameter name='field4' value="`$tmp.nbr.blacklisted`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/oofpcipoc-add-nbr-to-configdb-per-nbrlist-change-notif.json'`" /> + <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.configdb.add-nbrlist-change-per-notif.url`"/> + <parameter name="httpMethod" value="PUT"/> + <parameter name="responsePrefix" value="oofpci-configdb-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/json' /> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error adding neighbor to configdb. Aborting notification handler" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/configuration-phy-cell-id.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Neighbor Added to ConfigDB "/> + </record> + </block> + </outcome> + </execute> + </block> + </for> + </block> + </for> + <block atomic='true'> + <set> + <parameter name='tmp.oofpcipoc-dmaap.requestID' value='`$prop.oofpcipoc-dmaap.requestID`'/> + <parameter name='tmp.oofpcipoc-dmaap.aai' value="`$prop.oofpcipoc-dmaap.aai`"/> + <parameter name='tmp.oofpcipoc-dmaap.version' value='`$prop.oofpcipoc-dmaap.version`'/> + <parameter name='tmp.oofpcipoc-dmaap.action' value='`$prop.oofpcipoc-dmaap.action`'/> + <parameter name='tmp.oofpcipoc-dmaap.payload' value='`$handle-nbrlist-change-notif-input.payload`'/> + </set> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish.templatefile`" /> + <parameter name='restapiUrl' value="`$prop.dmaap-message-router.url + '/' + $prop.oofpcipoc-dmaap.nbrlist-change.topic`" /> + <parameter name='format' value='json' /> + <parameter name='httpMethod' value='POST' /> + <parameter name='contentType' value='application/json' /> + <parameter name='responsePrefix' value='dmaap' /> + <outcome value='failure'> + <block> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error publishing DMAAP message. ConfigDB Updated; TO be rolled back...will handle next release" /> + </return> + </block> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/configuration-phy-cell-id.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="DMAAP Message Successfully Published "/> + </record> + </block> + </outcome> + </execute> + </block> + <return status='success'> + <parameter name="ack-final-indicator" value="Y" /> + <parameter name="error-code" value="200" /> + <parameter name="error-message" value="SUCCESSFUL Execution" /> + </return> + </block> + </method> +</service-logic>
\ No newline at end of file |