diff options
author | 2021-09-07 18:01:05 -0400 | |
---|---|---|
committer | 2021-09-07 18:02:01 -0400 | |
commit | f218265ea2889432eb1f0d1092b004247e839c3e (patch) | |
tree | b65fb42c50f3ccd36274174d18971e3c87f655e2 /platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml | |
parent | b47cff931a6f33275b3b85f456b0236bb76f0be8 (diff) |
New DGs required for deletion and bandwidth modification of a given cloud leased-line (E-TREE) service.
Issue-ID: SDNC-1594
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Change-Id: I0b6f2e32ddb103ca7ac053a80461980cfe10aab2
Former-commit-id: 926d912ec35ecd30f5f1c32ca91da2758b018223
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 | 255 |
1 files changed, 255 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 new file mode 100644 index 00000000..67cf779a --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml @@ -0,0 +1,255 @@ +<service-logic + xmlns='http://www.onap.org/sdnc/svclogic' + xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'> + <method rpc='cll-vnf-topology-operation-cll-delete' mode='sync'> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' > + <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' /> + <parameter name='contextPrefix' value='prop' /> + </execute> + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="service-instance"--> + <!-- key='service-instance.service-instance-id = $service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.service-instance-id--> + <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.subscription-service-type'--> + <!-- local-only="false"--> + <!-- force="true" pfx="tmp.aai.service-instance">--> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="service-instance" + key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id + AND 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' + local-only="false" + force="true" pfx="tmp.aai.service-instance"> + <!--vnf-topology-operation-input.service-information.service-instance-id--> + <outcome value='success'> + <for index='rel-index' start='0' end='`$tmp.aai.service-instance.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.service-instance.relationship-list.relationship[$rel-index].related-to`'> + <outcome value='connectivity'> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="connectivity" + key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value" + local-only="false" + pfx="tmp.aai.connectivity" > + <outcome value='success'> + <block> + <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> + <outcome value='vpn-binding'> + <block atomic="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="vpn-binding" + key="vpn-binding.vpn-id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" + local-only="false" + pfx="tmp.aai.vpn-binding" > + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.domain.pnf-name' value="`'networkId-providerId-' + + $tmp.aai.vpn-binding.access-provider-id + '-clientId-' + + $tmp.aai.vpn-binding.access-client-id + '-topologyId-' + + $tmp.aai.vpn-binding.access-topology-id + '-nodeId-' + + $tmp.aai.vpn-binding.src-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> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <!--<parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.ts-otn-src-domain-creation.templatefile`" />--> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domain.url + '/restconf/data/ietf-te:te/tunnels/tunnel=' + $tmp.aai.vpn-binding.vpn-name`" /> + <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="responsePrefix" value="otn-oof"/> + <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"/> + <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" /> + <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 OTN tunnel rest api" /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> + <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> + <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $tmp.aai.vpn-binding.vpn-id' ></delete> + </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.l3vpn.pe1_id`" /> + </return> + </outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + <outcome value='uni'> + <block atomic="true"> + <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni' + key='uni.id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value'></delete> + </block> + </outcome> + </switch> + </for> + <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'></delete> + </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.l3vpn.pe1_id`" /> + </return> + </outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + </get-resource> + </outcome> + </switch> + </for> + </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.l3vpn.pe1_id`" /> + </return> + </outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + </get-resource> + <return status='success'> + <parameter name="ack-final-indicator" value="Y" /> + <parameter name="error-code" value="200" /> + <parameter name="error-message" value="`$error-message`" /> + </return> + </block> + </method> +</service-logic>
\ No newline at end of file |