aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/optical-service/src/main/xml/optical-service_service-delete-msa.xml
blob: a42331716cce01d3b941ad315e1ebde16cbad156 (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
<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='service-delete-msa' mode='sync'>
        <block atomic="true">
            <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
                <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/optical-service-delete-msa.json'`" />
                <parameter name="restapiUrl" value="`$controller-ip + '/cxf/openroadm/openroadm-services/' + $optical-service-delete-input.payload.service-name`"/>
                <parameter name='restapiUser' value='admin' />
                <parameter name='restapiPassword' value='admin' />
                <parameter name="httpMethod" value="DELETE"/>
                <parameter name="responsePrefix" value="service-delete-response"/>
                <parameter name='contentType' value='application/json' />
                <parameter name='format' value='json' />
                <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.msa.jks"/>
                <parameter name="trustStorePassword" value="adminadmin"/>
                <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
                <parameter name="keyStorePassword" value="adminadmin"/>
                <outcome value='failure'>
                    <block atomic='true'>
                        <return status='failure'>
                            <parameter name='error-code' value='500' />
                            <parameter name='error-message' value='Error deleting the Service' />
                        </return>
                    </block>
                </outcome>
                <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/optical-service-create.log" />
                            <parameter name="level" value="info" />
                            <parameter name="field1" value="Successfully sent the request"/>
                        </record>
                        <switch test='`$service-delete-response.configuration-response-common.response-code`'>
                            <outcome value='Other'>
                                <return status='failure'>
                                    <parameter name='error-code' value='`$service-delete-response.configuration-response-common.response-code`' />
                                    <parameter name='error-message' value='`$service-delete-response.configuration-response-common.response-message`' />
                                </return>
                            </outcome>
                            <outcome value='200'>
                                <block atomic='true'>
                                    <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
                                        <parameter name="file" value="/opt/opendaylight/current/data/log/optical-service-create.log" />
                                        <parameter name="level" value="info" />
                                        <parameter name="field1" value="Inside controller"/>
                                    </record>
                                    <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL' 
key='SELECT *
from REQUEST_DETAILS 
WHERE request_id = $optical-service-delete-input.request-id'
pfx='output'></get-resource>
                                    <set>
                                        <parameter name='request-id' value='`$optical-service-create-input.request-id`' />
                                    </set>
                                    <call module='optical-service' rpc='aai-delete-service-handling' mode='sync' ></call>
                                    <set>
                                        <parameter name='final-response-code' value="200" />
                                    </set>
                                </block>
                            </outcome>
                        </switch>
                    </block>
                </outcome>
            </execute>
        </block>
    </method>
</service-logic>