diff options
author | Hesam Rahimi <hesam.rahimi@huawei.com> | 2022-09-02 16:35:12 -0400 |
---|---|---|
committer | Hesam Rahimi <hesam.rahimi@huawei.com> | 2022-09-02 16:37:23 -0400 |
commit | 63194cd9cd9548e513ea6c78b45f5de3010238bb (patch) | |
tree | 4affdec740ea2a27ebc093833d6916bade4ef26a /platform-logic/generic-resource-api/src/main/xml | |
parent | 9e1d87cea271e1e81c9abdf2bc57f46fb6a752b8 (diff) |
Initial submission for supporting E-Line based cloud leased line service for CCVPN use-case.
This is work in-progress.
Issue-ID: SDNC-1732
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Change-Id: Ie4ae1c15199baa07371364524bc4a3b76f2d127f
Former-commit-id: aae4789682d86825c24fcdb2ed49176094266415
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
5 files changed, 3719 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-activate.xml b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-activate.xml new file mode 100644 index 00000000..7662ce84 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-activate.xml @@ -0,0 +1,637 @@ +<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='p2p-vnf-topology-operation-p2p-activate' 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'>
+ <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">
+ <set>
+ <parameter name='tmp.aai.vpn-binding.' value='' />
+ </set>
+ <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='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>
+ <outcome value='success'>
+ <block atomic="true">
+ <switch test="`$tmp.aai.vpn-binding.operational-status != 'Activated' `">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='gfp-n' value='`$tmp.aai.vpn-binding.route-distinguisher`' />
+ </set>
+ <switch test='`$tmp.aai.vpn-binding.dst-access-ltp-id`'>
+ <outcome value='Other'>
+ <switch test='`$tmp.aai.vpn-binding.src-access-ltp-id`'>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.aai.vpn-bindingA.' value="`$tmp.aai.vpn-binding.`" />
+ <parameter name='tmp.aai.connectivityA.' value="`$tmp.aai.connectivity.`" />
+ </set>
+ <set>
+ <parameter name='src-node-id' value='`$tmp.aai.vpn-bindingA.src-access-node-id`' />
+ <parameter name='dst-node-id' value='`$tmp.aai.vpn-bindingA.dst-access-node-id`' />
+ <!--<parameter name='dst-tpn-id' value='1' />-->
+ <parameter name='dst-tpn-id' value='`$tmp.aai.vpn-bindingA.customer-vpn-id`' />
+ <parameter name='dst-ttp-id' value='`$tmp.aai.vpn-bindingA.dst-access-ltp-id`' />
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='otn-tunnel-name-src-domain' value='`$tmp.aai.vpn-bindingA.vpn-name`' />
+ <parameter name='client-id' value='`$tmp.aai.vpn-bindingA.access-client-id`' />
+ <parameter name='provider-id' value='`$tmp.aai.vpn-bindingA.access-provider-id`' />
+ <parameter name='topology-id' value='`$tmp.aai.vpn-bindingA.access-topology-id`' />
+ </set>
+ <set>
+ <parameter name='tmp.src.domainA.pnf-name' value="`'networkId-providerId-' +
+ $tmp.aai.vpn-bindingA.access-provider-id + '-clientId-' +
+ $tmp.aai.vpn-bindingA.access-client-id + '-topologyId-' +
+ $tmp.aai.vpn-bindingA.access-topology-id + '-nodeId-' +
+ $tmp.aai.vpn-bindingA.src-access-node-id`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.src.domainA.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.domainA.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.domainA.esr-thirdparty-id AND
+ depth = '1'"
+ pfx='tmp.aai.domainA.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.url' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.user' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.password' value="`$tmp.aai.domainA.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>
+ </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.domainA.url + '/restconf/data/ietf-te:te'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <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 Create OTN tunnel rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <set>
+ <!--<parameter name='eth-service-name' value='`$tmp.aai.connectivityA.connectivity-id`' />-->
+ <parameter name='eth-service-name' value='`$tmp.aai.connectivityA.etht-svc-name`' />
+ <parameter name='slice-id' value='`$vnf-topology-operation-input.service-information.service-instance-id`' />
+ <parameter name='provider-id' value='`$tmp.aai.connectivityA.access-provider-id`' />
+ <parameter name='client-id' value='`$tmp.aai.connectivityA.access-client-id`' />
+ <parameter name='topology-id' value='`$tmp.aai.connectivityA.access-topology-id`' />
+ <parameter name='otn-tunnel-name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />
+ <parameter name='ethernet-end-point-name' value='`$tmp.aai.connectivityA.connectivity-id`' />
+ <parameter name='index-number' value='0' />
+ <parameter name='eth-node-id' value='`$tmp.aai.connectivityA.access-node-id`' />
+ <parameter name='eth-node-tp-id' value='`$tmp.aai.connectivityA.access-ltp-id`' />
+ <parameter name='CIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />
+ <parameter name='EIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />
+ <parameter name='cvlan' value='`$tmp.aai.connectivityA.cvlan`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.ts-ethernet-service.templatefile`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />-->
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <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 Create ethernet service rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.aai.vpn-bindingA.vpn-id' >
+ <parameter name='vpn-id' value='`$tmp.aai.vpn-bindingA.vpn-id`' />
+ <parameter name='vpn-name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $tmp.aai.connectivityA.connectivity-id'>
+ <parameter name='connectivity-id' value='`$tmp.aai.connectivityA.connectivity-id`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ <update 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'>
+ <parameter name='service-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='orchestration-status' value='Activated' />
+ </update>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.aai.vpn-bindingG.' value="`$tmp.aai.vpn-binding.`" />
+ <parameter name='tmp.aai.connectivityG.' value="`$tmp.aai.connectivity.`" />
+ </set>
+ <set>
+ <parameter name='src-node-id' value='`$tmp.aai.vpn-bindingG.src-access-node-id`' />
+ <parameter name='dst-node-id' value='`$tmp.aai.vpn-bindingG.dst-access-node-id`' />
+ <!--<parameter name='dst-tpn-id' value='1' />-->
+ <parameter name='src-tpn-id' value='`$tmp.aai.vpn-bindingG.customer-vpn-id`' />
+ <parameter name='dst-tpn-id' value='`$tmp.aai.vpn-bindingG.customer-vpn-id`' />
+ <parameter name='src-ttp-id' value='`$tmp.aai.vpn-bindingG.src-access-ltp-id`' />
+ <parameter name='dst-ttp-id' value='`$tmp.aai.vpn-bindingG.dst-access-ltp-id`' />
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='otn-tunnel-name-domainG' value='`$tmp.aai.vpn-bindingG.vpn-name`' />
+ <parameter name='client-id' value='`$tmp.aai.vpn-bindingG.access-client-id`' />
+ <parameter name='provider-id' value='`$tmp.aai.vpn-bindingG.access-provider-id`' />
+ <parameter name='topology-id' value='`$tmp.aai.vpn-bindingG.access-topology-id`' />
+ </set>
+ <set>
+ <parameter name='tmp.domainG.pnf-name' value="`'networkId-providerId-' +
+ $tmp.aai.vpn-bindingG.access-provider-id + '-clientId-' +
+ $tmp.aai.vpn-bindingG.access-client-id + '-topologyId-' +
+ $tmp.aai.vpn-bindingG.access-topology-id + '-nodeId-' +
+ $tmp.aai.vpn-bindingG.src-access-node-id`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.domainG.pnf-name"
+ pfx='tmp.aai.domainG-pnf' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.domainG-pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.domainG-pnf.relationship-list.relationship[$spvidx].related-to`'>
+ <outcome value='esr-thirdparty-sdnc'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainG.esr-thirdparty-id' value="`$tmp.aai.domainG-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.domainG.esr-thirdparty-id AND
+ depth = '1'"
+ pfx='tmp.aai.domainG.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.url' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.user' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.password' value="`$tmp.aai.domainG.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>
+ </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-domainG-creation.templatefile`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainG.url + '/restconf/data/ietf-te:te'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainG.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainG.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <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 Create OTN tunnel rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value=''>
+ <switch test='`$tmp.aai.vpn-binding.src-access-ltp-id`'>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.aai.vpn-bindingB.' value="`$tmp.aai.vpn-binding.`" />
+ <parameter name='tmp.aai.connectivityB.' value="`$tmp.aai.connectivity.`" />
+ </set>
+ <set>
+ <parameter name='src-node-id' value='`$tmp.aai.vpn-bindingB.src-access-node-id`' />
+ <parameter name='dst-node-id' value='`$tmp.aai.vpn-bindingB.dst-access-node-id`' />
+ <!--<parameter name='src-tpn-id' value='1' />-->
+ <parameter name='src-tpn-id' value='`$tmp.aai.vpn-bindingB.customer-vpn-id`' />
+ <parameter name='src-ttp-id' value='`$tmp.aai.vpn-bindingB.src-access-ltp-id`' />
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='otn-tunnel-name-dst-domain' value='`$tmp.aai.vpn-bindingB.vpn-name`' />
+ <parameter name='client-id' value='`$tmp.aai.vpn-bindingB.access-client-id`' />
+ <parameter name='provider-id' value='`$tmp.aai.vpn-bindingB.access-provider-id`' />
+ <parameter name='topology-id' value='`$tmp.aai.vpn-bindingB.access-topology-id`' />
+ </set>
+ <set>
+ <parameter name='tmp.dst.domainB.pnf-name' value="`'networkId-providerId-' +
+ $tmp.aai.vpn-bindingB.access-provider-id + '-clientId-' +
+ $tmp.aai.vpn-bindingB.access-client-id + '-topologyId-' +
+ $tmp.aai.vpn-bindingB.access-topology-id + '-nodeId-' +
+ $tmp.aai.vpn-bindingB.dst-access-node-id`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.dst.domainB.pnf-name"
+ pfx='tmp.aai.destination-pnf' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <for silentFailure='true' index='dpvidx' start='0' end='`$tmp.aai.destination-pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].related-to`'>
+ <outcome value='esr-thirdparty-sdnc'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainB.esr-thirdparty-id' value="`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].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.domainB.esr-thirdparty-id AND
+ depth = '1'"
+ pfx='tmp.aai.domainB.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.url' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.user' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.password' value="`$tmp.aai.domainB.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>
+ </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-dst-domain-creation.templatefile`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.url + '/restconf/data/ietf-te:te'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <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 Create OTN tunnel rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <set>
+ <!--<parameter name='eth-service-name' value='`$tmp.aai.connectivityB.connectivity-id`' />-->
+ <parameter name='eth-service-name' value='`$tmp.aai.connectivityB.etht-svc-name`' />
+ <parameter name='slice-id' value='`$vnf-topology-operation-input.service-information.service-instance-id`' />
+ <parameter name='provider-id' value='`$tmp.aai.connectivityB.access-provider-id`' />
+ <parameter name='client-id' value='`$tmp.aai.connectivityB.access-client-id`' />
+ <parameter name='topology-id' value='`$tmp.aai.connectivityB.access-topology-id`' />
+ <parameter name='otn-tunnel-name' value='`$tmp.aai.vpn-bindingB.vpn-name`' />
+ <parameter name='ethernet-end-point-name' value='`$tmp.aai.connectivityB.connectivity-id`' />
+ <parameter name='index-number' value='0' />
+ <parameter name='eth-node-id' value='`$tmp.aai.connectivityB.access-node-id`' />
+ <parameter name='eth-node-tp-id' value='`$tmp.aai.connectivityB.access-ltp-id`' />
+ <parameter name='CIR' value='`$tmp.aai.vpn-bindingB.route-distinguisher *1000000`' />
+ <parameter name='EIR' value='`$tmp.aai.vpn-bindingB.route-distinguisher *1000000`' />
+ <parameter name='cvlan' value='`$tmp.aai.connectivityB.cvlan`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.ts-ethernet-service.templatefile`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />-->
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <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 Create ethernet service rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.aai.vpn-bindingB.vpn-id' >
+ <parameter name='vpn-id' value='`$tmp.aai.vpn-bindingB.vpn-id`' />
+ <parameter name='vpn-name' value='`$tmp.aai.vpn-bindingB.vpn-name`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $tmp.aai.connectivityB.connectivity-id'>
+ <parameter name='connectivity-id' value='`$tmp.aai.connectivityB.connectivity-id`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ <update 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'>
+ <parameter name='service-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='orchestration-status' value='Activated' />
+ </update>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block></block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </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>
+ </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 diff --git a/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-create.xml b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-create.xml new file mode 100644 index 00000000..82c22637 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-create.xml @@ -0,0 +1,1146 @@ +<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='p2p-vnf-topology-operation-p2p-create' 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[$vnf-index].vnf-data.service-information.service-instance-id--> + <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].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"> + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="service-instance"--> + <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id--> + <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type'--> + <!-- local-only="false"--> + <!-- force="true" pfx="tmp.aai.service-instance">--> + <outcome value='success'> + <switch test='`$tmp.aai.service-instance.allotted-resources.allotted-resource_length != 0`'> + <outcome value='false'></outcome> + <outcome value='true'> + <block> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnfs" + key="selflink = 'https://aai.onap:8443/aai/v25/network/pnfs?depth=0' depth = 0" + local-only="false" + pfx="ccsdkTopopnfs" ></get-resource> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="logical-links" + key="selflink = 'https://aai.onap:8443/aai/v25/network/logical-links?depth=0'" + local-only="false" + pfx="ccsdkTopologicalLinks" ></get-resource> + <set> + <parameter name='tmp.arr' value='' /> + <parameter name='tmp.arridx' value='0' /> + <parameter name='tmp.arr_length' value='0' /> + <parameter name='otn-tunnel-slice' value='' /> + <parameter name='otn-tunnel-slice_length' value='0' /> + <!--<parameter name='tmp.slicevpns' value='' />--> + <!--<parameter name='tmp.slicevpns_length' value='0' />--> + <!--<parameter name='tmp.slicevpnuuids' value='' />--> + <!--<parameter name='tmp.slicevpnuuids.' value='' />--> + </set> + <for index='aridx' start='0' end='`$tmp.aai.service-instance.allotted-resources.allotted-resource_length`' > + <set> + <parameter name='allotted-resource-id' value="`$tmp.aai.service-instance.allotted-resources.allotted-resource[$aridx].id`" /> + </set> + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="allotted-resource"--> + <!-- key='service-instance.service-instance-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id--> + <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type--> + <!-- AND allotted-resource.id = $allotted-resource-id'--> + <!-- local-only="false"--> + <!-- force="true" pfx="tmp.aai.allotted-resource">--> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="allotted-resource" + 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 + AND allotted-resource.id = $allotted-resource-id' + local-only="false" + force="true" pfx="tmp.aai.allotted-resource"> + <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> + <outcome value='success'> + <block atomic="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="allotted-resource:relationship-list" + 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 + AND allotted-resource.id = $allotted-resource-id' + local-only="false" + force="true" pfx="tmp.aai.allotted-resource.relationship-list"> + <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> + <outcome value='success'> + <block atomic="true"> + <switch test='`$tmp.aai.allotted-resource.relationship-list.relationship_length != 0`'> + <outcome value='false'></outcome> + <outcome value='true'> + <block atomic="true"> + <for index='idx' start='0' end='`$tmp.aai.allotted-resource.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].related-to`'> + <outcome value='network-policy'> + <block atomic="true"> + <set> + <parameter name='network-policy-id' value="`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="network-policy" + key='network-policy.network-policy-id = $network-policy-id' + local-only="false" + force="true" pfx="tmp.aai.network-policy"> + <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> + <outcome value='success'> + <block> + <set> + <parameter name='maximum-bandwidth' value="`$tmp.aai.network-policy.max-bandwidth`" /> + <parameter name='route-distinguisher' value='`$maximum-bandwidth /1000 *4 /5 +1`' /> + </set> + <set> + <parameter name='gfp' value='`$maximum-bandwidth /1000 *4 /5 +1`' /> + </set> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + <for index='idx' start='0' end='`$tmp.aai.allotted-resource.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].related-to`'> + <outcome value='logical-link'> + <block atomic="true"> + <set> + <parameter name='logical-link-name' value="`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="logical-link" + key='logical-link.link-name = $logical-link-name' + local-only="false" + force="true" pfx="tmp.aai.logical-link"> + <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> + <outcome value='success'> + <block> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="prop.otn-tunnel-name"/> + </execute> + <set> + <!--<parameter name='prop.ethernet-service-name' value="`$tmp.aai.logical-link.link-name`" />--> + <parameter name='prop.ethernet-service-name' value="`$tmp.aai.logical-link.link-id`" /> + </set> + <set> + <parameter name='network-route-A' value="`$tmp.aai.logical-link.link-name`" /> + <!--<parameter name='network-route-A' value="`$tmp.aai.logical-link.link-id`" />--> + </set> + <set> + <parameter name='network-route-B' value="`$tmp.aai.logical-link.link-name2`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="network-route" + key='network-route.route-id = $network-route-A' + local-only="false" + force="true" pfx="tmp.aai.network-route-A"> + <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> + <outcome value='success'> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-A.next-hop`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainA-pnfName"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.src.domainA.pnf-name' value="`$param-prefix-domainA-pnfName[0] + '-' + + $param-prefix-domainA-pnfName[1] + '-' + + $param-prefix-domainA-pnfName[2] + '-' + + $param-prefix-domainA-pnfName[3] + '-' + + $param-prefix-domainA-pnfName[4] + '-' + + $param-prefix-domainA-pnfName[5] + '-' + + $param-prefix-domainA-pnfName[6] + '-' + + $param-prefix-domainA-pnfName[7] + '-' + + $param-prefix-domainA-pnfName[8]`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.src.domainA.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.domainA.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.domainA.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainA.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.url' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.user' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.password' value="`$tmp.aai.domainA.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> + </block> + </outcome> + <outcome value='network-resource'> + <block atomic="true"> + <set> + <parameter name='tmp.domainA.eth-network-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> + </set> + </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> + </block> + </outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value="An error occured while splitting sna1_route" /> + </return> + </outcome> + </execute> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="p-interface" + key="pnf.pnf-name = $tmp.src.domainA.pnf-name + AND p-interface.interface-name = $tmp.aai.network-route-A.next-hop" + local-only="false" + pfx="tmp.aai.network-route-A.p-interface-src" > + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="p-interface"--> + <!-- key="pnf.pnf-name = $unique-src-node-Id--> + <!-- and p-interface.interface-name = $tmp.aai.endpointA.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"--> + <!-- local-only="false" --> + <!-- pfx="tmp.aai.endpointA.p-interface-src" >--> + <outcome value='success'> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-A.p-interface-src.interface-name`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainA"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.src.ltpId' value='`$param-prefix-domainA[$param-prefix-domainA_length -1]`' /> + </set> + <set> + <parameter name='tmp.src.pnf-name' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' /> + </set> + </block> + </outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value="An error occured while splitting sna1_route" /> + </return> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="uuid.connectivity-domainA-uuid"/> + </execute> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $uuid.connectivity-domainA-uuid'> + <parameter name='connectivity-id' value='`$uuid.connectivity-domainA-uuid`' /> + <parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' /> + <parameter name='operational-status' value='Created' /> + <parameter name='access-provider-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -9]`' /> + <parameter name='access-client-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -7]`' /> + <parameter name='access-topology-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -5]`' /> + <parameter name='access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' /> + <parameter name='access-ltp-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -1]`' /> + <parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' /> + <parameter name='bandwidth-profile-name' value='`$gfp`' /> + <parameter name='vpn-type' value='`$prop.sotn.vpnType`' /> + <parameter name='cir' value='`$gfp *1000000`' /> + <parameter name='eir' value='`$gfp *1000000`' /> + <parameter name='cbs' value='`$prop.sotn.cbs`' /> + <parameter name='ebs' value='`$prop.sotn.ebs`' /> + <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />--> + <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />--> + <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />--> + <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />--> + <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />--> + <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />--> + <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " /> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' + 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' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-domainA-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-domainA-uuid`" /> + <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' --> + <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id --> + <!-- AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' --> + <!-- force="true" pfx="tmp.AnAI-data">--> + <!--<parameter name="relationship-list.relationship[0].related-to" value="connectivity" />--> + <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />--> + </save> + <for silentFailure='true' index='pividx' start='0' end='`$tmp.aai.network-route-A.p-interface-src.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.network-route-A.p-interface-src.relationship-list.relationship[$pividx].related-to`'> + <outcome value='tunnel-termination-point'> + <block atomic="true"> + <set> + <parameter name='tmp.source.ttp-id' value="`$tmp.aai.network-route-A.p-interface-src.relationship-list.relationship[$pividx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="tunnel-termination-point" + key="tunnel-termination-point.ttp-id = $tmp.source.ttp-id + AND depth = '0'" + pfx='tmp.aai.source-ttp' local-only='false' > + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='source.tunnel-tp-id' value="`$tmp.aai.source-ttp.tunnel-tp-id`" /> + </set> + </block> + </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.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> + </get-resource> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="network-route" + key='network-route.route-id = $network-route-B' + local-only="false" + force="true" pfx="tmp.aai.network-route-B"> + <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> + <outcome value='success'> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-B.next-hop`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainB-pnfName"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.dst.domainB.pnf-name' value="`$param-prefix-domainB-pnfName[0] + '-' + + $param-prefix-domainB-pnfName[1] + '-' + + $param-prefix-domainB-pnfName[2] + '-' + + $param-prefix-domainB-pnfName[3] + '-' + + $param-prefix-domainB-pnfName[4] + '-' + + $param-prefix-domainB-pnfName[5] + '-' + + $param-prefix-domainB-pnfName[6] + '-' + + $param-prefix-domainB-pnfName[7] + '-' + + $param-prefix-domainB-pnfName[8]`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.dst.domainB.pnf-name" + pfx='tmp.aai.destination-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='dpvidx' start='0' end='`$tmp.aai.destination-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainB.esr-thirdparty-id' value="`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].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.domainB.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainB.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.url' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.user' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.password' value="`$tmp.aai.domainB.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> + </block> + </outcome> + <outcome value='network-resource'> + <block atomic="true"> + <set> + <parameter name='tmp.domainB.eth-network-id' value="`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" /> + </set> + </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> + </block> + </outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value="An error occured while splitting sna1_route" /> + </return> + </outcome> + </execute> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="p-interface" + key="pnf.pnf-name = $tmp.dst.domainB.pnf-name + AND p-interface.interface-name = $tmp.aai.network-route-B.next-hop" + local-only="false" + pfx="tmp.aai.network-route-B.p-interface-dst" > + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="p-interface"--> + <!-- key="pnf.pnf-name = $unique-src-node-Id--> + <!-- and p-interface.interface-name = $tmp.aai.endpointA.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"--> + <!-- local-only="false" --> + <!-- pfx="tmp.aai.endpointA.p-interface-src" >--> + <outcome value='success'> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-B.p-interface-dst.interface-name`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainB"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.dst.ltpId' value='`$param-prefix-domainB[$param-prefix-domainB_length -1]`' /> + </set> + <set> + <parameter name='tmp.dst.pnf-name' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' /> + </set> + </block> + </outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value="An error occured while splitting sna1_route" /> + </return> + </outcome> + </execute> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="prop.connectivity-domainB-uuid"/> + </execute> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $prop.connectivity-domainB-uuid'> + <parameter name='connectivity-id' value='`$prop.connectivity-domainB-uuid`' /> + <parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' /> + <parameter name='operational-status' value='Created' /> + <parameter name='access-provider-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -9]`' /> + <parameter name='access-client-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -7]`' /> + <parameter name='access-topology-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -5]`' /> + <parameter name='access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' /> + <parameter name='access-ltp-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -1]`' /> + <parameter name='cvlan' value='`$tmp.aai.network-route-B.logical-interface-id`' /> + <parameter name='bandwidth-profile-name' value='`$gfp`' /> + <parameter name='vpn-type' value='`$prop.sotn.vpnType`' /> + <parameter name='cir' value='`$gfp *1000000`' /> + <parameter name='eir' value='`$gfp *1000000`' /> + <parameter name='cbs' value='`$prop.sotn.cbs`' /> + <parameter name='ebs' value='`$prop.sotn.ebs`' /> + <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />--> + <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />--> + <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />--> + <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />--> + <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />--> + <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />--> + <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " /> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' + 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' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainB-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainB-uuid`" /> + <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' --> + <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id --> + <!-- AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' --> + <!-- force="true" pfx="tmp.AnAI-data">--> + <!--<parameter name="relationship-list.relationship[0].related-to" value="connectivity" />--> + <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />--> + </save> + <for silentFailure='true' index='dividx' start='0' end='`$tmp.aai.network-route-B.p-interface-dst.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.network-route-B.p-interface-dst.relationship-list.relationship[$dividx].related-to`'> + <outcome value='tunnel-termination-point'> + <block atomic="true"> + <set> + <parameter name='tmp.destination.ttp-id' value="`$tmp.aai.network-route-B.p-interface-dst.relationship-list.relationship[$dividx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="tunnel-termination-point" + key="tunnel-termination-point.ttp-id = $tmp.destination.ttp-id + AND depth = '0'" + pfx='tmp.aai.destination-ttp' local-only='false' > + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='destination.tunnel-tp-id' value="`$tmp.aai.destination-ttp.tunnel-tp-id`" /> + </set> + </block> + </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.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> + </get-resource> + <set> + <parameter name='prop.connection-attachment.access-provider-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -9]`' /> + <parameter name='prop.connection-attachment.access-client-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -7]`' /> + <parameter name='prop.connection-attachment.access-topology-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -5]`' /> + <parameter name='prop.connection-attachment.access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' /> + <parameter name='prop.connection-attachment.access-ltp-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -1]`' /> + <parameter name='prop.remote.connection-attachment.access-provider-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -9]`' /> + <parameter name='prop.remote.connection-attachment.access-client-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -7]`' /> + <parameter name='prop.remote.connection-attachment.access-topology-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -5]`' /> + <parameter name='prop.remote.connection-attachment.access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' /> + <parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -1]`' /> + <!--<parameter name='prop.remote.connection-attachment.access-provider-id' value='`$oof.vpn.access-provider-id`' />--> + <!--<parameter name='prop.remote.connection-attachment.access-client-id' value='`$oof.vpn.access-client-id`' />--> + <!--<parameter name='prop.remote.connection-attachment.access-topology-id' value='`$oof.vpn.access-topology-id`' />--> + <!--<parameter name='prop.remote.connection-attachment.access-node-id' value='`$oof.vpn.access-node-id`' />--> + <!--<parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />--> + </set> + <set> + <parameter name='prop.ethsrvType' value='`$network-route-A`' /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name="filename" value="`$filenamemm`" /> + </execute> + <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' ></call> + <switch test="`$param-prefix-domainA[$param-prefix-domainA_length -9] == $param-prefix-domainB[$param-prefix-domainB_length -9]`"> + + ` + + + <outcome value='false'> + <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof' mode='sync' > + <block atomic='true'> + <for index='otnidx' start='0' end='`$tmp.otninfo_length`' > + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="prop.vpn-binding-otnidx-uuid"/> + </execute> + <switch test="`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id == ''`"> + <outcome value='true'> + <set> + <parameter name='tmp.access-provider-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-provider-id`' /> + <parameter name='tmp.access-client-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-client-id`' /> + <parameter name='tmp.access-topology-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-topology-id`' /> + <parameter name='tmp.srcdstpnf-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' /> + </set> + </outcome> + <outcome value='false'> + <set> + <parameter name='tmp.access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' /> + <parameter name='tmp.access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' /> + <parameter name='tmp.access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' /> + <parameter name='tmp.srcdstpnf-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' /> + </set> + </outcome> + </switch> + <set> + <parameter name='tmp.srcdstpnf-name' value="`'networkId-providerId-' + + $tmp.access-provider-id + '-clientId-' + + $tmp.access-client-id + '-topologyId-' + + $tmp.access-topology-id + '-nodeId-' + + $tmp.srcdstpnf-id`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.srcdstpnf-name" + pfx='tmp.aai.srcdst-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.srcdst-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.srcdst-pnf.relationship-list.relationship[$spvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainG.esr-thirdparty-id' value="`$tmp.aai.srcdst-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.domainG.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainG.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.url' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.user' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.password' value="`$tmp.aai.domainG.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> + </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='`$otnidx == 0`'> + <outcome value='true'> + <block> + <set> + <parameter name='tmp.domainG-src-access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' /> + <parameter name='tmp.domainG-dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' /> + </set> + </block> + </outcome> + <outcome value='false'> + <switch test='`$otnidx == $tmp.otninfo_length - 1`'> + <outcome value='true'> + <block> + <set> + <parameter name='tmp.domainG-src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' /> + <parameter name='tmp.domainG-dst-access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' /> + </set> + </block> + </outcome> + <outcome value='false'> + <set> + <parameter name='tmp.domainG-src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' /> + <parameter name='tmp.domainG-dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' /> + </set> + </outcome> + </switch> + </outcome> + </switch> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' > + <parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' /> + <parameter name='vpn-name' value='`$prop.otn-tunnel-name`' /> + <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />--> + <parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' /> + <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />--> + <parameter name='access-provider-id' value='`$tmp.access-provider-id`' /> + <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />--> + <parameter name='access-client-id' value='`$tmp.access-client-id`' /> + <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />--> + <parameter name='access-topology-id' value='`$tmp.access-topology-id`' /> + <!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />--> + <parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' /> + <parameter name='src-access-ltp-id' value='`$tmp.otninfo[$otnidx].srcPort.src-tunnel-tp-id`' /> + <!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />--> + <parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' /> + <parameter name='dst-access-ltp-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-tunnel-tp-id`' /> + <parameter name='route-distinguisher' value='`$gfp`' /> + <parameter name='operational-status' value='Created' /> + <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />--> + <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />--> + <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />--> + <parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' /> + <parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' /> + <parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' /> + <!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) --> + <parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' /> + <outcome value='success'> + <block></block> + </outcome> + </save> + <switch test='`$otnidx == 0`'> + <outcome value='true'> + <block> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-domainA-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-domainA-uuid`" /> + </save> + <set> + <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + </set> + </block> + </outcome> + <outcome value='false'> + <block> + <set> + <parameter name='testingvalue' value='$tmp.otninfo_length -1' /> + </set> + <switch test='`$otnidx == $tmp.otninfo_length - 1`'> + <outcome value='true'> + <block> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainB-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainB-uuid`" /> + </save> + <set> + <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + </set> + </block> + </outcome> + <outcome value='false'> + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="uuid.connectivity-otnidx-uuid"/> + </execute> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $uuid.connectivity-otnidx-uuid'> + <parameter name='connectivity-id' value='`$uuid.connectivity-otnidx-uuid`' /> + <!--<parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' />--> + <parameter name='operational-status' value='Created' /> + <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />--> + <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />--> + <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />--> + <!--<parameter name='access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />--> + <!--<parameter name='access-ltp-id' value='``' />--> + <!--<parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' />--> + <!--<parameter name='bandwidth-profile-name' value='`$prop.sotn.etht-svc-name`' />--> + <parameter name='bandwidth-profile-name' value='`$gfp`' /> + <parameter name='vpn-type' value='dummy' /> + <parameter name='cir' value='`$gfp *1000000`' /> + <parameter name='eir' value='`$gfp *1000000`' /> + <!--<parameter name='cbs' value='`$prop.sotn.cbs`' />--> + <!--<parameter name='ebs' value='`$prop.sotn.ebs`' />--> + <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />--> + <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />--> + <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />--> + <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />--> + <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />--> + <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />--> + <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " /> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' + 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' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-otnidx-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-otnidx-uuid`" /> + <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' --> + <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id --> + <!-- AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' --> + <!-- force="true" pfx="tmp.AnAI-data">--> + <!--<parameter name="relationship-list.relationship[0].related-to" value="connectivity" />--> + <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />--> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-otnidx-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-otnidx-uuid`" /> + </save> + <set> + <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + </set> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </for> + </block> + </call> + </outcome> + <outcome value='true'> + <block> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="prop.vpn-binding-samedomain-uuid"/> + </execute> + <set> + <parameter name='tmp.sameDomain-src-access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' /> + <parameter name='tmp.sameDomain-dst-access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' /> + </set> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $prop.vpn-binding-samedomain-uuid' > + <parameter name='vpn-id' value='`$prop.vpn-binding-samedomain-uuid`' /> + <parameter name='vpn-name' value='`$prop.otn-tunnel-name`' /> + <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />--> + <parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' /> + <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />--> + <parameter name='access-provider-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -9]`' /> + <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />--> + <parameter name='access-client-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -7]`' /> + <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />--> + <parameter name='access-topology-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -5]`' /> + <!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />--> + <parameter name='src-access-node-id' value='`$tmp.sameDomain-src-access-node-id`' /> + <!--<parameter name='src-access-ltp-id' value='`$tmp.otninfo[$otnidx].srcPort.src-tunnel-tp-id`' />--> + <!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />--> + <parameter name='dst-access-node-id' value='`$tmp.sameDomain-dst-access-node-id`' /> + <!--<parameter name='dst-access-ltp-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-tunnel-tp-id`' />--> + <parameter name='route-distinguisher' value='`$gfp`' /> + <parameter name='operational-status' value='Created' /> + <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />--> + <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />--> + <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />--> + <parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' /> + <parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' /> + <parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' /> + <!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) --> + <parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' /> + <outcome value='success'> + <block></block> + </outcome> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' + key='vpn-binding.vpn-id = $prop.vpn-binding-samedomain-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-domainA-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-domainA-uuid`" /> + </save> + </block> + </outcome> + </switch> + <set> + <parameter name='domain-A.tunnel-tp-id' value='' /> + <parameter name='domain-A.node-id' value='' /> + <parameter name='domain-A.network-id' value="" /> + <parameter name='domain-A.provider-id' value="" /> + <parameter name='domain-A.client-id' value="" /> + <parameter name='domain-A.te-topo-id' value="" /> + <parameter name='domain-A.network-type' value="" /> + <parameter name='domain-A.ltpId' value="" /> + <parameter name='tmp.domain-A.network-id' value="" /> + <parameter name='tmp.domain-A.ttp-id' value="" /> + <parameter name='network-route-A' value="" /> + <!--<parameter name='domain-A.' value="" />--> + <parameter name='request-id' value='' /> + <parameter name='otn-source-node' value='' /> + <parameter name='otn-dest-node' value='' /> + <parameter name='bw-odu' value="" /> + <parameter name='src-ttp-id' value='' /> + <parameter name='dst-ttp-id' value='' /> + <parameter name='domain-B.tunnel-tp-id' value='' /> + <parameter name='domain-B.node-id' value='' /> + <parameter name='domain-B.network-id' value="" /> + <parameter name='domain-B.provider-id' value="" /> + <parameter name='domain-B.client-id' value="" /> + <parameter name='domain-B.te-topo-id' value="" /> + <parameter name='domain-B.network-type' value="" /> + <parameter name='domain-B.ltpId' value="" /> + <parameter name='tmp.domain-B.network-id' value="" /> + <parameter name='tmp.domain-B.ttp-id' value="" /> + <parameter name='network-route-B' value="" /> + <!--<parameter name='domain-B.' value="" />--> + </set> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + </block> + </outcome> + </switch> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </get-resource> + </for> + <call module='GENERIC-RESOURCE-API' rpc='p2p-vnf-topology-operation-p2p-activate' mode='sync' ></call> + </block> + </outcome> + </switch> + </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 diff --git a/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-deactivate.xml new file mode 100644 index 00000000..3997add7 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-deactivate.xml @@ -0,0 +1,262 @@ +<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='tsli-vnf-topology-operation-trans-slice-deactivate' 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'>
+ <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">
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.aai.vpn-binding.vpn-id' >
+ <parameter name='vpn-id' value='`$tmp.aai.vpn-binding.vpn-id`' />
+ <parameter name='vpn-name' value='`$tmp.aai.vpn-binding.vpn-name`' />
+ <parameter name='operational-status' value='Deactivated' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'>
+ <parameter name='connectivity-id' value='`$tmp.aai.connectivity.connectivity-id`' />
+ <parameter name='operational-status' value='Deactivated' />
+ </update>
+ <update 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'>
+ <parameter name='service-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='orchestration-status' value='Deactivated' />
+ </update>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value=''></outcome>
+ </switch>
+ </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>
+ </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>
+ </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 diff --git a/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-delete.xml b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-delete.xml new file mode 100644 index 00000000..7c6e65ff --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-delete.xml @@ -0,0 +1,249 @@ +<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='tsli-vnf-topology-operation-trans-slice-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'>
+ <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>
+ <set>
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.transport-slice-creation.templatefile`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domain.url + '/restconf/operations/ietf-optical-slice:deallocate-optical-slice'`" />
+ <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="post"/>
+ <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 deallocate transport slice 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="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.ts-coloring-uni-port.templatefile`" />-->
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domain.url + '/restconf/data/ietf-network:networks/network=networkId-providerId-' + $tmp.aai.connectivity.access-provider-id + '-clientId-' + $tmp.aai.connectivity.access-client-id + '-topologyId-' + $tmp.aai.connectivity.access-topology-id + '/node=' + $tmp.aai.connectivity.access-node-id + '/ietf-network-topology:termination-point=' + $tmp.aai.connectivity.access-ltp-id + '/ietf-te-topology:te/ietf-optical-slice:slice-id-list=' + $slice-instance-id `" />
+ <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 decoloring UNI rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value=''></outcome>
+ </switch>
+ <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'></delete>
+ <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>
+ </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>
+ </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 diff --git a/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-modify.xml b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-modify.xml new file mode 100644 index 00000000..bc0505d4 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/p2p_eline/GENERIC-RESOURCE-API_p2p-vnf-topology-operation-p2p-modify.xml @@ -0,0 +1,1425 @@ +<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='tsli-vnf-topology-operation-trans-slice-modify' 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[$vnf-index].vnf-data.service-information.service-instance-id-->
+ <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id -->
+ <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].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">
+ <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
+ <!-- resource="service-instance"-->
+ <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id-->
+ <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id -->
+ <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type'-->
+ <!-- local-only="false"-->
+ <!-- force="true" pfx="tmp.aai.service-instance">-->
+ <outcome value='success'>
+ <switch test='`$tmp.aai.service-instance.allotted-resources.allotted-resource_length != 0`'>
+ <outcome value='false'></outcome>
+ <outcome value='true'>
+ <block>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnfs"
+ key="selflink = 'https://aai.onap:8443/aai/v25/network/pnfs?depth=0' depth = 0"
+ local-only="false"
+ pfx="ccsdkTopopnfs" ></get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="logical-links"
+ key="selflink = 'https://aai.onap:8443/aai/v25/network/logical-links?depth=0'"
+ local-only="false"
+ pfx="ccsdkTopologicalLinks" ></get-resource>
+ <set>
+ <parameter name='tmp.arr' value='' />
+ <parameter name='tmp.arridx' value='0' />
+ <parameter name='tmp.arr_length' value='0' />
+ <parameter name='otn-tunnel-slice' value='' />
+ <parameter name='otn-tunnel-slice_length' value='0' />
+ <!--<parameter name='tmp.slicevpns' value='' />-->
+ <!--<parameter name='tmp.slicevpns_length' value='0' />-->
+ <!--<parameter name='tmp.slicevpnuuids' value='' />-->
+ <!--<parameter name='tmp.slicevpnuuids.' value='' />-->
+ <parameter name='bwModified' value='false' />
+ </set>
+ <for index='aridx' start='0' end='`$tmp.aai.service-instance.allotted-resources.allotted-resource_length`' >
+ <set>
+ <parameter name='allotted-resource-id' value="`$tmp.aai.service-instance.allotted-resources.allotted-resource[$aridx].id`" />
+ </set>
+ <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
+ <!-- resource="allotted-resource"-->
+ <!-- key='service-instance.service-instance-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id-->
+ <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id -->
+ <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type-->
+ <!-- AND allotted-resource.id = $allotted-resource-id'-->
+ <!-- local-only="false"-->
+ <!-- force="true" pfx="tmp.aai.allotted-resource">-->
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="allotted-resource"
+ 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
+ AND allotted-resource.id = $allotted-resource-id'
+ local-only="false"
+ force="true" pfx="tmp.aai.allotted-resource">
+ <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>
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="allotted-resource:relationship-list"
+ 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
+ AND allotted-resource.id = $allotted-resource-id'
+ local-only="false"
+ force="true" pfx="tmp.aai.allotted-resource.relationship-list">
+ <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>
+ <outcome value='success'>
+ <block atomic="true">
+ <switch test='`$tmp.aai.allotted-resource.relationship-list.relationship_length != 0`'>
+ <outcome value='false'></outcome>
+ <outcome value='true'>
+ <block atomic="true">
+ <for index='idx' start='0' end='`$tmp.aai.allotted-resource.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].related-to`'>
+ <outcome value='network-policy'>
+ <block atomic="true">
+ <set>
+ <parameter name='network-policy-id' value="`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-policy"
+ key='network-policy.network-policy-id = $network-policy-id'
+ local-only="false"
+ force="true" pfx="tmp.aai.network-policy">
+ <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>
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='maximum-bandwidth' value="`$tmp.aai.network-policy.max-bandwidth`" />
+ <parameter name='route-distinguisher' value='`$maximum-bandwidth /1000 *4 /5 +1`' />
+ </set>
+ <set>
+ <parameter name='gfp' value='`$maximum-bandwidth /1000 *4 /5 +1`' />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <for index='idx' start='0' end='`$tmp.aai.allotted-resource.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].related-to`'>
+ <outcome value='logical-link'>
+ <block atomic="true">
+ <set>
+ <parameter name='logical-link-name' value="`$tmp.aai.allotted-resource.relationship-list.relationship[$idx].relationship-data[0].relationship-value`" />
+ <parameter name='currLinkIsFound' value="false" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="logical-link"
+ key='logical-link.link-name = $logical-link-name'
+ local-only="false"
+ force="true" pfx="tmp.aai.logical-link">
+ <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>
+ <outcome value='success'>
+ <block atomic='true'>
+ <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'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.aai.connectivity.' value='' />
+ </set>
+ <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 atomic="true">
+ <switch test='`$tmp.aai.logical-link.link-id == $tmp.aai.connectivity.etht-svc-name`'>
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='currLinkIsFound' value="true" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
+ <switch test='`$tmp.aai.connectivity.bandwidth-profile-name == $gfp`'>
+ <outcome value='true'></outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='bwModified' value="true" />
+ </set>
+ <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">
+ <set>
+ <parameter name='tmp.aai.vpn-binding.' value='' />
+ </set>
+ <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">
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.aai.vpn-binding.vpn-id' >
+ <parameter name='vpn-id' value='`$tmp.aai.vpn-binding.vpn-id`' />
+ <parameter name='vpn-name' value='`$tmp.aai.vpn-binding.vpn-name`' />
+ <parameter name='route-distinguisher' value='`$gfp`' />
+ <parameter name='operational-status' value='Modified' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'>
+ <parameter name='connectivity-id' value='`$tmp.aai.connectivity.connectivity-id`' />
+ <parameter name='operational-status' value='Modified' />
+ <parameter name='bandwidth-profile-name' value='`$gfp`' />
+ <parameter name='cir' value='`$gfp *1000000`' />
+ <parameter name='eir' value='`$gfp *1000000`' />
+ </update>
+ </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>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </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>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </get-resource>
+ <switch test='`$currLinkIsFound`'>
+ <outcome value='true'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='false'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.otn-tunnel-name"/>
+ </execute>
+ <set>
+ <!--<parameter name='prop.ethernet-service-name' value="`$tmp.aai.logical-link.link-name`" />-->
+ <parameter name='prop.ethernet-service-name' value="`$tmp.aai.logical-link.link-id`" />
+ </set>
+ <set>
+ <parameter name='network-route-A' value="`$tmp.aai.logical-link.link-name`" />
+ <!--<parameter name='network-route-A' value="`$tmp.aai.logical-link.link-id`" />-->
+ </set>
+ <set>
+ <parameter name='network-route-B' value="`$tmp.aai.logical-link.link-name2`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-route"
+ key='network-route.route-id = $network-route-A'
+ local-only="false"
+ force="true" pfx="tmp.aai.network-route-A">
+ <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>
+ <outcome value='success'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.network-route-A.next-hop`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-domainA-pnfName"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.src.domainA.pnf-name' value="`$param-prefix-domainA-pnfName[0] + '-' +
+ $param-prefix-domainA-pnfName[1] + '-' +
+ $param-prefix-domainA-pnfName[2] + '-' +
+ $param-prefix-domainA-pnfName[3] + '-' +
+ $param-prefix-domainA-pnfName[4] + '-' +
+ $param-prefix-domainA-pnfName[5] + '-' +
+ $param-prefix-domainA-pnfName[6] + '-' +
+ $param-prefix-domainA-pnfName[7] + '-' +
+ $param-prefix-domainA-pnfName[8]`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.src.domainA.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.domainA.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.domainA.esr-thirdparty-id AND
+ depth = '1'"
+ pfx='tmp.aai.domainA.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.url' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.user' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.password' value="`$tmp.aai.domainA.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>
+ </block>
+ </outcome>
+ <outcome value='network-resource'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainA.eth-network-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" />
+ </set>
+ </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>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value="An error occured while splitting sna1_route" />
+ </return>
+ </outcome>
+ </execute>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="pnf.pnf-name = $tmp.src.domainA.pnf-name
+ AND p-interface.interface-name = $tmp.aai.network-route-A.next-hop"
+ local-only="false"
+ pfx="tmp.aai.network-route-A.p-interface-src" >
+ <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
+ <!-- resource="p-interface"-->
+ <!-- key="pnf.pnf-name = $unique-src-node-Id-->
+ <!-- and p-interface.interface-name = $tmp.aai.endpointA.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"-->
+ <!-- local-only="false" -->
+ <!-- pfx="tmp.aai.endpointA.p-interface-src" >-->
+ <outcome value='success'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.network-route-A.p-interface-src.interface-name`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-domainA"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.src.ltpId' value='`$param-prefix-domainA[$param-prefix-domainA_length -1]`' />
+ </set>
+ <set>
+ <parameter name='tmp.src.pnf-name' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value="An error occured while splitting sna1_route" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="uuid.connectivity-domainA-uuid"/>
+ </execute>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $uuid.connectivity-domainA-uuid'>
+ <parameter name='connectivity-id' value='`$uuid.connectivity-domainA-uuid`' />
+ <parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' />
+ <parameter name='operational-status' value='Created' />
+ <parameter name='access-provider-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -9]`' />
+ <parameter name='access-client-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -7]`' />
+ <parameter name='access-topology-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -5]`' />
+ <parameter name='access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' />
+ <parameter name='access-ltp-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -1]`' />
+ <parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' />
+ <parameter name='bandwidth-profile-name' value='`$gfp`' />
+ <parameter name='vpn-type' value='`$prop.sotn.vpnType`' />
+ <parameter name='cir' value='`$gfp *1000000`' />
+ <parameter name='eir' value='`$gfp *1000000`' />
+ <parameter name='cbs' value='`$prop.sotn.cbs`' />
+ <parameter name='ebs' value='`$prop.sotn.ebs`' />
+ <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />-->
+ <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />-->
+ <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />-->
+ <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />-->
+ <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />-->
+ <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />-->
+ <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ 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'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-domainA-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-domainA-uuid`" />
+ <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' -->
+ <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id -->
+ <!-- AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id -->
+ <!-- AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' -->
+ <!-- force="true" pfx="tmp.AnAI-data">-->
+ <!--<parameter name="relationship-list.relationship[0].related-to" value="connectivity" />-->
+ <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />-->
+ </save>
+ <for silentFailure='true' index='pividx' start='0' end='`$tmp.aai.network-route-A.p-interface-src.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.network-route-A.p-interface-src.relationship-list.relationship[$pividx].related-to`'>
+ <outcome value='tunnel-termination-point'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.source.ttp-id' value="`$tmp.aai.network-route-A.p-interface-src.relationship-list.relationship[$pividx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tunnel-termination-point"
+ key="tunnel-termination-point.ttp-id = $tmp.source.ttp-id
+ AND depth = '0'"
+ pfx='tmp.aai.source-ttp' local-only='false' >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='source.tunnel-tp-id' value="`$tmp.aai.source-ttp.tunnel-tp-id`" />
+ </set>
+ </block>
+ </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.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>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-route"
+ key='network-route.route-id = $network-route-B'
+ local-only="false"
+ force="true" pfx="tmp.aai.network-route-B">
+ <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>
+ <outcome value='success'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.network-route-B.next-hop`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-domainB-pnfName"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.dst.domainB.pnf-name' value="`$param-prefix-domainB-pnfName[0] + '-' +
+ $param-prefix-domainB-pnfName[1] + '-' +
+ $param-prefix-domainB-pnfName[2] + '-' +
+ $param-prefix-domainB-pnfName[3] + '-' +
+ $param-prefix-domainB-pnfName[4] + '-' +
+ $param-prefix-domainB-pnfName[5] + '-' +
+ $param-prefix-domainB-pnfName[6] + '-' +
+ $param-prefix-domainB-pnfName[7] + '-' +
+ $param-prefix-domainB-pnfName[8]`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.dst.domainB.pnf-name"
+ pfx='tmp.aai.destination-pnf' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <for silentFailure='true' index='dpvidx' start='0' end='`$tmp.aai.destination-pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].related-to`'>
+ <outcome value='esr-thirdparty-sdnc'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainB.esr-thirdparty-id' value="`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].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.domainB.esr-thirdparty-id AND
+ depth = '1'"
+ pfx='tmp.aai.domainB.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.url' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.user' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.password' value="`$tmp.aai.domainB.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>
+ </block>
+ </outcome>
+ <outcome value='network-resource'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainB.eth-network-id' value="`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" />
+ </set>
+ </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>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value="An error occured while splitting sna1_route" />
+ </return>
+ </outcome>
+ </execute>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="pnf.pnf-name = $tmp.dst.domainB.pnf-name
+ AND p-interface.interface-name = $tmp.aai.network-route-B.next-hop"
+ local-only="false"
+ pfx="tmp.aai.network-route-B.p-interface-dst" >
+ <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
+ <!-- resource="p-interface"-->
+ <!-- key="pnf.pnf-name = $unique-src-node-Id-->
+ <!-- and p-interface.interface-name = $tmp.aai.endpointA.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"-->
+ <!-- local-only="false" -->
+ <!-- pfx="tmp.aai.endpointA.p-interface-src" >-->
+ <outcome value='success'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.network-route-B.p-interface-dst.interface-name`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-domainB"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.dst.ltpId' value='`$param-prefix-domainB[$param-prefix-domainB_length -1]`' />
+ </set>
+ <set>
+ <parameter name='tmp.dst.pnf-name' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value="An error occured while splitting sna1_route" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.connectivity-domainB-uuid"/>
+ </execute>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainB-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainB-uuid`' />
+ <parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' />
+ <parameter name='operational-status' value='Created' />
+ <parameter name='access-provider-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -9]`' />
+ <parameter name='access-client-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -7]`' />
+ <parameter name='access-topology-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -5]`' />
+ <parameter name='access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' />
+ <parameter name='access-ltp-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -1]`' />
+ <parameter name='cvlan' value='`$tmp.aai.network-route-B.logical-interface-id`' />
+ <parameter name='bandwidth-profile-name' value='`$gfp`' />
+ <parameter name='vpn-type' value='`$prop.sotn.vpnType`' />
+ <parameter name='cir' value='`$gfp *1000000`' />
+ <parameter name='eir' value='`$gfp *1000000`' />
+ <parameter name='cbs' value='`$prop.sotn.cbs`' />
+ <parameter name='ebs' value='`$prop.sotn.ebs`' />
+ <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />-->
+ <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />-->
+ <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />-->
+ <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />-->
+ <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />-->
+ <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />-->
+ <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ 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'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainB-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainB-uuid`" />
+ <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' -->
+ <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id -->
+ <!-- AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id -->
+ <!-- AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' -->
+ <!-- force="true" pfx="tmp.AnAI-data">-->
+ <!--<parameter name="relationship-list.relationship[0].related-to" value="connectivity" />-->
+ <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />-->
+ </save>
+ <for silentFailure='true' index='dividx' start='0' end='`$tmp.aai.network-route-B.p-interface-dst.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.network-route-B.p-interface-dst.relationship-list.relationship[$dividx].related-to`'>
+ <outcome value='tunnel-termination-point'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.destination.ttp-id' value="`$tmp.aai.network-route-B.p-interface-dst.relationship-list.relationship[$dividx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tunnel-termination-point"
+ key="tunnel-termination-point.ttp-id = $tmp.destination.ttp-id
+ AND depth = '0'"
+ pfx='tmp.aai.destination-ttp' local-only='false' >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='destination.tunnel-tp-id' value="`$tmp.aai.destination-ttp.tunnel-tp-id`" />
+ </set>
+ </block>
+ </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.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>
+ </get-resource>
+ <set>
+ <parameter name='prop.connection-attachment.access-provider-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -9]`' />
+ <parameter name='prop.connection-attachment.access-client-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -7]`' />
+ <parameter name='prop.connection-attachment.access-topology-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -5]`' />
+ <parameter name='prop.connection-attachment.access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' />
+ <parameter name='prop.connection-attachment.access-ltp-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -1]`' />
+ <parameter name='prop.remote.connection-attachment.access-provider-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -9]`' />
+ <parameter name='prop.remote.connection-attachment.access-client-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -7]`' />
+ <parameter name='prop.remote.connection-attachment.access-topology-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -5]`' />
+ <parameter name='prop.remote.connection-attachment.access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' />
+ <parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -1]`' />
+ <!--<parameter name='prop.remote.connection-attachment.access-provider-id' value='`$oof.vpn.access-provider-id`' />-->
+ <!--<parameter name='prop.remote.connection-attachment.access-client-id' value='`$oof.vpn.access-client-id`' />-->
+ <!--<parameter name='prop.remote.connection-attachment.access-topology-id' value='`$oof.vpn.access-topology-id`' />-->
+ <!--<parameter name='prop.remote.connection-attachment.access-node-id' value='`$oof.vpn.access-node-id`' />-->
+ <!--<parameter name='prop.remote.connection-attachment.access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />-->
+ </set>
+ <set>
+ <parameter name='prop.ethsrvType' value='`$network-route-A`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name="filename" value="`$filenamemm`" />
+ </execute>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-find-maximum-used-tpn' mode='sync' ></call>
+ <for index='otnidx' start='0' end='`$tmp.otninfo_length`' >
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.vpn-binding-otnidx-uuid"/>
+ </execute>
+ <switch test="`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id == ''`">
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.access-provider-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-provider-id`' />
+ <parameter name='tmp.access-client-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-client-id`' />
+ <parameter name='tmp.access-topology-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-topology-id`' />
+ <parameter name='tmp.srcdstpnf-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='tmp.access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />
+ <parameter name='tmp.access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />
+ <parameter name='tmp.access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />
+ <parameter name='tmp.srcdstpnf-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.srcdstpnf-name' value="`'networkId-providerId-' +
+ $tmp.access-provider-id + '-clientId-' +
+ $tmp.access-client-id + '-topologyId-' +
+ $tmp.access-topology-id + '-nodeId-' +
+ $tmp.srcdstpnf-id`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.srcdstpnf-name"
+ pfx='tmp.aai.srcdst-pnf' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.srcdst-pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.srcdst-pnf.relationship-list.relationship[$spvidx].related-to`'>
+ <outcome value='esr-thirdparty-sdnc'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainG.esr-thirdparty-id' value="`$tmp.aai.srcdst-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.domainG.esr-thirdparty-id AND
+ depth = '1'"
+ pfx='tmp.aai.domainG.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.url' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.user' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.password' value="`$tmp.aai.domainG.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>
+ </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='`$otnidx == 0`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.domainG-src-access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' />
+ <parameter name='tmp.domainG-dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <switch test='`$otnidx == $tmp.otninfo_length - 1`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.domainG-src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />
+ <parameter name='tmp.domainG-dst-access-node-id' value='`$param-prefix-domainB[$param-prefix-domainB_length -3]`' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='tmp.domainG-src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />
+ <parameter name='tmp.domainG-dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />
+ </set>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' >
+ <parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' />
+ <parameter name='vpn-name' value='`$prop.otn-tunnel-name`' />
+ <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />-->
+ <parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />
+ <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->
+ <parameter name='access-provider-id' value='`$tmp.access-provider-id`' />
+ <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->
+ <parameter name='access-client-id' value='`$tmp.access-client-id`' />
+ <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />-->
+ <parameter name='access-topology-id' value='`$tmp.access-topology-id`' />
+ <!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />-->
+ <parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' />
+ <parameter name='src-access-ltp-id' value='`$tmp.otninfo[$otnidx].srcPort.src-tunnel-tp-id`' />
+ <!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />-->
+ <parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' />
+ <parameter name='dst-access-ltp-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-tunnel-tp-id`' />
+ <parameter name='route-distinguisher' value='`$gfp`' />
+ <parameter name='operational-status' value='Created' />
+ <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />-->
+ <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />-->
+ <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />-->
+ <parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' />
+ <parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' />
+ <parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' />
+ <!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) -->
+ <parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ </save>
+ <switch test='`$otnidx == 0`'>
+ <outcome value='true'>
+ <block>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list'
+ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-domainA-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-domainA-uuid`" />
+ </save>
+ <set>
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.ts-coloring-uni-port.templatefile`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.url + '/restconf/data/ietf-network:networks/network=' + $tmp.domainA.eth-network-id + '/node=' + $tmp.src.pnf-name + '/ietf-network-topology:termination-point=' + $tmp.src.ltpId + '/ietf-te-topology:te' `" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <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 UNI Coloring for domain A" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='testingvalue' value='$tmp.otninfo_length -1' />
+ </set>
+ <switch test='`$otnidx == $tmp.otninfo_length - 1`'>
+ <outcome value='true'>
+ <block>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list'
+ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainB-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainB-uuid`" />
+ </save>
+ <set>
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.ts-coloring-uni-port.templatefile`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.url + '/restconf/data/ietf-network:networks/network=' + $tmp.domainB.eth-network-id + '/node=' + $tmp.dst.pnf-name + '/ietf-network-topology:termination-point=' + $tmp.dst.ltpId + '/ietf-te-topology:te' `" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="patch"/>
+ <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 UNI coloring for domain B" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="uuid.connectivity-otnidx-uuid"/>
+ </execute>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $uuid.connectivity-otnidx-uuid'>
+ <parameter name='connectivity-id' value='`$uuid.connectivity-otnidx-uuid`' />
+ <!--<parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' />-->
+ <parameter name='operational-status' value='Created' />
+ <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />-->
+ <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />-->
+ <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />-->
+ <!--<parameter name='access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />-->
+ <!--<parameter name='access-ltp-id' value='``' />-->
+ <!--<parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' />-->
+ <parameter name='bandwidth-profile-name' value='`$gfp`' />
+ <parameter name='vpn-type' value='dummy' />
+ <parameter name='cir' value='`$gfp *1000000`' />
+ <parameter name='eir' value='`$gfp *1000000`' />
+ <!--<parameter name='CBS' value='`$prop.sotn.cbs`' />-->
+ <!--<parameter name='EBS' value='`$prop.sotn.ebs`' />-->
+ <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />-->
+ <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />-->
+ <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />-->
+ <!--<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />-->
+ <!--<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />-->
+ <!--<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />-->
+ <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ 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'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-otnidx-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-otnidx-uuid`" />
+ <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' -->
+ <!-- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id -->
+ <!-- AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id -->
+ <!-- AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' -->
+ <!-- force="true" pfx="tmp.AnAI-data">-->
+ <!--<parameter name="relationship-list.relationship[0].related-to" value="connectivity" />-->
+ <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />-->
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list'
+ key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-otnidx-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-otnidx-uuid`" />
+ </save>
+ <set>
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <set>
+ <parameter name='domain-A.tunnel-tp-id' value='' />
+ <parameter name='domain-A.node-id' value='' />
+ <parameter name='domain-A.network-id' value="" />
+ <parameter name='domain-A.provider-id' value="" />
+ <parameter name='domain-A.client-id' value="" />
+ <parameter name='domain-A.te-topo-id' value="" />
+ <parameter name='domain-A.network-type' value="" />
+ <parameter name='domain-A.ltpId' value="" />
+ <parameter name='tmp.domain-A.network-id' value="" />
+ <parameter name='tmp.domain-A.ttp-id' value="" />
+ <parameter name='network-route-A' value="" />
+ <!--<parameter name='domain-A.' value="" />-->
+ <parameter name='request-id' value='' />
+ <parameter name='otn-source-node' value='' />
+ <parameter name='otn-dest-node' value='' />
+ <parameter name='bw-odu' value="" />
+ <parameter name='src-ttp-id' value='' />
+ <parameter name='dst-ttp-id' value='' />
+ <parameter name='domain-B.tunnel-tp-id' value='' />
+ <parameter name='domain-B.node-id' value='' />
+ <parameter name='domain-B.network-id' value="" />
+ <parameter name='domain-B.provider-id' value="" />
+ <parameter name='domain-B.client-id' value="" />
+ <parameter name='domain-B.te-topo-id' value="" />
+ <parameter name='domain-B.network-type' value="" />
+ <parameter name='domain-B.ltpId' value="" />
+ <parameter name='tmp.domain-B.network-id' value="" />
+ <parameter name='tmp.domain-B.ttp-id' value="" />
+ <parameter name='network-route-B' value="" />
+ <!--<parameter name='domain-B.' value="" />-->
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </get-resource>
+ </for>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-bindings"
+ key="selflink = 'https://aai.onap:8443/aai/v21/network/vpn-bindings"
+ local-only="false"
+ pfx="tmp.aai.all-vpn-bindings" >
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='vpnbidx' start='0' end='`$tmp.aai.all-vpn-bindings.vpn-binding_length`' >
+ <block atomic='true'>
+ <!--<switch test="`$tmp.slicevpnuuids[$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id] != '' `">-->
+ <!-- Replace vpn-type with slice-id (a new attribbute in the latest AAI) -->
+ <switch test="`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].ops-note == $tmp.aai.service-instance.service-instance-id `">
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='providerValue' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].access-provider-id`' />
+ <parameter name='found' value='false' />
+ </set>
+ <switch test='`$tmp.arr_length != 0`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <for index='arridx' start='0' end='`$tmp.arr_length`' >
+ <switch test='`$tmp.arr[$arridx] == $providerValue`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='found' value='true' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id' >
+ <parameter name='vpn-id' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id`' />
+ <parameter name='vpn-type' value='`$arridx`' />
+ </update>
+ <set>
+ <parameter name='sizeOfSliceList' value='`$otn-tunnel-slice[$arridx].list_length`' />
+ </set>
+ <set>
+ <!--<parameter name='`tmp.arr[$arridx + 1]`' value='`$providerValue`' />-->
+ <!--<parameter name='tmp.arr_length' value='`$tmp.arr_length + 1`' />-->
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].request-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].otn-source-node`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].src-access-node-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].otn-dest-node`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].dst-access-node-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].bw-odu`' value="`'0,' + $gfp`" />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].src-ttp-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].src-access-ltp-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].dst-ttp-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].dst-access-ltp-id`' />
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].domainurl`' value="`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-region`" />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].domainuser`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-description`' />
+ <parameter name='`otn-tunnel-slice[$arridx].list[$sizeOfSliceList].domainpassword`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-platform`' />
+ <!--<parameter name='otn-tunnel-slice_length' value='`$arridx + 2`' />-->
+ <parameter name='`otn-tunnel-slice[$arridx].list_length`' value='`$sizeOfSliceList + 1`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block></block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$found`'>
+ <outcome value='true'>
+ <block></block>
+ </outcome>
+ <outcome value='false'>
+ <block atomic='true'>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id' >
+ <parameter name='vpn-id' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id`' />
+ <parameter name='vpn-type' value='`$arridx + 1`' />
+ </update>
+ <set>
+ <parameter name='`tmp.arr[$arridx + 1]`' value='`$providerValue`' />
+ <parameter name='tmp.arr_length' value='`$tmp.arr_length + 1`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].request-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].otn-source-node`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].src-access-node-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].otn-dest-node`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].dst-access-node-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].bw-odu`' value="`'0,' + $gfp`" />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].src-ttp-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].src-access-ltp-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].dst-ttp-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].dst-access-ltp-id`' />
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].domainurl`' value="`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-region`" />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].domainuser`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-description`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list[0].domainpassword`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-platform`' />
+ <parameter name='otn-tunnel-slice_length' value='`$arridx + 2`' />
+ <parameter name='`otn-tunnel-slice[$arridx + 1].list_length`' value='1' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block atomic='true'>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id' >
+ <parameter name='vpn-id' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id`' />
+ <parameter name='vpn-type' value='0' />
+ </update>
+ <set>
+ <parameter name='tmp.arr[0]' value='`$providerValue`' />
+ <parameter name='tmp.arr_length' value='1' />
+ <parameter name='`otn-tunnel-slice[0].list[0].request-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-id`' />
+ <parameter name='`otn-tunnel-slice[0].list[0].otn-source-node`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].src-access-node-id`' />
+ <parameter name='`otn-tunnel-slice[0].list[0].otn-dest-node`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].dst-access-node-id`' />
+ <parameter name='`otn-tunnel-slice[0].list[0].bw-odu`' value="`'0,' + $gfp`" />
+ <parameter name='`otn-tunnel-slice[0].list[0].src-ttp-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].src-access-ltp-id`' />
+ <parameter name='`otn-tunnel-slice[0].list[0].dst-ttp-id`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].dst-access-ltp-id`' />
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='`otn-tunnel-slice[0].list[0].domainurl`' value="`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-region`" />
+ <parameter name='`otn-tunnel-slice[0].list[0].domainuser`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-description`' />
+ <parameter name='`otn-tunnel-slice[0].list[0].domainpassword`' value='`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].vpn-platform`' />
+ <parameter name='otn-tunnel-slice_length' value='1' />
+ <parameter name='otn-tunnel-slice[0].list_length' value='1' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
+ </block>
+ </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.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>
+ <for index='dmnsidx' start='0' end='`$otn-tunnel-slice_length`' >
+ <block atomic='true'>
+ <for index='stunidx' start='0' end='`$otn-tunnel-slice[$dmnsidx].list_length`' >
+ <block atomic='true'>
+ <set>
+ <parameter name='`otn-tunnel-sliceG-list[$stunidx].request-id`' value='`$otn-tunnel-slice[$dmnsidx].list[$stunidx].request-id`' />
+ <parameter name='`otn-tunnel-sliceG-list[$stunidx].otn-source-node`' value='`$otn-tunnel-slice[$dmnsidx].list[$stunidx].otn-source-node`' />
+ <parameter name='`otn-tunnel-sliceG-list[$stunidx].otn-dest-node`' value='`$otn-tunnel-slice[$dmnsidx].list[$stunidx].otn-dest-node`' />
+ <parameter name='`otn-tunnel-sliceG-list[$stunidx].bw-odu`' value="`$otn-tunnel-slice[$dmnsidx].list[$stunidx].bw-odu`" />
+ <parameter name='`otn-tunnel-sliceG-list[$stunidx].src-ttp-id`' value='`$otn-tunnel-slice[$dmnsidx].list[$stunidx].src-ttp-id`' />
+ <parameter name='`otn-tunnel-sliceG-list[$stunidx].dst-ttp-id`' value='`$otn-tunnel-slice[$dmnsidx].list[$stunidx].dst-ttp-id`' />
+ <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' />
+ <parameter name='otn-tunnel-sliceG-list_length' value='`$stunidx + 1`' />
+ <parameter name="tmp.domainG.restapiUrl" value="`$otn-tunnel-slice[$dmnsidx].list[$stunidx].domainurl`" />
+ <parameter name="tmp.domainG.restapiUser" value="`$otn-tunnel-slice[$dmnsidx].list[$stunidx].domainuser`" />
+ <parameter name="tmp.domainG.restapiPassword" value="`$otn-tunnel-slice[$dmnsidx].list[$stunidx].domainpassword`" />
+ </set>
+ </block>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.transport-sliceG-list-creation.templatefile`" />
+ <parameter name="restapiUrl" value="`$tmp.domainG.restapiUrl + '/restconf/operations/ietf-optical-slice:create-optical-slice'`" />
+ <parameter name="restapiUser" value="`$tmp.domainG.restapiUser`" />
+ <parameter name="restapiPassword" value="`tmp.domainG.restapiPassword`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <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 slice creation api for domain A" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </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 |