blob: feb3253b9db80676bf0c5bd46c1f4193c246ff75 (
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
97
98
99
100
101
102
103
|
<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 A1 Policy:"/>
<parameter name="field2" value="`$delete-a1-policy-input.near-rt-ric-url`"/>
</record>
<set>
<parameter name='tmp-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`"/>
<parameter name="tmp.proxy-url" value="`$prop.a1Mediator.proxy.url`"/>
</set>
<block>
<switch test='`$tmp.proxy-url`'>
<outcome value=''>
<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 A1 Policy: No proxy found on properties file "/>
</record>
</outcome>
<outcome value='Other'>
<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 A1 Policy: Proxy url: "/>
<parameter name="field2" value="`$tmp.proxy-url`"/>
</record>
</outcome>
</switch>
</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="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"/>
<parameter name="proxyUrl" value="`$tmp.proxy-url`"/>
<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`"/>
<parameter name='field3' value='`$a1MediatorRsp.response-code`'/>
<parameter name='field4' value='`$a1MediatorRsp.response-message`'/>
</record>
<set>
<parameter name='body' value='`$a1MediatorRsp.httpResponse`'/>
<parameter name='tmp-response-code' value='`$a1MediatorRsp.response-code`'/>
<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>
</set>
</block>
</outcome>
<outcome value='failure'>
<block>
<set>
<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>
<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>
</set>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name='response-code' value='`$a1MediatorRsp.response-code`'/>
<parameter name='response-message' value='`$a1MediatorRsp.response-message`'/>
</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="`$tmp-response-code`" />
<parameter name='response-message' value="Delete Policy Instance executed successfully"/>
<parameter name='ack-final' value='Y'/>
</return>
</block>
</block>
</method>
</service-logic>
|