diff options
author | 2019-12-20 15:07:46 -0600 | |
---|---|---|
committer | 2019-12-20 15:07:46 -0600 | |
commit | 8dd16669775bf23c35c25b6adf2f5adccdda1730 (patch) | |
tree | ba01f54c84d6cd529b23e856cc730cab4987a018 /platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyInstance.xml | |
parent | fc4bb348c8a8b4a5d5f77065b8ebbca16d6ce5b8 (diff) |
DG's and Templates for A1 Adapter
Included are 10 DG's, any pertinent templates, and updated properties
file
Issue-ID: CCSDK-2013
Signed-off-by: SandeepLinux <Sandeep.Shah@ibm.com>
Change-Id: Ia2edfb3d1be5043101487289fa15e71d953ddf1c
Diffstat (limited to 'platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyInstance.xml')
-rw-r--r-- | platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyInstance.xml | 470 |
1 files changed, 470 insertions, 0 deletions
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyInstance.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyInstance.xml new file mode 100644 index 00000000..569c8db5 --- /dev/null +++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyInstance.xml @@ -0,0 +1,470 @@ +<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='createPolicyInstance' 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 Create Policy Instance. RPC Parms:"/> + <parameter name="field2" value="`$create-policy-instance-input.near-rt-ric-id`"/> + <parameter name="field3" value="`$create-policy-instance-input.policy-type-id`"/> + <parameter name="field4" value="`$create-policy-instance-input.policy-instance-id`"/> + <parameter name="field5" value="A1 Adapter Create Policy Instance. Number of Policy Properties"/> + <parameter name="field6" value="`$create-policy-instance-input.properties_length`"/> + </record> + <set> + <parameter name='response-code' value='200' /> + <parameter name='response-message' value='Successful execution of createPolicyInstance RPC' /> + </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> + <for index='idx' start='0' end='`$create-policy-instance-input.properties_length`' > + <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 Create Policy Instance. Properties Name and Value"/> + <parameter name="field2" value="`$idx`"/> + <parameter name="field3" value="`$create-policy-instance-input.properties[$idx].property-name`"/> + <parameter name="field4" value="`$create-policy-instance-input.properties[$idx].property-value`"/> + </record> + </for> + <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="Properties read .. A1 Mediator 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`"/> + <parameter name="field6" value="A1 Mediator deployed (true/false): "/> + <parameter name="field7" value="`$prop.ric-plt-A1Mediator-deployed`"/> + </record> + <switch test='`$prop.ric-plt-A1Mediator-deployed`'> + <outcome value='true'> + <block atomic='true'> + <block atomic='true'> + <execute plugin="org.onap.ccsdk.sli.plugins.template.TemplateNode" method="evaluateTemplate" > + <parameter name='templatePath' value='a1-policy-instance-property-payload-template.vtl' /> + <parameter name='output' value='restapi-payload' /> + <parameter name='prefix' value='a1-mediator' /> + <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/A1-Adapter.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="__TIMESTAMP__"/> + <parameter name="field2" value="Redndred A1 Mediator RestAPI payload template as a string"/> + <parameter name='field3' value='`$a1-mediator.restapi-payload`' /> + </record> + </block> + </outcome> + <outcome value='failure'> + <block> + <set> + <parameter name='response-code' value='500'/> + <parameter name='response-message' value='Error creating A1 Mediator Rest API payload string. Aborting A1 Policy Instance creation'/> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="response-code" value="500" /> + <parameter name="response-message" value="Error creating A1 Mediatory Rest API payload string. Aborting A1 Policy Instance creation" /> + </return> + <block atomic='true'> + <set> + <parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyInstance'/> + <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="None" /> + </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 Not Required" /> + <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> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' > + <parameter name="source" value="`$a1-mediator.restapi-payload`"/> + <parameter name="outputPath" value="tmp.a1-mediator-restapi.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/A1-Adapter.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.a1-mediator-restapi.payload`' /> + </record> + </block> + </outcome> + <outcome value='failure'> + <block> + <set> + <parameter name='response-code' value='500'/> + <parameter name="response-message" value="Error removing lines from A1 Mediator Rest API payload string. Aborting A1 Policy Instance creation" /> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="response-code" value="500" /> + <parameter name="response-message" value="Error removing lines from A1 Mediator Rest API payload string. Aborting A1 Policy creation" /> + </return> + <block atomic='true'> + <set> + <parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyInstance'/> + <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="None" /> + </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 Not Required" /> + <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> + </block> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' > + <parameter name="source" value="`$tmp.a1-mediator-restapi.payload`"/> + <parameter name="outputPath" value="tmp.a1-mediator-restapi.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/A1-Adapter.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.a1-mediator-restapi.payload`' /> + </record> + </block> + </outcome> + <outcome value='failure'> + <block> + <set> + <parameter name='response-code' value='500'/> + <parameter name="response-message" value="Error removing tabs from A1 Mediator Rest API payload string. Aborting A1 Policy Instance creation" /> + </set> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="response-code" value="500" /> + <parameter name="response-message" value="Error removing tabs from A1 Mediator Rest API payload string. Aborting A1 Policy creation" /> + </return> + <block atomic='true'> + <set> + <parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyInstance'/> + <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="None" /> + </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 Not Required" /> + <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> + </block> + </outcome> + </execute> + </block> + <block atomic='true'> + <set> + <parameter name="tmp.near-rt-ric-id" value="`$create-policy-instance-input.near-rt-ric-id`"/> + <parameter name="tmp.policy-type-id" value="`$create-policy-instance-input.policy-type-id`"/> + <parameter name="tmp.policy-instance-id" value="`$create-policy-instance-input.policy-instance-id`"/> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$prop.restapi.policy`"/> + <parameter name="outputPath" value="tmp.restapi.policy-url"/> + <parameter name="target" value="{policy_type_id}"/> + <parameter name="replacement" value="`$tmp.policy-type-id`"/> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' > + <parameter name="source" value="`$tmp.restapi.policy-url`"/> + <parameter name="outputPath" value="tmp.restapi.policy-url"/> + <parameter name="target" value="{policy_instance_id}"/> + <parameter name="replacement" value="`$tmp.policy-instance-id`"/> + </execute> + <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="Setting variables for A1 Adapter Create Policy Instance."/> + <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`"/> + <parameter name="field5" value="`$tmp.restapi.policy-url`"/> + <parameter name="field6" value="`$a1-mediator.restapi-payload`"/> + <parameter name="field7" value="Temporary A1 Mediatory Payload"/> + <parameter name="field8" value="`$tmp.a1-mediator-restapi.payload`"/> + </record> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.policy-url`"/> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="PUT"/> + <parameter name="responsePrefix" value="a1MediatorRsp"/> + <parameter name='contentType' value='application/json' /> + <parameter name='accept' value='application/json' /> + <parameter name="requestBody" value="`$tmp.a1-mediator-restapi.payload`"/> + <parameter name="convertResponse" value="false"/> + <outcome value='failure'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="response-code" value="404" /> + <parameter name="response-message" value="Error creating A1 Policy Instance. Aborting A1 Policy creation" /> + </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/A1-Adapter.log" /> + <parameter name="level" value="info" /> + <parameter name="field1" value="A1 Policy Instance Accepted."/> + </record> + </block> + </outcome> + </execute> + </block> + </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='createPolicyInstance'/> + <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="None" /> + </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 Not Required" /> + <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 A1 Policy creation" /> + </return> + </block> + </outcome> + </switch> + <block> + <block atomic='true'> + <set> + <parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyInstance'/> + <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="None" /> + </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 Not Required" /> + <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 Adapter is healthy'/> + <parameter name='health-status' value='200'/> + <parameter name='ack-final' value='Y'/> + </return> + </block> + </block> + </method> +</service-logic>
\ No newline at end of file |