diff options
author | Rahul_cool <rahul.tamrkar@huawei.com> | 2020-04-03 17:44:54 +0530 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2020-04-03 17:22:51 +0000 |
commit | 3782502176a11c50a1235d169b1b289b3f4add7a (patch) | |
tree | 7889d14b58d2524a4e0210655f17ceeb344bd0db /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_bbs-internet-profile-vnf-topology-operation-delete-huawei.xml | |
parent | 795847bcc72949601e286392de6f49317049cc84 (diff) |
Bug fixed related to service-instance metadat
Issue-ID: SDNC-1021
Signed-off-by: Rahul_cool <rahul.tamrkar@huawei.com>
Change-Id: I5a48fd7e119ba4a4c32daa33785e637521315838
(cherry picked from commit 36b54b31d97fd230a18aefe0af76cbdefd95a89d [formerly 5a25099f4388a07809b5f5501cbf14035f860d78])
Former-commit-id: a4d17814695af5e4b6a83167b4d31b0a19a9db52
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">
|