Generic resource API DG catch up
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / xml / GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
index 2525dce..d990722 100755 (executable)
-<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='vf-module-topology-operation-unassign' mode='sync'>\r
-<block atomic="true"><switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\r
-<outcome value='DeleteVfModuleInstance'>\r
-<block>\r
-</block></outcome><outcome value='Other'>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'" />\r
-</return></outcome></switch><set>\r
-<parameter name='vnf-index' value='-1' />\r
-</set><switch test='`$service-data.vnfs.vnf_length`'>\r
-<outcome value=''>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="There are no VNFs defined in MD-SAL" />\r
-</return></outcome><outcome value='Other'>\r
-<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\r
-<switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\r
-<outcome value='true'>\r
-<block>\r
-<set>\r
-<parameter name='vnf-index' value='`$idx`' />\r
-</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vnf-index`'>\r
-<outcome value='-1'>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`" />\r
-</return></outcome></switch><set>\r
-<parameter name='vf-module-index' value='-1' />\r
-</set><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\r
-<outcome value=''>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`" />\r
-</return></outcome><outcome value='Other'>\r
-<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\r
-<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>\r
-<outcome value='true'>\r
-<block>\r
-<set>\r
-<parameter name='vf-module-index' value='`$idx`' />\r
-</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vf-module-index`'>\r
-<outcome value='-1'>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="`'Unable to find VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`" />\r
-</return></outcome></switch><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status`'>\r
-<outcome value='Created'>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="Order status must not be Created" />\r
-</return></outcome><outcome value='Other'>\r
-<block atomic="true"></block></outcome></switch><set>\r
-<parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />\r
-</set><update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"\r
-key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" ><outcome value='failure'>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="Error updating EIPAM_IP_ASSIGNMENTS table" />\r
-</return></outcome></update><!--EIPAM plug-in needs this attribute set with this name--><set>\r
-<parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\r
-</set><execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">\r
-<parameter name="deleteEIPAM_status" value="`$tmp.status`" />\r
-<outcome value='failure'>\r
-<return status='failure'>\r
-       <parameter name='ack-final' value='Y'/>\r
-       <parameter name="error-code" value="500" />\r
-    <parameter name="error-message" value="Error in EIPAM unassign IP address" />\r
-</return></outcome></execute><for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >\r
-<for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\r
-<block atomic="true"><delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\r
+<service-logic\r
+    xmlns='http://www.onap.org/sdnc/svclogic'\r
+    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}'>\r
+    <method rpc='vf-module-topology-operation-unassign' mode='sync'>\r
+        <block atomic="true">\r
+            <switch test='`$vf-module-topology-operation-input.request-information.request-action`'>\r
+                <outcome value='DeleteVfModuleInstance'>\r
+                    <block></block>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="If svc-action is 'deactivate' then request-action must be 'DeleteVfModuleInstance'" />\r
+                    </return>\r
+                </outcome>\r
+            </switch>\r
+            <set>\r
+                <parameter name='vnf-index' value='-1' />\r
+            </set>\r
+            <switch test='`$service-data.vnfs.vnf_length`'>\r
+                <outcome value=''>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="There are no VNFs defined in MD-SAL" />\r
+                    </return>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\r
+                        <switch test='`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`'>\r
+                            <outcome value='true'>\r
+                                <block>\r
+                                    <set>\r
+                                        <parameter name='vnf-index' value='`$idx`' />\r
+                                    </set>\r
+                                    <break/>\r
+                                </block>\r
+                            </outcome>\r
+                        </switch>\r
+                    </for>\r
+                </outcome>\r
+            </switch>\r
+            <switch test='`$vnf-index`'>\r
+                <outcome value='-1'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="`'Unable to find VNF ID ' + $vf-module-topology-operation-input.vnf-information.vnf-id + ' in MD-SAL'`" />\r
+                    </return>\r
+                </outcome>\r
+            </switch>\r
+            <set>\r
+                <parameter name='vf-module-index' value='-1' />\r
+            </set>\r
+            <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\r
+                <outcome value=''>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="`'There are no VF modules defined in MD-SAL for VNF ' + $vf-module-topology-operation-input.vnf-information.vnf-id`" />\r
+                    </return>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\r
+                        <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`'>\r
+                            <outcome value='true'>\r
+                                <block>\r
+                                    <set>\r
+                                        <parameter name='vf-module-index' value='`$idx`' />\r
+                                    </set>\r
+                                    <break/>\r
+                                </block>\r
+                            </outcome>\r
+                        </switch>\r
+                    </for>\r
+                </outcome>\r
+            </switch>\r
+            <switch test='`$vf-module-index`'>\r
+                <outcome value='-1'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="`'Unable to find VF module ID ' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' in MD-SAL'`" />\r
+                    </return>\r
+                </outcome>\r
+            </switch>\r
+            <set>\r
+                <parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />\r
+            </set>\r
+            <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"\r
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id" >\r
+                <outcome value='failure'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="Error updating EIPAM_IP_ASSIGNMENTS table" />\r
+                    </return>\r
+                </outcome>\r
+            </update>\r
+            <!--EIPAM plug-in needs this attribute set with this name-->\r
+            <set>\r
+                <parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />\r
+            </set>\r
+            <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">\r
+                <parameter name="deleteEIPAM_status" value="`$tmp.status`" />\r
+                <outcome value='failure'>\r
+                    <return status='failure'>\r
+                        <parameter name='ack-final' value='Y'/>\r
+                        <parameter name="error-code" value="500" />\r
+                        <parameter name="error-message" value="Error in EIPAM unassign IP address" />\r
+                    </return>\r
+                </outcome>\r
+            </execute>\r
+            <for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >\r
+                <for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >\r
+                    <block atomic="true">\r
+                        <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\r
   key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id\r
      AND ecomp_service_instance_id = $service-data.service-information.service-instance-id\r
