diff options
author | 2021-10-15 12:14:41 -0400 | |
---|---|---|
committer | 2021-10-15 12:17:21 -0400 | |
commit | 4b0cc62e6784f12c488d083ca38f9e4728351008 (patch) | |
tree | 5523b429e947cd76aff4fd6e5301decad36b987f /platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml | |
parent | 66ed118c3fb375419c50e231fa4bc8aa028ca9bb (diff) |
Support for proper deletion of vpn-bindings when there are multiple CLLs and multiple clouds.
Issue-ID: SDNC-1594
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Change-Id: Iae468575a26b45efa069e87814f41739c9e7563b
Former-commit-id: 904f8819208b26f7a6b715540319d076d3819cb7
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml index 91889bb4..dcc3d696 100644 --- a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml @@ -1260,6 +1260,31 @@ <block atomic="true"></block> </outcome> </execute> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domain.url + '/restconf/data/ietf-eth-tran-service:etht-svc/etht-svc-instances=' + $tmp.leafconn.etht-svc-name + '/underlay/otn-tunnels=' + $tmp.underlayOTN`" /> + <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />--> + <!--<parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />--> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domain.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domain.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="delete"/> + <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" /> + <parameter name="responsePrefix" value="vpn-result"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/> + <parameter name="trustStorePassword" value="adminadmin"/> + <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> + <parameter name="keyStorePassword" value="adminadmin"/> + <outcome value='failure'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error executing delete ethernet service rest api" /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-ROOT-conn' mode='sync' ></call> <switch test="`$found-root-connectivity`"> <outcome value='true'> @@ -1609,6 +1634,121 @@ </outcome> </switch> </for> + <block atomic="true"> + <set> + <parameter name='tmp.domain.pnf-name' value="`'networkId-providerId-' + + $tmp.aai.connectivity.access-provider-id + '-clientId-' + + $tmp.aai.connectivity.access-client-id + '-topologyId-' + + $tmp.aai.connectivity.access-topology-id + '-nodeId-' + + $tmp.aai.connectivity.access-node-id`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.domain.pnf-name" + pfx='tmp.aai.source-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.source-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domain.esr-thirdparty-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domain.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domain.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domain.url' value="`$tmp.aai.domain.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domain.user' value="`$tmp.aai.domain.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domain.password' value="`$tmp.aai.domain.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />--> + <!--<parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />--> + <!--<parameter name="format" value="json"/>--> + <!--<parameter name="httpMethod" value="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>--> + <!--<parameter name="trustStorePassword" value="adminadmin"/>--> + <!--<parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>--> + <!--<parameter name="keyStorePassword" value="adminadmin"/>--> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + <break/> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + <switch test='`$tmp.aai.connectivity.etht-svc-name`'> + <outcome value='Other'> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domain.url + '/restconf/data/ietf-eth-tran-service:etht-svc/etht-svc-instances=' + $tmp.aai.connectivity.etht-svc-name`" /> + <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />--> + <!--<parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />--> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domain.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domain.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="delete"/> + <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" /> + <parameter name="responsePrefix" value="vpn-result"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/> + <parameter name="trustStorePassword" value="adminadmin"/> + <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/> + <parameter name="keyStorePassword" value="adminadmin"/> + <outcome value='failure'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="Error executing delete ethernet service rest api" /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> + </outcome> + <outcome value=''></outcome> + </switch> + </block> <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'></delete> </block> |