bug fix for ccvpn integration test
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / xml / GENERIC-RESOURCE-API_wan-connection-topology-operation-deactivate.xml
1 <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='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='wan-connection-topology-operation-deactivate' mode='sync'>
2 <block atomic="true"><execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
3     <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
4     <parameter name='contextPrefix' value='prop' />
5 </execute><set>
6 <parameter name='tmp.found-network-input' value='false' /></set><for index='pidx' start='0' end='`$service-data.networks.network_length`' >
7 <switch test="`$service-data.networks.network[$pidx].network-id == $network-topology-operation-input.network-information.network-id`">
8
9 <outcome value='true'>
10 <set>
11 <parameter name='tmp.pidx' value='`$pidx`' />
12 <parameter name='tmp.network.' value='`$service-data.networks.network[$pidx].`' />
13 <parameter name='tmp.network-input-parameters' value='`$service-data.networks.network[$pidx].network-data.network-request-input.network-input-parameters`' />
14 <parameter name='tmp.found-network-input' value='true' /></set></outcome></switch></for><return status='success'>
15 <parameter name="ack-final-indicator" value="Y" />
16 <parameter name="error-code" value="200" />
17 <parameter name="error-message" value="`$error-message`" />
18 </return><block atomic="true"><set>
19 <parameter name='isLocalIdFound' value='false' /></set><for index='paidx' start='0' end='`$tmp.network.network-data.network-request-input.network-input-parameters.param_length`' >
20 <switch test="`$tmp.network.network-data.network-request-input.network-input-parameters.param[$paidx].name == 'localServiceId'`">
21 <outcome value='true'>
22 <set>
23 <parameter name='localServiceId' value='`$tmp.network.network-data.network-request-input.network-input-parameters.param[$paidx].value`' />
24 <parameter name='isLocalIdFound' value='true' /></set></outcome></switch></for><switch test="`$isLocalIdFound`">
25 <outcome value='false'>
26 <set>
27 <parameter name='sotnServiceId' value='73aa6033-a43e-3162-9bc9-085edc2b5a10' /></set></outcome></switch><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
28 <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn_get_zte_template.json' `" />
29 <parameter name="restapiUrl" value="http://10.80.80.21:8443/restconf/operations/ZTE-API-ConnectivityService:get-service-details" />
30 <parameter name="restapiUser" value="admin" />
31 <parameter name="restapiPassword" value="admin" />
32 <parameter name="format" value="json"/>
33 <parameter name="httpMethod" value="post"/>
34 <parameter name="responsePrefix" value="restApiResult"/><outcome value='success'>
35 <block atomic="true"><set>
36 <parameter name='localId' value='`$restApiResult.output.normal-service.name[0].value`' /></set><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
37 <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn_delete_zte_template.json' `" />
38 <parameter name="restapiUrl" value="http://10.80.80.21:8443/restconf/operations/ZTE-API-ConnectivityService:delete-connectivity-service" />
39 <parameter name="restapiUser" value="admin" />
40 <parameter name="restapiPassword" value="admin" />
41 <parameter name="format" value="json"/>
42 <parameter name="httpMethod" value="post"/>
43 <parameter name="responsePrefix" value="restApiResult"/><outcome value='success'>
44 <block>
45 </block></outcome><outcome value='failure'>
46 <return status='failure'>
47         <parameter name='ack-final' value='Y'/>
48         <parameter name="error-code" value="500" />
49     <parameter name="error-message" value="`'Error calling ' + $tmp.restapiUrl`" />
50 </return></outcome><outcome value='not-found'>
51 <return status='failure'>
52         <parameter name='ack-final' value='Y'/>
53         <parameter name="error-code" value="500" />
54     <parameter name="error-message" value="`'Error calling ' + $tmp.restapiUrl`" />
55 </return></outcome></execute></block></outcome><outcome value='failure'>
56 <return status='failure'>
57         <parameter name='ack-final' value='Y'/>
58         <parameter name="error-code" value="500" />
59     <parameter name="error-message" value="`'Error calling ' + $tmp.restapiUrl`" />
60 </return></outcome><outcome value='not-found'>
61 <return status='failure'>
62         <parameter name='ack-final' value='Y'/>
63         <parameter name="error-code" value="500" />
64     <parameter name="error-message" value="`'Error calling ' + $tmp.restapiUrl`" />
65 </return></outcome></execute></block></block></method></service-logic>