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_createPolicyInstance.xml470
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyType.xml534
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deleteA1Policy.xml78
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deletePolicyInstance.xml268
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deletePolicyType.xml257
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1Policy.xml84
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1PolicyStatus.xml84
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1PolicyType.xml18
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getHealthCheck.xml245
-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_getPolicyInstance.xml297
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyInstances.xml292
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyTypes.xml272
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getStatus.xml268
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_notifyPolicyEnforcementUpdate.xml95
-rw-r--r--platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_putA1Policy.xml68
16 files changed, 324 insertions, 3164 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
deleted file mode 100644
index 569c8db5..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyInstance.xml
+++ /dev/null
@@ -1,470 +0,0 @@
-<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
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyType.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyType.xml
deleted file mode 100644
index 11b7c70d..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_createPolicyType.xml
+++ /dev/null
@@ -1,534 +0,0 @@
-<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='createPolicyType' 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 Type. RPC Parms:"/>
- <parameter name="field2" value="`$create-policy-type-input.near-rt-ric-id`"/>
- <parameter name="field3" value="`$create-policy-type-input.policy-type-id`"/>
- <parameter name="field4" value="`$create-policy-type-input.description`"/>
- <parameter name="field5" value="A1 Adapter Create Policy Type Name:"/>
- <parameter name="field6" value="`$create-policy-type-input.name`"/>
- <parameter name="field7" value="A1 Adapter Create Policy Type. Number of Policy Type Properties"/>
- <parameter name="field8" value="`$create-policy-type-input.properties_length`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='Successful execution of createPolicyType 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='idx1' start='0' end='`$create-policy-type-input.properties_length`' >
- <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 Type. Properties Number, Name and Number of Policy Statements"/>
- <parameter name="field2" value="`$idx1`"/>
- <parameter name="field3" value="`$create-policy-type-input.properties[$idx1].property-name`"/>
- <parameter name="field4" value="`$create-policy-type-input.properties[$idx1].policy-statements_length`"/>
- </record>
- <for index='idx2' start='0' end='`$create-policy-type-input.properties[$idx1].policy-statements_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 Type. Policy Statements for policy statement # "/>
- <parameter name="field2" value="`$idx2`"/>
- <parameter name="field3" value="`$create-policy-type-input.properties[$idx1].policy-statements[$idx2].policy-statement`"/>
- <parameter name="field4" value="`$create-policy-type-input.properties[$idx1].policy-statements[$idx2].policy-statement-value`"/>
- </record>
- </for>
- </block>
- </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-type-create-schema-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 Type 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 Mediator Rest API payload string. Aborting A1 Policy Type creation'/>
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyType'/>
- <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 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='createPolicyType'/>
- <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 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='createPolicyType'/>
- <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-type-input.near-rt-ric-id`"/>
- <parameter name="tmp.policy-type-id" value="`$create-policy-type-input.policy-type-id`"/>
- <parameter name="tmp.name" value="`$create-policy-type-input.name`"/>
- <parameter name="tmp.description" value="`$create-policy-type-input.description`"/>
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.policytype`"/>
- <parameter name="outputPath" value="tmp.restapi.policytype-url"/>
- <parameter name="target" value="{policy_type_id}"/>
- <parameter name="replacement" value="`$tmp.policy-type-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 Type."/>
- <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
- <parameter name="field3" value="`$tmp.policy-type-id`"/>
- <parameter name="field4" value="`$tmp.name`"/>
- <parameter name="field5" value="`$tmp.restapi.policytype-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.policytype-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'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name="response-message" value="Error creating A1 Policy Policy. Aborting A1 Policy Type creation" />
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="404" />
- <parameter name="response-message" value="Error creating A1 Policy Policy. Aborting A1 Policy Type creation" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyType'/>
- <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>
- <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 Type Accepted."/>
- </record>
- </block>
- </outcome>
- </execute>
- </block>
- </block>
- </outcome>
- <outcome value='false'>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='createPolicyType'/>
- <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>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='A1 Mediator Not Deployed'/>
- </set>
- <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='createPolicyType'/>
- <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
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deleteA1Policy.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deleteA1Policy.xml
new file mode 100644
index 00000000..a351cc5c
--- /dev/null
+++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deleteA1Policy.xml
@@ -0,0 +1,78 @@
+<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='deleteA1Policy' 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="Delete Policy:"/>
+ <parameter name="field2" value="`$delete-a1-policy-input.near-rt-ric-url`"/>
+ </record>
+ <set>
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='deletePolicy executed successfully' />
+ </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>
+ <block atomic='true'>
+ <set>
+ <parameter name="tmp.near-rt-ric-url" value="`$delete-a1-policy-input.near-rt-ric-url`"/>
+ </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="Setting variables for A1 Adapter Delete Policy Instance."/>
+ <parameter name="field2" value="`$tmp.near-rt-ric-url`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$tmp.near-rt-ric-url`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="DELETE"/>
+ <parameter name="responsePrefix" value="a1MediatorRsp"/>
+ <parameter name='contentType' value='application/json' />
+ <parameter name='accept' value='application/json' />
+ <parameter name="convertResponse" value="false"/>
+ <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 Delete Policy Information "/>
+ <parameter name="field2" value="`$a1MediatorRsp.httpResponse`"/>
+ </record>
+ <set>
+ <parameter name='body' value='`$a1MediatorRsp.httpResponse`'/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='response-code' value='500'/>
+ <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="response-code" value="404" />
+ <parameter name="response-message" value="Error in Deleting A1 Policy Instance. Aborting" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ <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='deletePolicyInstance executed successfully'/>
+ <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_deletePolicyInstance.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deletePolicyInstance.xml
deleted file mode 100644
index 6cc39b94..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deletePolicyInstance.xml
+++ /dev/null
@@ -1,268 +0,0 @@
-<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='deletePolicyInstance' 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="Delete Policy Instance associated with Near RT RIC ID and Policy Type ID"/>
- <parameter name="field2" value="`$delete-policy-instance-input.near-rt-ric-id`"/>
- <parameter name="field3" value="`$delete-policy-instance-input.policy-type-id`"/>
- <parameter name="field4" value="`$delete-policy-instance-input.policy-instance-id`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='deletePolicyInstance executed successfully' />
- </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'>
- <block atomic='true'>
- <set>
- <parameter name="tmp.near-rt-ric-id" value="`$delete-policy-instance-input.near-rt-ric-id`"/>
- <parameter name="tmp.policy-type-id" value="`$delete-policy-instance-input.policy-type-id`"/>
- <parameter name="tmp.policy-instance-id" value="`$delete-policy-instance-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="Setting variables for A1 Adapter Delete 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`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.policy`"/>
- <parameter name="outputPath" value="tmp.restapi.policyinstance-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.policyinstance-url`"/>
- <parameter name="outputPath" value="tmp.restapi.policyinstance-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 Delete 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.policyinstance-url`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstance-url`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="DELETE"/>
- <parameter name="responsePrefix" value="a1MediatorRsp"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='accept' value='application/json' />
- <parameter name="convertResponse" value="false"/>
- <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="Details of A1 Policy Instance "/>
- <parameter name="field2" value="`$a1MediatorRsp`"/>
- </record>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="500" />
- <parameter name="response-message" value="Error in Deleting A1 Policy Instance. Aborting" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='deletePolicyInstance'/>
- <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="Working On it" />
- </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>
- </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='deletePolicyInstance'/>
- <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="Working On it" />
- </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="Error in Deleting A1 Policy Instance. Aborting" />
- </return>
- </block>
- </outcome>
- </switch>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='deletePolicyInstance'/>
- <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="Working On it" />
- </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='deletePolicyInstance executed successfully'/>
- <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_deletePolicyType.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deletePolicyType.xml
deleted file mode 100644
index 7711962b..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_deletePolicyType.xml
+++ /dev/null
@@ -1,257 +0,0 @@
-<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='deletePolicyType' 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="Delete Policy Type from Near RT RIC ID"/>
- <parameter name="field2" value="`$delete-policy-type-input.near-rt-ric-id`"/>
- <parameter name="field3" value="`$delete-policy-type-input.policy-type-id`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='deletePolicyType executed successfully' />
- </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'>
- <block atomic='true'>
- <set>
- <parameter name="tmp.near-rt-ric-id" value="`$delete-policy-type-input.near-rt-ric-id`"/>
- <parameter name="tmp.policy-type-id" value="`$delete-policy-type-input.policy-type-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="Setting variables for A1 Adapter Delete Policy Type."/>
- <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
- <parameter name="field3" value="`$tmp.policy-type-id`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.policytype`"/>
- <parameter name="outputPath" value="tmp.restapi.policytype-url"/>
- <parameter name="target" value="{policy_type_id}"/>
- <parameter name="replacement" value="`$tmp.policy-type-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 Delete Policy Type."/>
- <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
- <parameter name="field3" value="`$tmp.restapi.policytype-url`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.policytype-url`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="DELETE"/>
- <parameter name="responsePrefix" value="a1MediatorRsp"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='accept' value='application/json' />
- <parameter name="convertResponse" value="false"/>
- <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="Delete policy type operation executed against A1 Mediator "/>
- </record>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="404" />
- <parameter name="response-message" value="Error in Delete Policy. Aborting" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='deletePolicyType'/>
- <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="Working On it" />
- </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>
- </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='deletePolicyType'/>
- <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="Working On it" />
- </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 Policy Delete" />
- </return>
- </block>
- </outcome>
- </switch>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='deletePolicyType'/>
- <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="Working On it" />
- </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 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
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1Policy.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1Policy.xml
new file mode 100644
index 00000000..79b4a9c7
--- /dev/null
+++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1Policy.xml
@@ -0,0 +1,84 @@
+<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='getA1Policy' 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="Get A1 Policy:"/>
+ <parameter name="field2" value="`$get-a1-policy-input.near-rt-ric-url`"/>
+ </record>
+ <set>
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='Get A1 Policy executed successfully' />
+ </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>
+ <block atomic='true'>
+ <set>
+ <parameter name="tmp.near-rt-ric-url" value="`$get-a1-policy-input.near-rt-ric-url`"/>
+ </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="Setting variables for A1 Adapter Get Policy Instance."/>
+ <parameter name="field2" value="`$tmp.near-rt-ric-url`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$tmp.near-rt-ric-url`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="GET"/>
+ <parameter name="responsePrefix" value="a1MediatorRsp"/>
+ <parameter name='contentType' value='application/json' />
+ <parameter name='accept' value='application/json' />
+ <parameter name="convertResponse" value="false"/>
+ <outcome value='success'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >
+ <parameter name="source" value="`$a1MediatorRsp.httpResponse`"/>
+ <parameter name="outputPath" value="tmp.a1-mediator-restapi.httpResponse"/>
+ <parameter name="target" value="\n"/>
+ <parameter name="replacement" value=""/>
+ </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="A1 Get Policy Information "/>
+ <parameter name="field2" value="`$tmp.a1-mediator-restapi.httpResponse`"/>
+ </record>
+ <set>
+ <parameter name='responseBody' value='`$tmp.a1-mediator-restapi.httpResponse`'/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='response-code' value='500'/>
+ <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="response-code" value="500" />
+ <parameter name="response-message" value="Error in Getting A1 Policy Instance. Aborting" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ <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='Get PolicyInstance executed successfully'/>
+ <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_getA1PolicyStatus.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1PolicyStatus.xml
new file mode 100644
index 00000000..703c7dfe
--- /dev/null
+++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1PolicyStatus.xml
@@ -0,0 +1,84 @@
+<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='getA1PolicyStatus' 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="Get A1 Policy Status:"/>
+ <parameter name="field2" value="`$get-a1-policy-status-input.near-rt-ric-url`"/>
+ </record>
+ <set>
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='Get A1 Policy executed successfully' />
+ </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>
+ <block atomic='true'>
+ <set>
+ <parameter name="tmp.near-rt-ric-url" value="`$get-a1-policy-status-input.near-rt-ric-url`"/>
+ </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="Setting variables for A1 Adapter Get Policy Status."/>
+ <parameter name="field2" value="`$tmp.near-rt-ric-url`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$tmp.near-rt-ric-url`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="GET"/>
+ <parameter name="responsePrefix" value="a1MediatorRsp"/>
+ <parameter name='contentType' value='application/json' />
+ <parameter name='accept' value='application/json' />
+ <parameter name="convertResponse" value="true"/>
+ <outcome value='success'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >
+ <parameter name="source" value="`$a1MediatorRsp.httpResponse`"/>
+ <parameter name="outputPath" value="tmp.a1-mediator-restapi.httpResponse"/>
+ <parameter name="target" value="\n"/>
+ <parameter name="replacement" value=""/>
+ </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="A1 Get Policy Status "/>
+ <parameter name="field2" value="`$tmp.a1-mediator-restapi.httpResponse`"/>
+ </record>
+ <set>
+ <parameter name='responseBody' value='`$tmp.a1-mediator-restapi.httpResponse`'/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='response-code' value='500'/>
+ <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="response-code" value="404" />
+ <parameter name="response-message" value="Error in Getting A1 Policy Status. Aborting" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ <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='Get Policy Status executed successfully'/>
+ <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_getA1PolicyType.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1PolicyType.xml
index 39908d81..cea0bc5f 100644
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1PolicyType.xml
+++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getA1PolicyType.xml
@@ -37,19 +37,21 @@
<parameter name="convertResponse" value="true"/>
<outcome value='success'>
<block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >
+ <parameter name="source" value="`$a1MediatorRsp.httpResponse`"/>
+ <parameter name="outputPath" value="tmp.a1-mediator-restapi.httpResponse"/>
+ <parameter name="target" value="\n"/>
+ <parameter name="replacement" value=""/>
+ </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="A1 Policy Type Information "/>
- <parameter name="field2" value="`$a1MediatorRsp.httpResponse`"/>
+ <parameter name="field2" value="`$tmp.a1-mediator-restapi.httpResponse`"/>
</record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='ctxSetAttribute'>
- <parameter name='object' value= "`$a1MediatorRsp.httpResponse`" />
- <parameter name='key' value='a1PolicyTypeResponse' />
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/opt/opendaylight/current/data/log/A1-Adapter-getPolicytype-specific-context.log' />
- </execute>
+ <set>
+ <parameter name='responseBody' value="`$tmp.a1-mediator-restapi.httpResponse`"/>
+ </set>
</block>
</outcome>
<outcome value='failure'>
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getHealthCheck.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getHealthCheck.xml
deleted file mode 100644
index 6ba77520..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getHealthCheck.xml
+++ /dev/null
@@ -1,245 +0,0 @@
-<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='getHealthCheck' 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 Health Check. Near RT RIC ID"/>
- <parameter name="field2" value="`$get-health-check-input.near-rt-ric-id`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='A1 is Healthy' />
- </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'>
- <block atomic='true'>
- <block atomic='true'>
- <set>
- <parameter name="tmp.near-rt-ric-id" value="`$get-health-check-input.near-rt-ric-id`"/>
- <parameter name="tmp.restapi.healthcheck-url" value="`$prop.restapi.healthcheck`"/>
- </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="Setting variables for A1 Adapter Health Check."/>
- <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
- <parameter name="field3" value="`$tmp.restapi.healthcheck-url`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.healthcheck-url`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="GET"/>
- <parameter name="responsePrefix" value="a1MediatorRsp"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='accept' value='application/json' />
- <parameter name="convertResponse" value="false"/>
- <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 Mediator is Healthy."/>
- </record>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='A1 Mediator Not Healthy'/>
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="404" />
- <parameter name="response-message" value="Error in A1 Mediator Health Check. Aborting A1 Health Check" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getHealthCheck'/>
- <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>
- </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='getHealthCheck'/>
- <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 Health Check" />
- </return>
- </block>
- </outcome>
- </switch>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getHealthCheck'/>
- <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
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
deleted file mode 100644
index 0e3a2c16..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getNearRT-RICs.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<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_getPolicyInstance.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyInstance.xml
deleted file mode 100644
index 03fa7855..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyInstance.xml
+++ /dev/null
@@ -1,297 +0,0 @@
-<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='getPolicyInstance' 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="Get Policy Instance details associated with Near RT RIC ID and Policy Type ID"/>
- <parameter name="field2" value="`$get-policy-instance-input.near-rt-ric-id`"/>
- <parameter name="field3" value="`$get-policy-instance-input.policy-type-id`"/>
- <parameter name="field4" value="`$get-policy-instance-input.policy-instance-id`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='getPolicyInstance executed successfully' />
- </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'>
- <block atomic='true'>
- <set>
- <parameter name="tmp.near-rt-ric-id" value="`$get-policy-instance-input.near-rt-ric-id`"/>
- <parameter name="tmp.policy-type-id" value="`$get-policy-instance-input.policy-type-id`"/>
- <parameter name="tmp.policy-instance-id" value="`$get-policy-instance-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="Setting variables for A1 Adapter Get 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`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.policy`"/>
- <parameter name="outputPath" value="tmp.restapi.policyinstance-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.policyinstance-url`"/>
- <parameter name="outputPath" value="tmp.restapi.policyinstance-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 Get 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.policyinstance-url`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstance-url`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="GET"/>
- <parameter name="responsePrefix" value="a1MediatorRsp"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='accept' value='application/json' />
- <parameter name="convertResponse" value="true"/>
- <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="Details of A1 Policy Instance "/>
- <parameter name="field2" value="`$a1MediatorRsp.httpResponse`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replaceAll' >
- <parameter name="source" value="`$a1MediatorRsp.httpResponse`"/>
- <parameter name="outputPath" value="tmp.a1-mediator-restapi.payload"/>
- <parameter name="target" value="\n"/>
- <parameter name="replacement" value=""/>
- </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 lines removed \r"/>
- <parameter name='field3' value='`$tmp.a1-mediator-restapi.payload`' />
- </record>
- </block>
- </outcome>
- <outcome value='failure'>
- <block></block>
- </outcome>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/opt/opendaylight/current/data/log/A1-Adapter-getPolicyInstance-specific-context.log' />
- </execute>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="500" />
- <parameter name="response-message" value="Error in Getting A1 Policy Instances. Aborting" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyInstance'/>
- <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.a1-mediator-restapi.payload`' />
- </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>
- </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='getPolicyInstance'/>
- <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.a1-mediator-restapi.payload`' />
- </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="Error in Getting A1 Policy Instance. Aborting" />
- </return>
- </block>
- </outcome>
- </switch>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyInstance'/>
- <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.a1-mediator-restapi.payload`' />
- </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='getPolicyInstance executed successfully'/>
- <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_getPolicyInstances.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyInstances.xml
deleted file mode 100644
index c486afb9..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyInstances.xml
+++ /dev/null
@@ -1,292 +0,0 @@
-<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='getPolicyInstances' 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="Get All Policy Instance from Near RT RIC ID and Policy Type ID"/>
- <parameter name="field2" value="`$get-policy-instances-input.near-rt-ric-id`"/>
- <parameter name="field3" value="`$get-policy-instances-input.policy-type-id`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='getPolicyInstances executed successfully' />
- </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'>
- <block atomic='true'>
- <set>
- <parameter name="tmp.near-rt-ric-id" value="`$get-policy-instances-input.near-rt-ric-id`"/>
- <parameter name="tmp.policy-type-id" value="`$get-policy-instances-input.policy-type-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="Setting variables for A1 Adapter Get Policy Instances."/>
- <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
- <parameter name="field3" value="`$tmp.policy-type-id`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.policies`"/>
- <parameter name="outputPath" value="tmp.restapi.policyinstances-url"/>
- <parameter name="target" value="{policy_type_id}"/>
- <parameter name="replacement" value="`$tmp.policy-type-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 Get Policy Instances."/>
- <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
- <parameter name="field3" value="`$tmp.policy-type-id`"/>
- <parameter name="field4" value="`$tmp.restapi.policyinstances-url`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstances-url`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="GET"/>
- <parameter name="responsePrefix" value="a1MediatorRsp"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='accept' value='application/json' />
- <parameter name="convertResponse" value="true"/>
- <outcome value='success'>
- <block>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
- <parameter name='source' value='a1MediatorRsp.httpResponse' />
- <parameter name='outputPath' value='a1MediatorPolicyInstancesList' />
- <parameter name='isEscaped' value='false' />
- </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="List of A1 Policy Instances: "/>
- <parameter name="field2" value="`$a1MediatorRsp`"/>
- </record>
- <execute plugin="org.onap.ccsdk.sli.plugins.template.TemplateNode" method="evaluateTemplate" >
- <parameter name='templatePath' value='a1Mediator-get-policy-instances.vtl' />
- <parameter name='output' value='policyInstancesList' />
- <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="A1 Policiy Instances List"/>
- <parameter name='field3' value='`$a1-mediator.policyInstancesList`' />
- </record>
- </block>
- </outcome>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/opt/opendaylight/current/data/log/A1-Adapter-getPolicyInstances-context.log' />
- </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="List of A1 Policy Types: "/>
- <parameter name="field2" value="`$a1MediatorRsp._length`"/>
- <parameter name="field3" value="`$a1MediatorRsp.httpResponse`"/>
- <parameter name="field4" value="`$a1MediatorRsp.response-code`"/>
- <parameter name="field5" value='`$a1MediatorRsp._length`' />
- <parameter name="field6" value='`$a1-mediator.policyInstancesList`' />
- </record>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="500" />
- <parameter name="response-message" value="Error in Getting A1 Policy Instances. Aborting" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyInstances'/>
- <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='`$a1-mediator.policyInstancesList`' />
- </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>
- </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='getPolicyInstances'/>
- <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='`$a1-mediator.policyInstancesList`' />
- </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="Error in Getting A1 Policy Instances. Aborting" />
- </return>
- </block>
- </outcome>
- </switch>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyInstances'/>
- <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='`$a1-mediator.policyInstancesList`' />
- </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='getPolicyInstances executed successfully'/>
- <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_getPolicyTypes.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyTypes.xml
deleted file mode 100644
index 7a6bb9c0..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getPolicyTypes.xml
+++ /dev/null
@@ -1,272 +0,0 @@
-<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='getPolicyTypes' 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="Get All Policy Types from Near RT RIC ID"/>
- <parameter name="field2" value="`$get-policy-types-input.near-rt-ric-id`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='getPolicyTypes executed successfully' />
- </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'>
- <block atomic='true'>
- <set>
- <parameter name="tmp.near-rt-ric-id" value="`$get-policy-types-input.near-rt-ric-id`"/>
- <parameter name="tmp.restapi.getPolicyTypes-url" value="`$prop.restapi.policytypes`"/>
- </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="Setting variables for A1 Adapter Get Policy Types."/>
- <parameter name="field2" value="`$tmp.near-rt-ric-id`"/>
- <parameter name="field3" value="`$tmp.restapi.getPolicyTypes-url`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.getPolicyTypes-url`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="GET"/>
- <parameter name="responsePrefix" value="a1MediatorRsp"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='accept' value='application/json' />
- <parameter name="convertResponse" value="true"/>
- <outcome value='success'>
- <block>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
- <parameter name='source' value='a1MediatorRsp.httpResponse' />
- <parameter name='outputPath' value='a1MediatorList' />
- <parameter name='isEscaped' value='false' />
- </execute>
- <execute plugin="org.onap.ccsdk.sli.plugins.template.TemplateNode" method="evaluateTemplate" >
- <parameter name='templatePath' value='a1Mediator-get-policies.vtl' />
- <parameter name='output' value='policiesList' />
- <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="A1 Policies List"/>
- <parameter name='field3' value='`$a1-mediator.policiesList`' />
- </record>
- </block>
- </outcome>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/opt/opendaylight/current/data/log/A1-Adapter-getPolicytype-context.log' />
- </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="List of A1 Policy Types: "/>
- <parameter name="field2" value="`$a1MediatorRsp._length`"/>
- <parameter name="field3" value="`$a1MediatorRsp.httpResponse`"/>
- <parameter name="field4" value="`$a1MediatorRsp.response-code`"/>
- <parameter name="field5" value='`$a1MediatorRsp._length`' />
- <parameter name="field6" value='`$a1-mediator.policiesList`' />
- </record>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="500" />
- <parameter name="response-message" value="Error in Getting A1 Policy Types. Aborting" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyTypes'/>
- <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='`$a1-mediator.policiesList`' />
- </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>
- </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='getPolicyTypes'/>
- <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='`$a1-mediator.policiesList`' />
- </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="Error in Getting A1 Policy Types. Aborting" />
- </return>
- </block>
- </outcome>
- </switch>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getPolicyTypes'/>
- <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='`$a1-mediator.policiesList`' />
- </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 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
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getStatus.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getStatus.xml
deleted file mode 100644
index fcc6da46..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_getStatus.xml
+++ /dev/null
@@ -1,268 +0,0 @@
-<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='getStatus' 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="Get status of Policy Instance associated with Near RT RIC ID and Policy Type ID"/>
- <parameter name="field2" value="`$get-status-input.near-rt-ric-id`"/>
- <parameter name="field3" value="`$get-status-input.policy-type-id`"/>
- <parameter name="field4" value="`$get-status-input.policy-instance-id`"/>
- </record>
- <set>
- <parameter name='response-code' value='200' />
- <parameter name='response-message' value='getStatus executed successfully' />
- </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'>
- <block atomic='true'>
- <set>
- <parameter name="tmp.near-rt-ric-id" value="`$get-status-input.near-rt-ric-id`"/>
- <parameter name="tmp.policy-type-id" value="`$get-status-input.policy-type-id`"/>
- <parameter name="tmp.policy-instance-id" value="`$get-status-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="Setting variables for A1 Adapter Getting status for 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`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.policystatus`"/>
- <parameter name="outputPath" value="tmp.restapi.policyinstance-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.policyinstance-url`"/>
- <parameter name="outputPath" value="tmp.restapi.policyinstance-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 getting status for 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.policyinstance-url`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.a1Mediator.url + '/' + $tmp.restapi.policyinstance-url`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="GET"/>
- <parameter name="responsePrefix" value="a1MediatorRsp"/>
- <parameter name='contentType' value='application/json' />
- <parameter name='accept' value='application/json' />
- <parameter name="convertResponse" value="false"/>
- <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="Status of A1 Policy Instance "/>
- <parameter name="field2" value="`$a1MediatorRsp`"/>
- </record>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <set>
- <parameter name='response-code' value='500'/>
- <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="response-code" value="500" />
- <parameter name="response-message" value="Error in Getting status for A1 Policy Instance. Aborting" />
- </return>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getStatus'/>
- <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="Working On it" />
- </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>
- </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='getStatus'/>
- <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="Working On it" />
- </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="Error in getting status for A1 Policy Instance. Aborting" />
- </return>
- </block>
- </outcome>
- </switch>
- <block>
- <block atomic='true'>
- <set>
- <parameter name='tmp.a1-adapter-api.rpc-name' value='getStatus'/>
- <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="Working On it" />
- </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='getStatus executed successfully'/>
- <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
deleted file mode 100644
index 70fa8049..00000000
--- a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_notifyPolicyEnforcementUpdate.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<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
diff --git a/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_putA1Policy.xml b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_putA1Policy.xml
new file mode 100644
index 00000000..d674abfd
--- /dev/null
+++ b/platform-logic/a1Adapter-api/src/main/xml/A1-ADAPTER-API_putA1Policy.xml
@@ -0,0 +1,68 @@
+<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='putA1Policy' 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="Put A1 Policy :"/>
+ <parameter name="field2" value="`$put-a1-policy-input.near-rt-ric-url`"/>
+ <parameter name="field3" value="`$put-a1-policy-input.body`"/>
+ </record>
+ <set>
+ <parameter name='response-code' value='200' />
+ <parameter name='response-message' value='Put A1 Policy executed successfully' />
+ </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>
+ <block atomic='true'>
+ <set>
+ <parameter name="tmp.near-rt-ric-url" value="`$put-a1-policy-input.near-rt-ric-url`"/>
+ <parameter name="tmp.body" value="`$put-a1-policy-input.body`"/>
+ </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="Setting variables for Put A1 Policy."/>
+ <parameter name="field2" value="`$tmp.near-rt-ric-url`"/>
+ <parameter name="field3" value="`$tmp.body`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$tmp.near-rt-ric-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.body`"/>
+ <parameter name="convertResponse" value="false"/>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='response-code' value='500'/>
+ <parameter name='response-message' value='Seems A1 Mediator Not Healthy'/>
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="response-code" value="404" />
+ <parameter name="response-message" value="Error creating A1 Policy. Aborting A1 Policy creation" />
+ </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="A1 Policy Instance Created."/>
+ </record>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file