diff options
author | Sandeep Shah <sandeep.shah2@techmahindra.com> | 2019-04-10 11:34:16 -0500 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2019-04-10 21:36:50 +0000 |
commit | 6c64ce6d8be0d03ddc9d940cc5caeb7000b1f390 (patch) | |
tree | 8b5eee4326ce5683c3480267b1b02a4ec808aeaa /platform-logic/oofpcipoc-api/src/main/xml | |
parent | ede33b1a140b56b2fd225c7298122329f650f537 (diff) |
Service Logic (DG/Templates) for SDNR OOF PCI POC3.0.2-ONAP0.3.4
DG's, templates, property files to support service logic for SDNR OOF
PCI POC use case. Also includes the required changes to POM files to
appropriately copy the above artifacts to docker-state folder in
respective sub-folders.
Change-Id: I9b16c798bcc9ba3a28d5a99f4c3d1562f5ed0468
Issue-ID: CCSDK-1204
Signed-off-by: SandeepLinux <sandeep.shah2@techmahindra.com>
Diffstat (limited to 'platform-logic/oofpcipoc-api/src/main/xml')
5 files changed, 676 insertions, 0 deletions
diff --git a/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_add-neighbor.xml b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_add-neighbor.xml new file mode 100644 index 00000000..9893030c --- /dev/null +++ b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_add-neighbor.xml @@ -0,0 +1,171 @@ +<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='0.4.2-SNAPSHOT'> + <method rpc='add-neighbor' mode='sync'> + <block atomic='true'> + <for index='idx' start='0' end="`$add-neighbor-input.lte-cell-number-of-entries`" > + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Input RPC Payload request for Alias: "/> + <parameter name="field2" value="`$add-neighbor-input.alias`"/> + <parameter name="field3" value="Input RPC Payload request for add-neighbor. Neighbor Cell #: "/> + <parameter name="field4" value="`$idx`"/> + <parameter name="field5" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].plmnid`"/> + <parameter name="field6" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].cid`"/> + <parameter name="field7" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].phy-cell-id`"/> + <parameter name="field8" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].pnf-name`"/> + <parameter name="field9" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].blacklisted`"/> + </record> + </for> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RPC to add neighbors. Number of neighbors to add: "/> + <parameter name="field2" value="`$add-neighbor-input.lte-cell-number-of-entries`"/> + </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/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Properties read .. neighbor-add template"/> + <parameter name="field2" value="`$prop.neighbor-add.templatefile`"/> + <parameter name="field3" value="`$prop.controller.user`"/> + <parameter name="field4" value="`$prop.controller.pwd`"/> + <parameter name="field5" value="`$prop.controller.url`"/> + <parameter name="field6" value="`$prop.restapi.lte-ran-neighbor-in-use`"/> + </record> + <for index='idx' start='0' end="`$add-neighbor-input.lte-cell-number-of-entries`" > + <block atomic='true'> + <set> + <parameter name="tmp.plmnid" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].plmnid`"/> + <parameter name="tmp.cid" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].cid`"/> + <parameter name="tmp.phy-cell-id" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].phy-cell-id`"/> + <parameter name="tmp.pnf-name" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].pnf-name`"/> + <parameter name="tmp.blacklisted" value="`$add-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].blacklisted`"/> + <parameter name="tmp.alias" value="`$add-neighbor-input.alias`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Temporary variable for Neighbor Cell #: "/> + <parameter name="field2" value="`$idx`"/> + <parameter name="field3" value="`$tmp.plmnid`"/> + <parameter name="field4" value="`$tmp.cid`"/> + <parameter name="field5" value="`$tmp.phy-cell-id`"/> + <parameter name="field6" value="`$tmp.pnf-name`"/> + <parameter name="field7" value="`$tmp.blacklisted`"/> + <parameter name="field8" value="`$tmp.alias`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.lte-ran-neighbor-in-use`"/> + <parameter name="outputPath" value="tmp.add-neighbor-service-url"/> + <parameter name="target" value="{alias}"/> + <parameter name="replacement" value="`$tmp.alias`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Add Neighbor List URL"/> + <parameter name="field2" value="`$tmp.add-neighbor-service-url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.add-neighbor-service-url`"/> + <parameter name="outputPath" value="tmp.add-neighbor-service-url"/> + <parameter name="target" value="{plmnid}"/> + <parameter name="replacement" value="`$tmp.plmnid`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Add Neighbor List URL"/> + <parameter name="field2" value="`$tmp.add-neighbor-service-url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.add-neighbor-service-url`"/> + <parameter name="outputPath" value="tmp.add-neighbor-service-url"/> + <parameter name="target" value="{cid}"/> + <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/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Setting variables for Neighbor Add PUT operation"/> + <parameter name="field2" value="`$tmp.add-neighbor-service-url`"/> + <parameter name="field3" value="`$tmp.plmnid`"/> + <parameter name="field4" value="`$tmp.cid`"/> + <parameter name="field5" value="`$tmp.phy-cell-id`"/> + <parameter name="field6" value="`$tmp.pnf-name`"/> + <parameter name="field7" value="`$tmp.blacklisted`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/oofpcipoc-addNeighbor.json'`" /> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.add-neighbor-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="PUT"/> + <parameter name="responsePrefix" value="oofpci-add-neighbor-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='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 a new neighbor" /> + </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/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="PUT New Neighbor Executed Successfully "/> + </record> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.add-neighbor-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="oofpci-neighbor-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <outcome value='failure'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error getting details about new neighbor " /> + </return> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Details about newly added Neighbor"/> + <parameter name="field2" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].plmnid`"/> + <parameter name="field3" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].cid`"/> + <parameter name="field4" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].phy-cell-id`"/> + <parameter name="field5" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].pnf-name`"/> + <parameter name="field6" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].blacklisted`"/> + </record> + </block> + </outcome> + </execute> + </block> + </for> + <return status='success'> + <parameter name="ack-final-indicator" value="Y" /> + <parameter name="error-code" value="200" /> + <parameter name="error-message" value="SUCCESSFUL add-neighbor Execution" /> + </return> + </block> + </method> +</service-logic>
\ No newline at end of file diff --git a/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_configuration-phy-cell-id.xml b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_configuration-phy-cell-id.xml new file mode 100644 index 00000000..501fce78 --- /dev/null +++ b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_configuration-phy-cell-id.xml @@ -0,0 +1,168 @@ +<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='0.4.2-SNAPSHOT'> + <method rpc='configuration-phy-cell-id' mode='sync'> + <block atomic='true'> + <for index='idx' start='0' end="`$configuration-phy-cell-id-input.fap-service-number-of-entries`" > + <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="Input RPC Payload request. FAP #: "/> + <parameter name="field2" value="`$idx`"/> + <parameter name="field3" value="`$configuration-phy-cell-id-input.fap-service[$idx].alias`"/> + <parameter name="field4" value="`$configuration-phy-cell-id-input.fap-service[$idx].cid`"/> + <parameter name="field5" value="`$configuration-phy-cell-id-input.fap-service[$idx].phy-cell-id-in-use`"/> + <parameter name="field6" value="`$configuration-phy-cell-id-input.fap-service[$idx].pnf-name`"/> + </record> + </for> + <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="RPC to Configure PCI INVOKED. Number of Cells to configure: "/> + <parameter name="field2" value="`$configuration-phy-cell-id-input.fap-service-number-of-entries`"/> + </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/configuration-phy-cell-id.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Properties read .. pci patch target"/> + <parameter name="field2" value="`$prop.oofpcipoc.patch.pci.target`"/> + <parameter name="field3" value="`$prop.controller.user`"/> + <parameter name="field4" value="`$prop.controller.pwd`"/> + <parameter name="field5" value="`$prop.controller.url`"/> + </record> + <for index='idx' start='0' end="`$configuration-phy-cell-id-input.fap-service-number-of-entries`" > + <block atomic='true'> + <set> + <parameter name="tmp.alias" value="`$configuration-phy-cell-id-input.fap-service[$idx].alias`"/> + <parameter name="tmp.cid" value="`$configuration-phy-cell-id-input.fap-service[$idx].cid`"/> + <parameter name="tmp.phy-cell-id-in-use" value="`$configuration-phy-cell-id-input.fap-service[$idx].phy-cell-id-in-use`"/> + <parameter name="tmp.pnf-name" value="`$configuration-phy-cell-id-input.fap-service[$idx].pnf-name`"/> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.fap-service`"/> + <parameter name="outputPath" value="tmp.fap-service-url"/> + <parameter name="target" value="{alias}"/> + <parameter name="replacement" value="`$tmp.alias`"/> + </execute> + <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="Setting variables for GET operation"/> + <parameter name="field2" value="`$tmp.fap-service-url`"/> + <parameter name="field3" value="`$tmp.alias`"/> + <parameter name="field4" value="`$tmp.cid`"/> + <parameter name="field5" value="`$tmp.phy-cell-id-in-use`"/> + <parameter name="field6" value="`$tmp.pnf-name`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.fap-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="oofpcigetfapservice"/> + <parameter name='contentType' value='application/json' /> + <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 odutopo node details rest api" /> + </return> + </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="Initial FAP Service PCI PARMS"/> + <parameter name="field2" value="`$oofpcigetfapservice.fap-service[0].alias`"/> + <parameter name="field3" value="`$oofpcigetfapservice.fap-service[0].x-0005b9-lte.phy-cell-id-in-use`"/> + <parameter name="field4" value="`$oofpcigetfapservice.fap-service[0].x-0005b9-lte.pnf-name`"/> + </record> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.x-005b9-lte`"/> + <parameter name="outputPath" value="tmp.oofpcipoc.patch.pci.url"/> + <parameter name="target" value="{alias}"/> + <parameter name="replacement" value="`$tmp.alias`"/> + </execute> + <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="URL and Target for PCI patch URL"/> + <parameter name='field2' value="`$prop.controller.url + $tmp.oofpcipoc.patch.pci.url`" /> + <parameter name='field3' value="`$prop.oofpcipoc.patch.pci.target`" /> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/oofpcipoc-pci-patch.json'`" /> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.oofpcipoc.patch.pci.url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="PATCH"/> + <parameter name="responsePrefix" value="oofpci-patch-response"/> + <parameter name='contentType' value='application/yang.patch+json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/yang.patch-status+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 executing patch rest api" /> + </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="PUT PCI POC FAP SERVICE. Reconfigured "/> + </record> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.fap-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="oofpcigetfapservice"/> + <parameter name='contentType' value='application/json' /> + <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 patch rest api" /> + </return> + </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="Post Reconfig FAP Service PCI PARMS"/> + <parameter name="field2" value="`$oofpcigetfapservice.fap-service[0].alias`"/> + <parameter name="field3" value="`$oofpcigetfapservice.fap-service[0].x-0005b9-lte.phy-cell-id-in-use`"/> + <parameter name="field4" value="`$oofpcigetfapservice.fap-service[0].x-0005b9-lte.pnf-name`"/> + </record> + </block> + </outcome> + </execute> + </block> + </for> + <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 diff --git a/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_delete-neighbor.xml b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_delete-neighbor.xml new file mode 100644 index 00000000..c6674c7e --- /dev/null +++ b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_delete-neighbor.xml @@ -0,0 +1,131 @@ +<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='0.4.2-SNAPSHOT'> + <method rpc='delete-neighbor' mode='sync'> + <block atomic='true'> + <for index='idx' start='0' end="`$delete-neighbor-input.lte-cell-number-of-entries`" > + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/delete-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Input RPC Payload request for Alias: "/> + <parameter name="field2" value="`$delete-neighbor-input.alias`"/> + <parameter name="field3" value="Input RPC Payload request for delete-neighbor. Neighbor Cell #: "/> + <parameter name="field4" value="`$idx`"/> + <parameter name="field5" value="`$delete-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].plmnid`"/> + <parameter name="field6" value="`$delete-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].cid`"/> + </record> + </for> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/delete-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RPC to delete neighbors. Number of neighbors to delete: "/> + <parameter name="field2" value="`$delete-neighbor-input.lte-cell-number-of-entries`"/> + </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/add-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Properties read .. neighbor-add template"/> + <parameter name="field2" value="`$prop.neighbor-add.templatefile`"/> + <parameter name="field3" value="`$prop.controller.user`"/> + <parameter name="field4" value="`$prop.controller.pwd`"/> + <parameter name="field5" value="`$prop.controller.url`"/> + <parameter name="field6" value="`$prop.restapi.lte-ran-neighbor-in-use`"/> + </record> + <for index='idx' start='0' end="`$delete-neighbor-input.lte-cell-number-of-entries`" > + <block atomic='true'> + <set> + <parameter name="tmp.plmnid" value="`$delete-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].plmnid`"/> + <parameter name="tmp.cid" value="`$delete-neighbor-input.lte-ran-neighbor-list-in-use-lte-cell[$idx].cid`"/> + <parameter name="tmp.alias" value="`$delete-neighbor-input.alias`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/delete-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Temporary variable for Neighbor Cell #: "/> + <parameter name="field2" value="`$idx`"/> + <parameter name="field3" value="`$tmp.plmnid`"/> + <parameter name="field4" value="`$tmp.cid`"/> + <parameter name="field5" value="`$tmp.alias`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.lte-ran-neighbor-in-use`"/> + <parameter name="outputPath" value="tmp.add-neighbor-service-url"/> + <parameter name="target" value="{alias}"/> + <parameter name="replacement" value="`$tmp.alias`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/delete-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Add Neighbor List URL"/> + <parameter name="field2" value="`$tmp.add-neighbor-service-url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.add-neighbor-service-url`"/> + <parameter name="outputPath" value="tmp.add-neighbor-service-url"/> + <parameter name="target" value="{plmnid}"/> + <parameter name="replacement" value="`$tmp.plmnid`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/delete-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Add Neighbor List URL"/> + <parameter name="field2" value="`$tmp.add-neighbor-service-url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.add-neighbor-service-url`"/> + <parameter name="outputPath" value="tmp.add-neighbor-service-url"/> + <parameter name="target" value="{cid}"/> + <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/delete-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Setting variables for Neighbor Add PUT operation"/> + <parameter name="field2" value="`$tmp.add-neighbor-service-url`"/> + <parameter name="field3" value="`$tmp.plmnid`"/> + <parameter name="field4" value="`$tmp.cid`"/> + <parameter name="field5" value="`$tmp.phy-cell-id`"/> + <parameter name="field6" value="`$tmp.pnf-name`"/> + <parameter name="field7" value="`$tmp.blacklisted`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.add-neighbor-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="DELETE"/> + <parameter name="responsePrefix" value="oofpci-delete-neighbor-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='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 a new neighbor" /> + </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/delete-neighbor.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="DELETE Neighbor Executed Successfully "/> + </record> + </block> + </outcome> + </execute> + </block> + </for> + <return status='success'> + <parameter name="ack-final-indicator" value="Y" /> + <parameter name="error-code" value="200" /> + <parameter name="error-message" value="SUCCESSFUL add-neighbor Execution" /> + </return> + </block> + </method> +</service-logic>
\ No newline at end of file diff --git a/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_generic-neighbor-configuration.xml b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_generic-neighbor-configuration.xml new file mode 100644 index 00000000..d02bb7b6 --- /dev/null +++ b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_generic-neighbor-configuration.xml @@ -0,0 +1,187 @@ +<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='0.4.2-SNAPSHOT'> + <method rpc='generic-neighbor-configuration' mode='sync'> + <block atomic='true'> + <for index='idx' start='0' end="`$generic-neighbor-configuration-input.number-of-neighbor-cell-entries`" > + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Input RPC Payload request. Neighbor #: "/> + <parameter name="field2" value="`$idx`"/> + <parameter name="field3" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].plmnid`"/> + <parameter name="field4" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].cid`"/> + <parameter name="field5" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].phy-cell-id`"/> + <parameter name="field6" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].pnf-name`"/> + <parameter name="field7" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].blacklisted`"/> + </record> + </for> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="RPC to Configure Neighbors INVOKED. Number of Neighbors to configure: "/> + <parameter name="field2" value="`$generic-neighbor-configuration-input.number-of-neighbor-cell-entries`"/> + </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/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Properties read .. generic neighbor config template"/> + <parameter name="field2" value="`$prop.restapi.generic-neighbor-patch.template`"/> + <parameter name="field3" value="`$prop.controller.user`"/> + <parameter name="field4" value="`$prop.controller.pwd`"/> + <parameter name="field5" value="`$prop.controller.url`"/> + </record> + <for index='idx' start='0' end="`$generic-neighbor-configuration-input.number-of-neighbor-cell-entries`" > + <block atomic='true'> + <set> + <parameter name="tmp.alias" value="`$generic-neighbor-configuration-input.alias`"/> + <parameter name="tmp.plmnid" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].plmnid`"/> + <parameter name="tmp.cid" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].cid`"/> + <parameter name="tmp.phy-cell-id" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].phy-cell-id`"/> + <parameter name="tmp.pnf-name" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].pnf-name`"/> + <parameter name="tmp.blacklisted" value="`$generic-neighbor-configuration-input.neighbor-list-in-use[$idx].blacklisted`"/> + </set> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Temporary varaibles set. Neighbor #: "/> + <parameter name="field2" value="`$idx`"/> + <parameter name="field3" value="`$tmp.plmnid`"/> + <parameter name="field4" value="`$tmp.cid`"/> + <parameter name="field5" value="`$tmp.phy-cell-id`"/> + <parameter name="field6" value="`$tmp.pnf-name`"/> + <parameter name="field7" value="`$tmp.blacklisted`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.lte-ran-neighbor-in-use`"/> + <parameter name="outputPath" value="tmp.config-neighbor-service-url"/> + <parameter name="target" value="{alias}"/> + <parameter name="replacement" value="`$tmp.alias`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Config Neighbor List URL"/> + <parameter name="field2" value="`$tmp.config-neighbor-service-url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.config-neighbor-service-url`"/> + <parameter name="outputPath" value="tmp.config-neighbor-service-url"/> + <parameter name="target" value="{plmnid}"/> + <parameter name="replacement" value="`$tmp.plmnid`"/> + </execute> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Config Neighbor List URL"/> + <parameter name="field2" value="`$tmp.config-neighbor-service-url`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.config-neighbor-service-url`"/> + <parameter name="outputPath" value="tmp.config-neighbor-service-url"/> + <parameter name="target" value="{cid}"/> + <parameter name="replacement" value="`$tmp.cid`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.config-neighbor-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="oofpci-neighbor-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <outcome value='failure'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error getting details about new neighbor " /> + </return> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Details about Neighbor Pre-configuration"/> + <parameter name="field2" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].plmnid`"/> + <parameter name="field3" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].cid`"/> + <parameter name="field4" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].phy-cell-id`"/> + <parameter name="field5" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].pnf-name`"/> + <parameter name="field6" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].blacklisted`"/> + </record> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/oofpcipoc-generic-neighbor-patch.json'`" /> + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.config-neighbor-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="PATCH"/> + <parameter name="responsePrefix" value="oofpci-neighbor-patch-response"/> + <parameter name='contentType' value='application/yang.patch+json' /> + <parameter name='format' value='json' /> + <parameter name='accept' value='application/yang.patch-status+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 a new neighbor" /> + </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/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="PATCH Neighbor Executed Successfully "/> + </record> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.config-neighbor-service-url`"/> + <parameter name="restapiUser" value="`$prop.controller.user`" /> + <parameter name="restapiPassword" value="`$prop.controller.pwd`"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="oofpci-neighbor-response"/> + <parameter name='contentType' value='application/json' /> + <parameter name='format' value='json' /> + <outcome value='failure'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error getting details about new neighbor " /> + </return> + </outcome> + <outcome value='success'> + <block> + <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder"> + <parameter name="file" value="/opt/opendaylight/current/data/log/generic-neighbor-config.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="Details about Neighbor Pre-configuration"/> + <parameter name="field2" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].plmnid`"/> + <parameter name="field3" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].cid`"/> + <parameter name="field4" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].phy-cell-id`"/> + <parameter name="field5" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].pnf-name`"/> + <parameter name="field6" value="`$oofpci-neighbor-response.lte-ran-neighbor-list-in-use-lte-cell[0].blacklisted`"/> + </record> + </block> + </outcome> + </execute> + </block> + </for> + <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 diff --git a/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_greeting.xml b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_greeting.xml new file mode 100644 index 00000000..b6eec280 --- /dev/null +++ b/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_greeting.xml @@ -0,0 +1,19 @@ +<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='greeting' mode='sync'> + <block atomic='true'> + <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="Hello World!"/> + <parameter name="field2" value="`$greeting-input.salutation`"/> + </record> + <return status='success'> + <parameter name="ack-final-indicator" value="Y" /> + <parameter name="error-code" value="200" /> + <parameter name="error-message" value="`$error-message`" /> + </return> + </block> + </method> +</service-logic>
\ No newline at end of file |