summaryrefslogtreecommitdiffstats
path: root/platform-logic/a1Adapter-api/src/main/xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/a1Adapter-api/src/main/xml')
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getNearRT-RICs.xml158
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_notifyPolicyEnforcementUpdate.xml95
2 files changed, 253 insertions, 0 deletions
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getNearRT-RICs.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getNearRT-RICs.xml
new file mode 100644
index 00000000..0e3a2c16
--- /dev/null
+++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getNearRT-RICs.xml
@@ -0,0 +1,158 @@
+<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='A1-ADAPTER-API' version='${project.version}'>
+ <method rpc='getNearRT-RICs' mode='sync'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="A1 Adapter - get near-RT RIC Info"/>
+ </record>
+ <set>
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='A1 Mediator RIC ID available' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='/opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <switch test='`$prop.ric-plt-A1Mediator-deployed`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name="tmp.near-rt-ric-id" value="`$prop.near-rt-ric-id`"/>
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="SNear-RT RIC ID"/>
+ <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='response-code' value='500'/>
+ <parameter name='response-message' value='A1 Mediator Not Deployed'/>
+ </set>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.a1-adapter-api.rpc-name' value='getNearRT-RICs'/>
+ <parameter name='tmp.a1Adapter-dmaap-resp.status-code' value='`$response-code`'/>
+ <parameter name='tmp.a1Adapter-dmaap-resp.status-value' value='`$response-message`'/>
+ <parameter name='tmp.a1Policy-dmaap-resp.payload' value="`$tmp.near-rt-ric-id`" />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Before DMAAP Event - template file name, restapiURL"/>
+ <parameter name='field3' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish-generic-response.template`" />
+ <parameter name='field4' value="`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-response.topic`" />
+ <parameter name='field5' value="Status Code and Status Value to be published" />
+ <parameter name='field6' value="`$tmp.a1Adapter-dmaap-resp.status-code`" />
+ <parameter name='field7' value="`$tmp.a1Adapter-dmaap-resp.status-value`" />
+ <parameter name='field8' value="A1 Adapter DMAAP Response Payload" />
+ <parameter name='field9' value="`$tmp.a1Policy-dmaap-resp.payload`" />
+ <parameter name='field10' value="RPC Name" />
+ <parameter name='field11' value="`$tmp.a1-adapter-api.rpc-name`" />
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish-generic-response.template`" />
+ <parameter name='restapiUrl' value="`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-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="response-code" value="500" />
+ <parameter name="response-message" value="Error publishing DMAAP A1 Policy Response message. " />
+ </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/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="DMAAP A1Policy message Successfully Published "/>
+ </record>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="response-code" value="500" />
+ <parameter name="response-message" value="A1 Mediator Not Deployed. Aborting Health Check" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <block>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.a1-adapter-api.rpc-name' value='getNearRT-RICs'/>
+ <parameter name='tmp.a1Adapter-dmaap-resp.status-code' value='`$response-code`'/>
+ <parameter name='tmp.a1Adapter-dmaap-resp.status-value' value='`$response-message`'/>
+ <parameter name='tmp.a1Policy-dmaap-resp.payload' value="`$tmp.near-rt-ric-id`" />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Before DMAAP Event - template file name, restapiURL"/>
+ <parameter name='field3' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish-generic-response.template`" />
+ <parameter name='field4' value="`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-response.topic`" />
+ <parameter name='field5' value="Status Code and Status Value to be published" />
+ <parameter name='field6' value="`$tmp.a1Adapter-dmaap-resp.status-code`" />
+ <parameter name='field7' value="`$tmp.a1Adapter-dmaap-resp.status-value`" />
+ <parameter name='field8' value="A1 Adapter DMAAP Response Payload" />
+ <parameter name='field9' value="`$tmp.a1Policy-dmaap-resp.payload`" />
+ <parameter name='field10' value="RPC Name" />
+ <parameter name='field11' value="`$tmp.a1-adapter-api.rpc-name`" />
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish-generic-response.template`" />
+ <parameter name='restapiUrl' value="`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-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="response-code" value="500" />
+ <parameter name="response-message" value="Error publishing DMAAP A1 Policy Response message. " />
+ </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/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="DMAAP A1Policy 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="`$error-message`" />
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='A1 Mediatpor is available'/>
+ <parameter name='health-status' value='200'/>
+ <parameter name='ack-final' value='Y'/>
+ </return>
+ </block>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_notifyPolicyEnforcementUpdate.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_notifyPolicyEnforcementUpdate.xml
new file mode 100644
index 00000000..70fa8049
--- /dev/null
+++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_notifyPolicyEnforcementUpdate.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='A1-ADAPTER-API' version='${project.version}'>
+ <method rpc='notifyPolicyEnforcementUpdate' mode='sync'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="A1 Adapter - notify policy enforcement update"/>
+ <parameter name="field2" value="`$notify-policy-enforcement-update-input.near-rt-ric-id`"/>
+ <parameter name="field3" value="`$notify-policy-enforcement-update-input.policy-type-id`"/>
+ <parameter name="field4" value="`$notify-policy-enforcement-update-input.policy-instance-id`"/>
+ </record>
+ <set>
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='Policy Enforcement Update Received' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='/opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <set>
+ <parameter name="tmp.near-rt-ric-id" value="`$notify-policy-enforcement-update-input.near-rt-ric-id`"/>
+ <parameter name="tmp.policy-type-id" value="`$notify-policy-enforcement-update-input.policy-type-id`"/>
+ <parameter name="tmp.policy-instance-id" value="`$notify-policy-enforcement-update-input.policy-instance-id`"/>
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="SNear-RT RIC ID"/>
+ <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
+ <parameter name="field3" value="`$tmp.policy-type-id`"/>
+ <parameter name="field4" value="`$tmp.policy-instance-id`"/>
+ </record>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.a1-adapter-api.rpc-name' value='notifyPolicyEnforcementUpdate'/>
+ <parameter name='tmp.a1Adapter-dmaap-resp.status-code' value='`$response-code`'/>
+ <parameter name='tmp.a1Adapter-dmaap-resp.status-value' value='`$response-message`'/>
+ <parameter name='tmp.a1Policy-dmaap-resp.payload' value="Policy Enforcement Update - Policies Applied" />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="Before DMAAP Event - template file name, restapiURL"/>
+ <parameter name='field3' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish-generic-response.template`" />
+ <parameter name='field4' value="`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-response.topic`" />
+ <parameter name='field5' value="Status Code and Status Value to be published" />
+ <parameter name='field6' value="`$tmp.a1Adapter-dmaap-resp.status-code`" />
+ <parameter name='field7' value="`$tmp.a1Adapter-dmaap-resp.status-value`" />
+ <parameter name='field8' value="A1 Adapter DMAAP Response Payload" />
+ <parameter name='field9' value="`$tmp.a1Policy-dmaap-resp.payload`" />
+ <parameter name='field10' value="RPC Name" />
+ <parameter name='field11' value="`$tmp.a1-adapter-api.rpc-name`" />
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.dmaap-publish-generic-response.template`" />
+ <parameter name='restapiUrl' value="`$prop.dmaap-message-router.url + $prop.a1Adapter-dmaap-policy-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="response-code" value="500" />
+ <parameter name="response-message" value="Error publishing DMAAP A1 Policy Response message. " />
+ </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/A1-Adapter.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="DMAAP A1Policy 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="`$error-message`" />
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='Policy Enforcement Update Received'/>
+ <parameter name='health-status' value='200'/>
+ <parameter name='ack-final' value='Y'/>
+ </return>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file