summaryrefslogtreecommitdiffstats
path: root/platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_generic-neighbor-configuration.xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_generic-neighbor-configuration.xml')
-rw-r--r--platform-logic/oofpcipoc-api/src/main/xml/oofpcipoc-api_generic-neighbor-configuration.xml254
1 files changed, 254 insertions, 0 deletions
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
index 8faf96fc..6e386b9e 100644
--- 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
@@ -177,6 +177,66 @@
</block>
</outcome>
</execute>
+ <switch test='`$prop.configdb-deployed`'>
+ <outcome value='false'>
+ <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="ConfigDB Update Skipped"/>
+ </record>
+ </outcome>
+ <outcome value='true'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.configdb.patch-ho-for-nbr`"/>
+ <parameter name="outputPath" value="tmp.configdb.patch-ho-for-nbr.url"/>
+ <parameter name="target" value="{cellId}"/>
+ <parameter name="replacement" value="`$tmp.alias`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.configdb.patch-ho-for-nbr.url`"/>
+ <parameter name="outputPath" value="tmp.configdb.patch-ho-for-nbr.url"/>
+ <parameter name="target" value="{targetCellId}"/>
+ <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/generic-neighbor-config.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="URL for configDB PCI Update"/>
+ <parameter name='field2' value="`$prop.configdb.url + $tmp.configdb.patch-ho-for-nbr.url`" />
+ <parameter name='field3' value="`$tmp.alias`" />
+ <parameter name='field4' value="`$tmp.cid`" />
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/oofpcipoc-patch-configdb-ho-for-nbr.json'`" />
+ <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.configdb.patch-ho-for-nbr.url`"/>
+ <parameter name="httpMethod" value="PATCH"/>
+ <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 updating configDB. Aborting Nbr HO configuration" />
+ </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="HO Value for nbr updated in ConfigDB"/>
+ </record>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
</block>
</for>
</outcome>
@@ -327,10 +387,204 @@
</block>
</outcome>
</execute>
+ <switch test='`$prop.configdb-deployed`'>
+ <outcome value='false'>
+ <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="ConfigDB Update Skipped"/>
+ </record>
+ </outcome>
+ <outcome value='true'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.configdb.patch-ho-for-nbr`"/>
+ <parameter name="outputPath" value="tmp.configdb.patch-ho-for-nbr.url"/>
+ <parameter name="target" value="{cellId}"/>
+ <parameter name="replacement" value="`$tmp.alias`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.configdb.patch-ho-for-nbr.url`"/>
+ <parameter name="outputPath" value="tmp.configdb.patch-ho-for-nbr.url"/>
+ <parameter name="target" value="{targetCellId}"/>
+ <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/generic-neighbor-config.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="URL for configDB PCI Update"/>
+ <parameter name='field2' value="`$prop.configdb.url + $tmp.configdb.patch-ho-for-nbr.url`" />
+ <parameter name='field3' value="`$tmp.alias`" />
+ <parameter name='field4' value="`$tmp.cid`" />
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/oofpcipoc-patch-configdb-ho-for-nbr.json'`" />
+ <parameter name="restapiUrl" value="`$prop.configdb.url + $tmp.configdb.patch-ho-for-nbr.url`"/>
+ <parameter name="httpMethod" value="PATCH"/>
+ <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 updating configDB. Aborting Nbr HO configuration" />
+ </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="HO Value for nbr updated in ConfigDB"/>
+ </record>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
</block>
</for>
</outcome>
</switch>
+ <block atomic='true'>
+ <execute plugin="org.onap.ccsdk.sli.plugins.template.TemplateNode" method="evaluateTemplate" >
+ <parameter name='templatePath' value='oofpcipoc-dmaap-publish-modifyconfiganr-resp-payload-template.vtl' />
+ <parameter name='output' value='resp-payload' />
+ <parameter name='prefix' value='sdnr' />
+ <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/generic-neighbor-config.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Redndred sdnr payload template as a string"/>
+ <parameter name='field3' value='`$sdnr.resp-payload`' />
+ </record>
+ </block>
+ </outcome>
+ <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 creating SDNR response payload string. Aborting PCI configuration" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >
+ <parameter name="source" value="`$sdnr.resp-payload`"/>
+ <parameter name="outputPath" value="tmp.oofpcipoc-dmaap-config-resp.payload"/>
+ <parameter name="target" value="\n"/>
+ <parameter name="replacement" value=""/>
+ <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/generic-neighbor-config.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Redndred template with lines removed \r"/>
+ <parameter name='field3' value='`$tmp.oofpcipoc-dmaap-config-resp.payload`' />
+ </record>
+ </block>
+ </outcome>
+ <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 removing lines from SDNR response payload string. Aborting PCI configuration" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >
+ <parameter name="source" value="`$tmp.oofpcipoc-dmaap-config-resp.payload`"/>
+ <parameter name="outputPath" value="tmp.oofpcipoc-dmaap-config-resp.payload"/>
+ <parameter name="target" value="\t"/>
+ <parameter name="replacement" value=""/>
+ <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/generic-neighbor-config.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Redndred template with tabs removed \r"/>
+ <parameter name='field3' value='`$tmp.oofpcipoc-dmaap-config-resp.payload`' />
+ </record>
+ </block>
+ </outcome>
+ <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 removing tabs from SDNR response payload string. Aborting PCI configuration" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='escapeJsonString' >
+ <parameter name="source" value='`$tmp.oofpcipoc-dmaap-config-resp.payload`'/>
+ <parameter name="target" value='tmp.oofpcipoc-dmaap-config-resp.payload'/>
+ <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/generic-neighbor-config.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Redndred template as an Escaped string"/>
+ <parameter name='field3' value='`$tmp.oofpcipoc-dmaap-config-resp.payload`' />
+ </record>
+ </block>
+ </outcome>
+ <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 inserting escape chars in SDNR response payload string. Aborting PCI configuration" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.oofpcipoc-dmaap-config-resp.rpc-name' value='`$prop.oofpcipoc-dmaap-config-resp.rpc-name.modifyconfiganr`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish-config-response.template`" />
+ <parameter name='restapiUrl' value="`$prop.dmaap-message-router.url + '/' + $prop.oofpcipoc-dmaap-configuration-response.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 Config Response 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/generic-neighbor-config.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="DMAAP Config Response Message Successfully Published "/>
+ </record>
+ </block>
+ </outcome>
+ </execute>
+ </block>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />
<parameter name="error-code" value="200" />