diff options
author | 2020-04-03 17:44:54 +0530 | |
---|---|---|
committer | 2020-04-03 20:33:58 +0530 | |
commit | 36b54b31d97fd230a18aefe0af76cbdefd95a89d (patch) | |
tree | 62d6032140b8f776a5c141c404d3109375ffb5a0 /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml | |
parent | deb729cf3099ad58cb8c243101c37904da4fe349 (diff) |
Bug fixed related to service-instance metadat
Issue-ID: SDNC-1021
Signed-off-by: Rahul_cool <rahul.tamrkar@huawei.com>
Change-Id: I5a48fd7e119ba4a4c32daa33785e637521315838
Former-commit-id: 5a25099f4388a07809b5f5501cbf14035f860d78
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml | 151 |
1 files changed, 105 insertions, 46 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml index 4b2e5fb3..cebb55fd 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml @@ -4,60 +4,119 @@ <method rpc='bbs-internet-profile-vnf-topology-operation-delete-huawei' mode='sync'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='bbs-internet-profile-vnf-topology-operation-common-huawei' mode='sync' ></call>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/bbs-internet-profile-operation.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/DeleteInternetProfileInstance'`" />
- <parameter name="contentType" value="application/json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="responsePrefix" value="service-result"/>
+ <switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
+ <outcome value='delete'>
+ <block atomic='true'>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/bbs-internet-profile-operation.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/DeleteInternetProfileInstance'`" />
+ <parameter name="contentType" value="application/json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="service-result"/>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error failed to call DeleteInternetProfileInstance" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <switch test="`$service-result.status`">
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error DeleteInternetProfileInstance return: '+$service-result.status`" />
+ </return>
+ </outcome>
+ <outcome value='ok'>
+ <block></block>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="service-instance"
+ key="customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id AND
+ service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id"
+ pfx='aai.service-instance' local-only='false' >
<outcome value='failure'>
<return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error failed to call DeleteInternetProfileInstance" />
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
</return>
</outcome>
<outcome value='success'>
- <switch test="`$service-result.errors.error[0].error-message`">
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Error DeleteInternetProfileInstance return: '+$service-result.errors.error[0].error-message`" />
- </return>
- </outcome>
- <outcome value=''>
- <block></block>
- </outcome>
- </switch>
- </outcome>
- </execute>
- <for silentFailure='false' index='rdidx' start='0' end="`$aai.service-instance.relationship-list.relationship[$ridx].relationship-data_length`" >
- <block atomic='true'>
- <switch test='`$aai.service-instance.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>
- <outcome value='generic-vnf.vnf-id'>
- <block atomic='true'>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <block atomic='true'>
+ <for silentFailure='true' index='ridx' start='0' end="`$aai.service-instance.relationship-list.relationship_length`" >
+ <for silentFailure='false' index='rdidx' start='0' end="`$aai.service-instance.relationship-list.relationship[$ridx].relationship-data_length`" >
+ <block atomic='true'>
+ <switch test='`$aai.service-instance.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-key`'>
+ <outcome value='generic-vnf.vnf-id'>
+ <block atomic='true'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf"
key="generic-vnf.vnf-id = $aai.service-instance.relationship-list.relationship[$ridx].relationship-data[$rdidx].relationship-value"
pfx='aai.generic-vnf' local-only='false' >
- <outcome value='success'>
- <block atomic='true'>
- <switch test='`$aai.generic-vnf.vnf-type`'>
- <outcome value='InternetProfile'>
- <set>
- <parameter name='prop.bbs.internetProfileVNFId' value='`$aai.generic-vnf.vnf-id`' />
- </set>
- </outcome>
- </switch>
- </block>
- </outcome>
- </get-resource>
- </block>
- </outcome>
- </switch>
- </block>
- </for>
+ <outcome value='success'>
+ <block atomic='true'>
+ <switch test='`$aai.generic-vnf.vnf-type`'>
+ <outcome value='InternetProfile'>
+ <set>
+ <parameter name='prop.bbs.internetProfileVNFId' value='`$aai.generic-vnf.vnf-id`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </for>
+ <for silentFailure='true' index='rix' start='0' end="`$aai.service-instance.metadata.metadatum_length`" >
+ <switch test='`$aai.service-instance.metadata.metadatum[$rix].metaname`'>
+ <outcome value='service-type'>
+ <block atomic='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="service-instance"
+ key="customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id AND
+ service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id AND
+ metadatum.metaname = $aai.service-instance.metadata.metadatum[$rix].metaname" ></delete>
+ </block>
+ </outcome>
+ <outcome value='up-speed'>
+ <block atomic='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="service-instance"
+ key="customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id AND
+ service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id AND
+ metadatum.metaname = $aai.service-instance.metadata.metadatum[$rix].metaname" ></delete>
+ </block>
+ </outcome>
+ <outcome value='down-speed'>
+ <block atomic='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="service-instance"
+ key="customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id AND
+ service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type AND
+ service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id AND
+ metadatum.metaname = $aai.service-instance.metadata.metadatum[$rix].metaname" ></delete>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </get-resource>
<delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf"
key="generic-vnf.vnf-id = $prop.bbs.internetProfileVNFId">
|