blob: cdb04afb7e322e865e8c820dc8f8b8f12f3e301a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
<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>
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key="SELECT * from REQUEST_DETAILS WHERE domain_requests = $request-id "
pfx='access'></get-resource>
<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
resource='SQL'
key='UPDATE REQUEST_DETAILS SET status = "CREATED" WHERE request_id = $access.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"/>
<parameter name="field2" value="`$access.request-id`"/>
</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>
<set>
<parameter name='so.service-instance-id' value='`$access.service-instance-id`' />
<parameter name='so.service-type' value='`$access.service-type`' />
<parameter name='so.svc-request-id' value='`$access.request-id`' />
<parameter name='so.response-code' value='`$response-code`' />
<parameter name='so.response-message' value='`$response-message`' />
<parameter name='so.ack-final-indicator' value='Y' />
</set>
<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="SO Parameters"/>
<parameter name="field2" value="`$so.service-instance-id`"/>
<parameter name="field3" value="`$so.svc-request-id`"/>
<parameter name="field4" value="`$so.response-code`"/>
</record>
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name="templateFileName" value="`$prop.restapi.templateDir + '/async-response-so.json'`" />
<parameter name="restapiUrl" value="http://so-bpmn-infra.onap:8081/mso/async/services/updateStatus"/>
<parameter name="restapiUser" value="sdncaBpmn" />
<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>
|