summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-04-16 14:26:19 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-16 14:26:19 +0000
commit3bf2950cb32ae29638c196aa82459ac29590d88e (patch)
tree4ec94592f8a4a447cdeffff5a56e3767f6bdd01b /platform-logic/generic-resource-api/src/main/xml
parente552fc58c32d247e6dbeaad29cc96425b7026c1f (diff)
parenteb5931f90a576d64c2a6635f0eae05e95b55a76d (diff)
Merge "Fix sdwan-vf-vpn-delete DG by passing vf-module-id"
Former-commit-id: 15c6cfe1990346af373968693fd7c568003bea11
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-delete.xml49
1 files changed, 45 insertions, 4 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-delete.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-delete.xml
index 8b95c4cc..5ddf41f1 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-delete.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-delete.xml
@@ -10,13 +10,49 @@
<parameter name="field2" value="sdwan-vf-module-operation-delete"/>
<parameter name="field3" value="SDWAN-Delete"/>
</record>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='sdwan-vpn'
- key='sdwan-vpn.sdwan-vpn-id = $vf-module-topology-operation-input.vf-module-information.vf-module-id'></delete>
+ <switch test="`$tmp.vidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-level-oper-status.order-status`'>
+ <outcome value='PendingDelete'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
<set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`"/>
+ <parameter name='prop.vnfidxLen' value='`0`' />
</set>
+ <for index='lidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <block atomic="true">
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lidx].vf-module-data.vf-module-information.vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`">
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$prop.vnfidxLen].vnf-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[lidx].vf-module-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$prop.vnfidxLen].vnf-data.' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[lidx].vf-module-data.`' />
+ </set>
+ <set>
+ <parameter name='prop.vnfidxLen' value='`$prop.vnfidxLen + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
<set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.nidx]." value=""/>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value='`$prop.vnfidxLen`'/>
</set>
<set>
<parameter name='vf-module-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
@@ -37,6 +73,11 @@
+ $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/service-topology/'`"/>
</set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$prop.vnfidxLen]." value=""/>
+ </set>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='sdwan-vpn'
+ key='sdwan-vpn.sdwan-vpn-id = $vf-module-topology-operation-input.vf-module-information.vf-module-id'></delete>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />
<parameter name="error-code" value="200" />