2 xmlns='http://www.onap.org/sdnc/svclogic'
3 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}'>
4 <method rpc='port-mirror-topology-operation-deactivate-sync' mode='sync'>
7 <parameter name='tmp.pm.configuration-id' value='`$port-mirror-topology-operation-input.configuration-information.configuration-id`' />
9 <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
10 <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
11 <parameter name='contextPrefix' value='prop' />
13 <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
14 <parameter name="source" value="`$prop.restapi.pm-configuration`"/>
15 <parameter name="outputPath" value="tmp.pmc-url"/>
16 <parameter name="target" value="{configuration-id}"/>
17 <parameter name="replacement" value="`$tmp.pm.configuration-id`"/>
19 <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
20 <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.pmc-url`' />
21 <parameter name='restapiUser' value='`$prop.controller.user`' />
22 <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
23 <parameter name='format' value='json' />
24 <parameter name='httpMethod' value='GET' />
25 <parameter name="responsePrefix" value="mdsal-pmc" />
26 <outcome value='success'>
27 <switch test='`$mdsal-pmc.port-mirror-configuration_length == 1`'>
28 <outcome value='false'>
29 <return status='failure'>
30 <parameter name='error-code' value='500' />
31 <parameter name='error-message' value="`'Cannot find port-mirror-configuration ' + $tmp.pm.configuration-id`" />
36 <outcome value='Other'>
37 <return status='failure'>
38 <parameter name='error-code' value='500' />
39 <parameter name='error-message' value="`'Cannot find port-mirror-configuration ' + $tmp.pm.configuration-id`" />
43 <switch test="`$mdsal-pmc.port-mirror-configuration[0].configuration-data.configuration-oper-status.order-status == 'Active'`">
44 <outcome value='false'>
45 <return status='failure'>
46 <parameter name='error-code' value='500' />
47 <parameter name='error-message' value="`'Order status is ' + $mdsal-pmc.port-mirror-configuration[0].configuration-data.configuration-oper-status.order-status + ' but must be Active'`" />
51 <return status='success'>
52 <parameter name='error-code' value='200' />
53 <parameter name='ack-final' value='N' />