-     AND vm_name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' ><outcome value='failure'>\r
-<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">\r
-<parameter name="logger" value="message-log"/>\r
-<parameter name="field1" value="__TIMESTAMP__"/>\r
-<parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>\r
-<parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>\r
-<parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>\r
-</record></outcome></delete></block></for></for><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\r
-<outcome value='1'>\r
-<set>\r
-       <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>\r
-\r
-</set></outcome><outcome value='Other'>\r
-<block atomic="true"><for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\r
-<set>\r
-       <parameter name="tmpidx" value="`$idx - 1`"/>\r
-       <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />\r
-       \r
-</set></for><!--EIPAM plug-in needs this attribute set with this name--><set>\r
-<parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />\r
-</set><set>\r
-       <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>\r
-</set><set>\r
-       <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>\r
-\r
-       \r
-</set></block></outcome></switch><return status='success'>\r
-<parameter name="ack-final-indicator" value="Y" />\r
-<parameter name="error-code" value="200" />\r
-<parameter name="error-message" value="`$error-message`" />\r
-</return></block></method></service-logic>
+     AND vm_name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >\r
+                            <outcome value='failure'>\r
+                                <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">\r
+                                    <parameter name="logger" value="message-log"/>\r
+                                    <parameter name="field1" value="__TIMESTAMP__"/>\r
+                                    <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>\r
+                                    <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>\r
+                                    <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>\r
+                                </record>\r
+                            </outcome>\r
+                        </delete>\r
+                    </block>\r
+                </for>\r
+            </for>\r
+            <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>\r
+                <outcome value=''>\r
+                    <block></block>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" \r
+  resource="instance-groups" \r
+  key="instance-group.instance-group-function = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function\r
+    AND instance-group.instance-group-type = 'L3-NETWORK'"\r
+  pfx='aai.instance-group' local-only='false' >\r
+                        <outcome value='success'>\r
+                            <for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >\r
+                                <for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >\r
+                                    <for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >\r
+                                        <switch test="`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key\r
+  == 'service-instance.service-instance-id'`">\r
+                                            <outcome value='true'>\r
+                                                <switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value\r
+  == $service-data.service-information.service-instance-id`'>\r
+                                                    <outcome value='true'>\r
+                                                        <block>\r
+                                                            <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\r
+                                                                <outcome value='1'>\r
+                                                                    <block>\r
+                                                                        <set>\r
+                                                                            <parameter name='tmp.status' value="`'PENDING_DELETE_' + $aai.instance-group.instance-group[$ig-index].id`" />\r
+                                                                        </set>\r
+                                                                        <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"\r
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $aai.instance-group.instance-group[$ig-index].id" ></update>\r
+                                                                        <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">\r
+                                                                            <parameter name="deleteEIPAM_status" value="`$tmp.status`" />\r
+                                                                        </execute>\r
+                                                                    </block>\r
+                                                                </outcome>\r
+                                                            </switch>\r
+                                                            <for index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >\r
+                                                                <switch test='`$aai.instance-group.instance-group[$ig-index].id\r
+  == $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>\r
+                                                                    <outcome value='true'>\r
+                                                                        <for index='network-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$nig-index].networks.network_length`' >\r
+                                                                            <set>\r
+                                                                                <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].vlan-tag-id'\r
+  value='' />\r
+                                                                                <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].network-status'\r
+  value='unassigned' />\r
+                                                                            </set>\r
+                                                                        </for>\r
+                                                                    </outcome>\r
+                                                                </switch>\r
+                                                            </for>\r
+                                                        </block>\r
+                                                    </outcome>\r
+                                                </switch>\r
+                                            </outcome>\r
+                                        </switch>\r
+                                    </for>\r
+                                </for>\r
+                            </for>\r
+                        </outcome>\r
+                    </get-resource>\r
+                </outcome>\r
+            </switch>\r
+            <for silentFailure='true' index='vm-type-index' start='0'\r
+  end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >\r
+                <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >\r
+                    <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"\r
+   resource="vnfc"\r
+   key="vnfc.vnfc-name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"></delete>\r
+                </for>\r
+            </for>\r
+            <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>\r
+                <outcome value='1'>\r
+                    <set>\r
+                        <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>\r
+                    </set>\r
+                </outcome>\r
+                <outcome value='Other'>\r
+                    <block atomic="true">\r
+                        <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >\r
+                            <set>\r
+                                <parameter name="tmpidx" value="`$idx - 1`"/>\r
+                                <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />\r
+                            </set>\r
+                        </for>\r
+                        <!--EIPAM plug-in needs this attribute set with this name-->\r
+                        <set>\r
+                            <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />\r
+                        </set>\r
+                        <set>\r
+                            <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>\r
+                        </set>\r
+                        <set>\r
+                            <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>\r
+                        </set>\r
+                    </block>\r
+                </outcome>\r
+            </switch>\r
+            <return status='success'>\r
+                <parameter name="ack-final-indicator" value="Y" />\r
+                <parameter name="error-code" value="200" />\r
+                <parameter name="error-message" value="`$error-message`" />\r
+            </return>\r
+        </block>\r
+    </method>\r
+</service-logic>
\ No newline at end of file