aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
diff options
context:
space:
mode:
authorramu.n <ramu.n@huawei.com>2017-11-15 17:44:59 +0530
committerramu.n <ramu.n@huawei.com>2017-11-15 17:44:59 +0530
commit140cd724ba96c07d1f54759a30c2ed45b79a6438 (patch)
treee4b36e770eb9cddc939b0bf43fc660a72b246c64 /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
parentf3172e8d818224776d108f0ee2c15718798c8d29 (diff)
Update underlay DG for delete flow
Fix delete network in service-data in MDSAL data store Change-Id: Ia7cb3b77bd6dea5badc47a7be40915165d3aab3c Issue-Id: SDNC-193 Signed-off-by: Ramu N <ramu.n@huawei.com> Former-commit-id: 052fbf611dc394a455a1afb1c0ebc18c7e3049fa
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml52
1 files changed, 26 insertions, 26 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
index 22952f50..a6392bad 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml
@@ -258,34 +258,34 @@
</outcome>
</switch>
<delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration" key="configuration.configuration-id = $network-topology-operation-input.network-information.network-id" />
- <set>
- <parameter name="tmp.nw-url" value="`'/restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $network-topology-operation-input.network-information.network-id` " />
- </set>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.nw-url`" />
- <parameter name="restapiUser" value="`$prop.controller.user`" />
- <parameter name="restapiPassword" value="`$prop.controller.pwd`" />
- <parameter name="format" value="json" />
- <parameter name="httpMethod" value="DELETE" />
- <parameter name="responsePrefix" value="mdsal-nw" />
- <outcome value="success">
- <block />
- </outcome>
- <outcome value="failure">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating md-sal for network-data" />
- </return>
+ <switch test="`$service-data.networks.network_length`">
+ <outcome value="1">
+ <block atomic="true">
+ <set>
+ <parameter name="service-data.networks." value="" />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network_length" value="0" />
+ </set>
+ </block>
</outcome>
- <outcome value="not-found">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating md-sal for network-data" />
- </return>
+ <outcome value="Other">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.new_length" value="`$service-data.networks.network_length - 1`" />
+ </set>
+ <for silentFailure="true" index="snidx" start="`$tmp.nidx + 1`" end="`$service-data.networks.network_length`">
+ <block atomic="true" />
+ </for>
+ <set>
+ <parameter name="service-data.networks.network_length" value="`$service-data.networks.network_length - 1`" />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$tmp.new_length]." value="" />
+ </set>
+ </block>
</outcome>
- </execute>
+ </switch>
<set>
<parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
<parameter name="service-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/service-topology/'` " />