diff options
author | 2020-03-02 06:35:43 +0000 | |
---|---|---|
committer | 2020-03-02 06:36:45 +0000 | |
commit | bea938e72991786e13566d9df66b24a102442495 (patch) | |
tree | b10b02e28b4dc9a01e624f234588158381f2b426 /platform-logic/optical-service/src/main/xml/optical-service_create-service-async.xml | |
parent | 329b7c6477ec677507b0de33a053f887526b3d84 (diff) |
DG'S added for MDONS use case
Change-Id: Ie9570b9be519e54d43b547bcfbffc16d12b16123
Issue-ID: SDNC-928
Signed-off-by: Mehreen Kaleem <mehreen.kaleem@us.fujitsu.com>
Former-commit-id: 6493900ed7a55ff00b2f31f8802f30f54bf335ae
Diffstat (limited to 'platform-logic/optical-service/src/main/xml/optical-service_create-service-async.xml')
-rw-r--r-- | platform-logic/optical-service/src/main/xml/optical-service_create-service-async.xml | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/platform-logic/optical-service/src/main/xml/optical-service_create-service-async.xml b/platform-logic/optical-service/src/main/xml/optical-service_create-service-async.xml new file mode 100644 index 00000000..db55f387 --- /dev/null +++ b/platform-logic/optical-service/src/main/xml/optical-service_create-service-async.xml @@ -0,0 +1,72 @@ +<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='optical-service' version='${project.version}'>
+ <method rpc='create-service-async' mode='sync'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/async-notif.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Inside Create Service Async"/>
+ </record>
+ <switch test='`$response-code`'>
+ <outcome value='200'>
+ <block atomic='true'>
+ <set>
+ <parameter name='response-message' value='SUCCESS' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService'
+force='true'
+resource='service-instance'
+ key='customer.global-customer-id = $output.global-customer-id AND
+ service-subscription.service-type = $output.service-type AND
+ service-instance.service-instance-id = $output.service-instance-id'
+ local-only='false'>
+ <parameter name='orchestration-status' value='CREATED' />
+ </update>
+ <save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+resource='SQL'
+key='UPDATE REQUEST_DETAILS SET status = "CREATED" WHERE request_id = $request-id'
+force='true' pfx='save-result'></save>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/async-notif.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Finished updating service in AAI and DB to CREATED"/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic='true'>
+ <set>
+ <parameter name='response-message' value='FAILURE' />
+ </set>
+ <call module='optical-service' rpc='aai-delete-service-handling' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.template.so.response.filename`" />
+ <parameter name="restapiUrl" value="`$output.notification-url`"/>
+ <parameter name="restapiUser" value="`$prop.so.username`" />
+ <parameter name="restapiPassword" value="`$prop.so.password`"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="so-response"/>
+ <parameter name='contentType' value='application/json' />
+ <parameter name='format' value='json' />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/async-notif.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Send to SO fails for service create"/>
+ </record>
+ </outcome>
+ <outcome value='success'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/async-notif.log" />
+ <parameter name="level" value="info" />
+ <parameter name="field1" value="Send to SO Success for service create"/>
+ </record>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |