aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorHesam Rahimi <hesam.rahimi@huawei.com>2020-09-03 13:57:26 +0000
committerHesam Rahimi <hesam.rahimi@huawei.com>2020-09-03 13:58:52 +0000
commit67331673496db788f450b8a3acfc8f268ded354f (patch)
treed4eccf11889a477b3d2efad5d1ca554df2a34481 /platform-logic/generic-resource-api/src/main/xml
parent9a7cfd42baf464208fb05a805497847b5061ed10 (diff)
Adding DGs to support Transport Slicing operations.
- Allocate a Transport Slice - Activate a Transport Slice - DeActivate a Transport Slice - Delete a Transport Slice The logic and the required call-flow inside the DGs are not yet completed and are still work-in-progress. Issue-ID: SDNC-1202 Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com> Change-Id: I0c9246063861ac43b645ad198d02ad35bada8e96 Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com> Former-commit-id: a6df651138e1da2668515ee6d23e89670f376186
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml15
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml401
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-activate.xml470
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml528
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-deactivate.xml350
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-delete.xml395
6 files changed, 1957 insertions, 202 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
index 9b8f9a0a..6ea99b64 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation.xml
@@ -60,6 +60,9 @@
<outcome value='ActivateSOTNUnderlayInstance'>
<call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-underlay-activate' mode='sync' ></call>
</outcome>
+ <outcome value='ActivateTransportSliceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-trans-slice-activate' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' ></call>
</outcome>
@@ -88,6 +91,12 @@
<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-vpn-site-resource-deactivate' mode='sync' ></call>
</block>
</outcome>
+ <outcome value='DeactivateSOTNUnderlayInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-underlay-deactivate' mode='sync' ></call>
+ </outcome>
+ <outcome value='DeactivateTransportSliceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-trans-slice-deactivate' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' ></call>
</outcome>
@@ -155,6 +164,9 @@
<outcome value='CreateSOTNUnderlayInstance'>
<call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-underlay-create' mode='sync' ></call>
</outcome>
+ <outcome value='AllocateTransportSliceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-trans-slice-allocate' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<block></block>
</outcome>
@@ -212,6 +224,9 @@
<outcome value='DeleteSOTNUnderlayInstance'>
<call module='GENERIC-RESOURCE-API' rpc='sotn-vnf-topology-operation-underlay-delete' mode='sync' ></call>
</outcome>
+ <outcome value='DeleteTransportSliceInstance'>
+ <call module='GENERIC-RESOURCE-API' rpc='tsli-vnf-topology-operation-trans-slice-delete' mode='sync' ></call>
+ </outcome>
<outcome value='Other'>
<block></block>
</outcome>
diff --git a/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml b/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml
index d8e111c0..04395f27 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sotn_nni/GENERIC-RESOURCE-API_sotn-vf-operation-uni-activate.xml
@@ -1,63 +1,65 @@
-<service-logic xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="${project.version}">
- <method rpc="sotn-vf-operation-uni-activate" mode="sync">
+<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='sotn-vf-operation-uni-activate' mode='sync'>
<block atomic="true">
- <switch test="`$service-data.vnfs.vnf_length`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data"/>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
</return>
</outcome>
</switch>
- <for index="idx" start="0" end="`$service-data.vnfs.vnf_length`">
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
<switch test="`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`">
- <outcome value="true">
+ <outcome value='true'>
<block atomic="true">
<set>
- <parameter name="vnf-index" value="`$idx`"/>
+ <parameter name='vnf-index' value='`$idx`' />
</set>
<set>
- <parameter name="tmp.vnf-id" value="`$vf-module-topology-operation-input.vnf-information.vnf-id`"/>
+ <parameter name='tmp.vnf-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />
</set>
</block>
</outcome>
</switch>
</for>
- <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 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>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`">
- <outcome value="0">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data"/>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value='0'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
</return>
</outcome>
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data"/>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
</return>
</outcome>
- <outcome value="Other">
+ <outcome value='Other'>
<block atomic="true">
<set>
- <parameter name="vf-module-length" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`"/>
+ <parameter name='vf-module-length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
</set>
- <for index="idx" start="0" end="`$vf-module-length`">
+ <for index='idx' start='0' end='`$vf-module-length`' >
<switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`">
- <outcome value="true">
+ <outcome value='true'>
<block atomic="true">
<set>
- <parameter name="tmp.vidx" value="`$idx`"/>
- <parameter name="ctx.vf-module-data." value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.`"/>
+ <parameter name='tmp.vidx' value='`$idx`' />
+ <parameter name='ctx.vf-module-data.' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.`' />
</set>
<set>
- <parameter name="vf-module-request-input." value="`$ctx.vf-module-data.vf-module-request-input.`"/>
+ <parameter name='vf-module-request-input.' value='`$ctx.vf-module-data.vf-module-request-input.`' />
</set>
</block>
</outcome>
@@ -66,78 +68,84 @@
</block>
</outcome>
</switch>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="generic-vnf" key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id" pfx="tmp.aai.generic-vnf" local-only="false">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ pfx='tmp.aai.generic-vnf' local-only='false' >
<!--AND depth = '0'"-->
- <outcome value="success">
+ <outcome value='success'>
<block>
- <for silentFailure="true" index="vidx" start="0" end="`$tmp.aai.generic-vnf.relationship-list.relationship_length`">
- <switch test="`$tmp.aai.generic-vnf.relationship-list.relationship[$vidx].related-to`">
- <outcome value="uni">
+ <for silentFailure='true' index='vidx' start='0' end='`$tmp.aai.generic-vnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.generic-vnf.relationship-list.relationship[$vidx].related-to`'>
+ <outcome value='uni'>
<block atomic="true">
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="uni" key="uni.id = $tmp.aai.generic-vnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value" pfx="tmp.aai.uni" local-only="false">
- <outcome value="success">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="uni"
+ key="uni.id = $tmp.aai.generic-vnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value"
+ pfx='tmp.aai.uni' local-only='false' >
+ <outcome value='success'>
<block>
<set>
- <!--
- <parameter name='`tmp.unis.uni[$vidx].tpId`' value="`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value`" />
- -->
- <parameter name="`tmp.unis.uni[$vidx].`" value="`$tmp.aai.uni.`"/>
+ <!--<parameter name='`tmp.unis.uni[$vidx].tpId`' value="`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value`" />-->
+ <parameter name='`tmp.unis.uni[$vidx].`' value="`$tmp.aai.uni.`" />
</set>
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="split">
- <parameter name="original_string" value="`tmp.aai.uni.tp-id`"/>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.uni.tp-id`'/>
<parameter name="regex" value="[^-]+$"/>
<parameter name="ctx_memory_result_key" value="param-prefix"/>
- <outcome value="success">
+ <outcome value='success'>
<set>
- <parameter name="tmp.src.ltpId" value="`$param-prefix[$param-prefix_length -1]`"/>
+ <parameter name='tmp.src.ltpId' value='`$param-prefix[$param-prefix_length -1]`' />
</set>
</outcome>
- <outcome value="failure">
- <return status="failure">
- <parameter name="error-code" value=""/>
- <parameter name="error-message" value="An error occured while splitting sna1_route"/>
+ <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="pnf" key="'pnf.pnf-name = $tmp.unis.uni[$vidx].pnf-name' AND depth = '0'" pfx="tmp.aai.pnf" local-only="false">
- <!--
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- -->
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="'pnf.pnf-name = $tmp.unis.uni[$vidx].pnf-name'
+ AND depth = '0'"
+ pfx='tmp.aai.pnf' local-only='false' >
+ <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
<!-- resource="generic-vnf" -->
- <!--
- key="'generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id'
- -->
+ <!-- key="'generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id' -->
<!-- AND depth = '0'"-->
- <!--
- pfx='tmp.aai.generic-vnf' local-only='false' >
- -->
- <outcome value="success">
+ <!-- pfx='tmp.aai.generic-vnf' local-only='false' >-->
+ <outcome value='success'>
<block>
<set>
- <parameter name="`$tmp.unis.uni[$vidx].node-id`" value="`$tmp.aai.pnf.pnf-id`"/>
+ <parameter name='`$tmp.unis.uni[$vidx].node-id`' value="`$tmp.aai.pnf.pnf-id`" />
</set>
- <for silentFailure="true" index="ridx" start="0" end="`$tmp.aai.pnf.relationship-list.relationship_length`">
- <switch test="`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].related-to`">
- <outcome value="thirdparty-controller">
+ <for silentFailure='true' index='ridx' start='0' end='`$tmp.aai.pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].related-to`'>
+ <outcome value='thirdparty-controller'>
<block atomic="true">
<set>
- <parameter name="`$tmp.unis.uni[$vidx].thirdparty-sdnc-id`" value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`"/>
+ <parameter name='`$tmp.unis.uni[$vidx].thirdparty-sdnc-id`' value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
</set>
</block>
</outcome>
- <outcome value="network-resource">
+ <outcome value='network-resource'>
<block atomic="true">
<set>
- <parameter name="`$tmp.unis.uni[$vidx].network-id`" value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`"/>
+ <parameter name='`$tmp.unis.uni[$vidx].network-id`' value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
</set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-resource" key="'network-resource.network-id = $tmp.unis.uni[$vidx].network-id' AND depth = '0'" pfx="tmp.aai.network-resource" local-only="false">
- <outcome value="success">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-resource"
+ key="'network-resource.network-id = $tmp.unis.uni[$vidx].network-id'
+ AND depth = '0'"
+ pfx='tmp.aai.network-resource' local-only='false' >
+ <outcome value='success'>
<set>
- <parameter name="`$tmp.unis.uni[$vidx].network-id`" value="`$tmp.aai.network-resource.network-id`"/>
- <parameter name="`$tmp.unis.uni[$vidx].provider-id`" value="`$tmp.aai.network-resource.provider-id`"/>
- <parameter name="`$tmp.unis.uni[$vidx].client-id`" value="`$tmp.aai.network-resource.client-id`"/>
- <parameter name="`$tmp.unis.uni[$vidx].te-topo-id`" value="`$tmp.aai.network-resource.te-topo-id`"/>
- <parameter name="`$tmp.unis.uni[$vidx].network-type`" value="`$tmp.aai.network-resource.network-type`"/>
+ <parameter name="`$tmp.unis.uni[$vidx].network-id`" value="`$tmp.aai.network-resource.network-id`" />
+ <parameter name="`$tmp.unis.uni[$vidx].provider-id`" value="`$tmp.aai.network-resource.provider-id`" />
+ <parameter name="`$tmp.unis.uni[$vidx].client-id`" value="`$tmp.aai.network-resource.client-id`" />
+ <parameter name="`$tmp.unis.uni[$vidx].te-topo-id`" value="`$tmp.aai.network-resource.te-topo-id`" />
+ <parameter name="`$tmp.unis.uni[$vidx].network-type`" value="`$tmp.aai.network-resource.network-type`" />
</set>
</outcome>
</get-resource>
@@ -155,108 +163,97 @@
</outcome>
</switch>
</for>
- <switch test="`$tmp.unis.uni_length < 2`">
- <outcome value="true">
- <return status="success">
- <parameter name="ack-final-indicator" value="Y"/>
- <parameter name="error-code" value="200"/>
- <parameter name="error-message" value="`$error-message`"/>
+ <switch test='`$tmp.unis.uni_length &lt; 2`' >
+ <outcome value='true'>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
</return>
</outcome>
</switch>
</block>
</outcome>
</get-resource>
- <call module="GENERIC-RESOURCE-API" rpc="sotn-get-otn-tunnel-path-from-oof" mode="sync"/>
- <for index="vidx" start="0" end="`$tmp.unis.uni_length`">
+ <call module='GENERIC-RESOURCE-API' rpc='sotn-get-otn-tunnel-path-from-oof' mode='sync' ></call>
+ <for index='vidx' start='0' end='`$tmp.unis.uni_length`' >
<block atomic="true">
<set>
- <parameter name="oof.vpn." value="`$tmp.unis.uni[$vidx].`"/>
+ <parameter name='oof.vpn.' value='`$tmp.unis.uni[$vidx].`' />
</set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-resource" key="network-resource.network-id = $oof.vpn.network-id" pfx="tmp.aai.network-resource" local-only="false">
- <outcome value="success">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-resource"
+ key="network-resource.network-id = $oof.vpn.network-id"
+ pfx='tmp.aai.network-resource' local-only='false' >
+ <outcome value='success'>
<block>
- <for index="ridx" start="0" end="`$tmp.aai.network-resource.relationship-list.relationship_length`">
- <switch test="`$tmp.aai.network-resource.relationship-list.relationship[$ridx].related-to`">
- <outcome value="esr-thirdparty-sdnc">
+ <for index='ridx' start='0' end='`$tmp.aai.network-resource.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.network-resource.relationship-list.relationship[$ridx].related-to`'>
+ <outcome value='esr-thirdparty-sdnc'>
<set>
- <parameter name="prop.sdncRestApi.thirdpartySdnc.id" value="`$tmp.aai.network-resource.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`"/>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.id' value="`$tmp.aai.network-resource.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
</set>
</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`"/>
+ <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`"/>
+ <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>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false">
- <outcome value="success">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
<set>
- <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`"/>
- <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`"/>
- <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.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='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.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"/>
- -->
+ <!--<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>
</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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`"/>
+ <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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`"/>
+ <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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
</return>
</outcome>
</get-resource>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`"/>
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`"/>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
<parameter name="format" value="json"/>
<parameter name="httpMethod" value="post"/>
<parameter name="responsePrefix" value="token-result"/>
@@ -264,99 +261,99 @@
<parameter name="trustStorePassword" value="adminadmin"/>
<parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
<parameter name="keyStorePassword" value="adminadmin"/>
- <outcome value="success">
+ <outcome value='success'>
<set>
- <parameter name="prop.sdncRestApi.token_id" value="`$token-result.data.token_id`"/>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
</set>
</outcome>
- <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 get token rest api"/>
+ <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 get token rest api" />
</return>
</outcome>
</execute>
- <call module="GENERIC-RESOURCE-API" rpc="sotn-create-otn-tunnel" mode="sync"/>
+ <call module='GENERIC-RESOURCE-API' rpc='sotn-create-otn-tunnel' mode='sync' ></call>
<set>
- <parameter name="ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type" value="ietf-eth-tran-types:mef-10-bwp"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type" value="ietf-eth-tran-types:p2p-svc"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status" value="ietf-te-types:tunnel-state-up"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id" value="0"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type" value="ietf-eth-tran-types:port-classification"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id" value="1"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type" value="ietf-eth-tran-types:port-classification"/>
+ <parameter name='ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type' value='ietf-eth-tran-types:mef-10-bwp' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type' value='ietf-eth-tran-types:p2p-svc' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status' value='ietf-te-types:tunnel-state-up' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id' value='0' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id' value='1' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type' value='ietf-eth-tran-types:port-classification' />
</set>
<set>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-provider-id" value="`$oof.vpn.access-provider-id`"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-client-id" value="`$oof.vpn.access-client-id`"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-topology-id" value="`$oof.vpn.access-topology-id`"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-node-id" value="`$oof.vpn.access-node-id`"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-ltp-id" value="`$oof.vpn.src-access-ltp-id`"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-node-id" value="`$oof.vpn.access-node-id`"/>
- <parameter name="ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-ltp-id" value="`$oof.vpn.dst-access-ltp-id`"/>
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-ltp-id' value='`$oof.vpn.dst-access-ltp-id`' />
</set>
<switch test="`$prop.sdncRestApi.token_id`">
- <outcome value="">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`"/>
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`"/>
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />
+ <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="patch"/>
- <parameter name="dirPath" value="/opt/onap/sdnc/restconfapi/yang"/>
+ <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 vpn rest api"/>
+ <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 vpn rest api" />
</return>
</outcome>
- <outcome value="success">
- <block atomic="true"/>
+ <outcome value='success'>
+ <block atomic="true"></block>
</outcome>
</execute>
</outcome>
- <outcome value="Other">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`"/>
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`"/>
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <outcome value='Other'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestApiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />
+ <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="patch"/>
- <parameter name="dirPath" value="/opt/onap/sdnc/restconfapi/yang"/>
+ <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"/>
- <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 vpn rest api"/>
+ <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 vpn rest api" />
</return>
</outcome>
- <outcome value="success">
- <block atomic="true"/>
+ <outcome value='success'>
+ <block atomic="true"></block>
</outcome>
</execute>
</outcome>
</switch>
</block>
</for>
- <return status="success">
- <parameter name="ack-final-indicator" value="Y"/>
- <parameter name="error-code" value="200"/>
- <parameter name="error-message" value="`$error-message`"/>
+ <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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-activate.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-activate.xml
new file mode 100644
index 00000000..5d181c93
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-activate.xml
@@ -0,0 +1,470 @@
+<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-activate' mode='sync'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='0'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>
+ <outcome value='Created'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-information.vnf-id + '/vnf-data/'` " />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnfId" >
+ <parameter name="orchestration-status" value="Active" />
+ <parameter name="vnf-type" value="some vnf-type" />
+ </update>
+ <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'>
+ <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'>
+ <switch test="`$rel-index == 0`">
+ <outcome value='true'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="connectivity"
+ key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[0].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.connectivityA" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.vpn-id = $tmp.aai.connectivityA.relationship-list.relationship[0].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.vpn-bindingA" >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='ietf-te_te.tunnels.tunnel[0].source' value='`$tmp.aai.vpn-bindingA.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].destination' value='`$tmp.aai.vpn-bindingA.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].dst-ttp-id' value='`$tmp.aai.vpn-bindingA.dst-access-ltp-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].ietf-otn-tunnel_dst-tpn' value='' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingA.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingA.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingA.access-topology-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].source' value='`$tmp.aai.vpn-bindingA.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].destination' value='`$tmp.aai.vpn-bindingA.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].name' value='tptunnel-22' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].dependency-tunnels.dependency-tunnel[0].name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingA.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingA.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingA.access-topology-id`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-otn-tunnel-service.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-te:te'`" />
+ <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="patch"/>
+ <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" />
+ <!--<parameter name='dirPath' value="/opt/sdnc/restapi/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"/>
+ <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 vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ </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>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.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>
+ </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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-ltp-id' value='`$oof.vpn.dst-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type' value='ietf-eth-tran-types:mef-10-bwp' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type' value='ietf-eth-tran-types:p2p-svc' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status' value='ietf-te-types:tunnel-state-up' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id' value='0' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id' value='1' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />
+ <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="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 vpn 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.vpnName' >
+ <parameter name='vpn-id' value='`$tmp.vpnName`' />
+ <parameter name='vpn-name' value='`$tmp.vpnName`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainA-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainA-uuid`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ <outcome value='false'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="connectivity"
+ key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[1].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.connectivityB" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.vpn-id = $tmp.aai.connectivityB.relationship-list.relationship[0].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.vpn-bindingB" >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='ietf-te_te.tunnels.tunnel[0].source' value='`$tmp.aai.vpn-bindingB.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].destination' value='`$tmp.aai.vpn-bindingB.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].dst-ttp-id' value='`$tmp.aai.vpn-bindingB.dst-access-ltp-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].ietf-otn-tunnel_dst-tpn' value='' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].name' value='`$tmp.aai.vpn-bindingB.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingB.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingB.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingB.access-topology-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].source' value='`$tmp.aai.vpn-bindingB.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].destination' value='`$tmp.aai.vpn-bindingB.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].name' value='tptunnel-22' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].dependency-tunnels.dependency-tunnel[0].name' value='`$tmp.aai.vpn-bindingB.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingB.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingB.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingB.access-topology-id`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-otn-tunnel-service.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-te:te'`" />
+ <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="patch"/>
+ <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" />
+ <!--<parameter name='dirPath' value="/opt/sdnc/restapi/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"/>
+ <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 vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ </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>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.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>
+ </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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-ltp-id' value='`$oof.vpn.dst-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type' value='ietf-eth-tran-types:mef-10-bwp' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type' value='ietf-eth-tran-types:p2p-svc' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status' value='ietf-te-types:tunnel-state-up' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id' value='0' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id' value='1' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />
+ <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="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 vpn 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.vpnName' >
+ <parameter name='vpn-id' value='`$tmp.vpnName`' />
+ <parameter name='vpn-name' value='`$tmp.vpnName`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainA-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainA-uuid`' />
+ <parameter name='operational-status' value='Activated' />
+ </update>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ </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/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml
new file mode 100644
index 00000000..a0c46f57
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-allocate.xml
@@ -0,0 +1,528 @@
+<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-allocate' mode='sync'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vnf-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
+ </set>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>
+ <outcome value='true'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id
+ + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ <for index="idx" start="0" end="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name="`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`" value='`$param-prefix[$param-prefix_length -1]`'/>
+ </set>
+ </block>
+ </for>
+ <set>
+ <parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />
+ </set>
+ <for index="idx" start="0" end="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.vnfName' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.vnf-id"/>
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id' value='`$prop.vnf-id`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$prop.vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` " />
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key='generic-vnf.vnf-id = $prop.vnf-id' >
+ <parameter name="orchestration-status" value="Created" />
+ <parameter name="in-maint" value = "true" />
+ <parameter name="vnf-type" value='`$prop.vnfName`' />
+ <parameter name="vnf-name" value = "`$prop.vnfName`"/>
+ <parameter name="model-invariant-id" value = "`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`"/>
+ <parameter name="model-version-id" value = "`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`"/>
+ <parameter name="model-customization-id" value = "`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`"/>
+ </save>
+ <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.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'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-id`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="generic-vnf.vnf-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.vnf-id`" />
+ <!--key='service-instance.service-instance-id = $service-data.service-information.service-instance-id -->
+ <!--key='service-instance.service-instance-id = $service-data.service-instance-id -->
+ </save>
+ <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_length != 0`'>
+ <outcome value='false'></outcome>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='allotted-resource-id' value="`$tmp.aai.service-instance.allotted-resources[0]`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="allotted-resource"
+ key='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'>
+ <switch test='`$tmp.aai.allotted-resource.logical-links_length != 0`'>
+ <outcome value='false'></outcome>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='logical-link-name' value="`$tmp.aai.allotted-resource.logical-links[0]`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="logical-link"
+ key='logical-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>
+ <set>
+ <parameter name='endpointA' value="`$tmp.aai.logical-link.name`" />
+ </set>
+ <set>
+ <parameter name='endpointB' value="`$tmp.aai.logical-link.name2`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="endpoint"
+ key='endpoint.endpoint-id = $endpointA'
+ local-only="false"
+ force="true" pfx="tmp.aai.endpointA">
+ <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.endpointA.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.endpointA.relationship-list.relationship[$rel-index].related-to`'>
+ <outcome value='p-interface'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="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" >
+ <!--<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.endpointA.p-interface-src`'/>
+ <!--<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="prop.connectivity-domainA-uuid"/>
+ </execute>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainA-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainA-uuid`' />
+ <parameter name='operational-status' value='Created' />
+ <parameter name='access-provider-id' value='' />
+ <parameter name='access-client-id' value='' />
+ <parameter name='access-topology-id' value='' />
+ <parameter name='access-node-id' value='' />
+ <parameter name='access-ltp-id' value='' />
+ <parameter name='cvlan' value='' />
+ <parameter name='bandwidth-profile-name' value='`$prop.sotn.etht-svc-name`' />
+ <parameter name='vpn-type' value='`$prop.sotn.vpnType`' />
+ <parameter name='CIR' value='`$prop.sotn.cir`' />
+ <parameter name='EIR' value='`$prop.sotn.eir`' />
+ <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 = $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'
+ 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-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="`$prop.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>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="endpoint"
+ key='endpoint.endpoint-id = $endpointB'
+ local-only="false"
+ force="true" pfx="tmp.aai.endpointB">
+ <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.endpointB.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.endpointB.relationship-list.relationship[$rel-index].related-to`'>
+ <outcome value='p-interface'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="p-interface.interface-name = $tmp.aai.endpointB.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.endpointB.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.endpointB.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"-->
+ <!-- local-only="false" -->
+ <!-- pfx="tmp.aai.endpointB.p-interface-dst" >-->
+ <outcome value='success'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.endpointB.p-interface-dst`'/>
+ <!--<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='operational-status' value='Created' />
+ <parameter name='access-provider-id' value='' />
+ <parameter name='access-client-id' value='' />
+ <parameter name='access-topology-id' value='' />
+ <parameter name='access-node-id' value='' />
+ <parameter name='access-ltp-id' value='' />
+ <parameter name='cvlan' value='' />
+ <parameter name='bandwidth-profile-name' value='`$prop.sotn.etht-svc-name`' />
+ <parameter name='vpn-type' value='`$prop.sotn.vpnType`' />
+ <parameter name='CIR' value='`$prop.sotn.cir`' />
+ <parameter name='EIR' value='`$prop.sotn.eir`' />
+ <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 = $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'
+ 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>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='prop.connection-attachment.access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='prop.connection-attachment.access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='prop.connection-attachment.access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='prop.connection-attachment.access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='prop.connection-attachment.access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <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>
+ <call module='GENERIC-RESOURCE-API' rpc='sotn-get-otn-tunnel-path-from-oof' mode='sync' ></call>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.vpnName' >
+ <parameter name='vpn-id' value='`$tmp.vpnName`' />
+ <parameter name='vpn-name' value='`$tmp.vpnName`' />
+ <parameter name='access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='src-access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='src-access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <parameter name='dst-access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='dst-access-ltp-id' value='`$oof.vpn.dst-access-ltp-id`' />
+ <parameter name='vpn-type' value='`$prop.global.sotn.vpnType`' />
+ <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`' />
+ <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 = $tmp.vpnName'
+ 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/' + $mdsal-psd.service-data.networks.network[0].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="`$mdsal-psd.service-data.networks.network[0].network-id`" />
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding'
+ key='vpn-binding.vpn-id = $tmp.vpnName' >
+ <parameter name='vpn-id' value='`$tmp.vpnName`' />
+ <parameter name='vpn-name' value='`$tmp.vpnName`' />
+ <parameter name='access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='src-access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='src-access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <parameter name='dst-access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='dst-access-ltp-id' value='`$oof.vpn.dst-access-ltp-id`' />
+ <parameter name='vpn-type' value='`$prop.global.sotn.vpnType`' />
+ <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`' />
+ <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 = $tmp.vpnName'
+ 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/' + $mdsal-psd.service-data.networks.network[0].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="`$mdsal-psd.service-data.networks.network[0].network-id`" />
+ </save>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </get-resource>
+ </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/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-deactivate.xml
new file mode 100644
index 00000000..0a853f13
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-deactivate.xml
@@ -0,0 +1,350 @@
+<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">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='0'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.vidx' value='`$vidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.vidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>
+ <outcome value='Active'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' /-->
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $vnf-topology-operation-input.vnf-information.vnf-id + '/vnf-data/'` " />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnfId" >
+ <parameter name="orchestration-status" value="PendingDelete" />
+ <parameter name="vnf-type" value="some vnf-type" />
+ </update>
+ <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'>
+ <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'>
+ <switch test="`$rel-index == 0`">
+ <outcome value='true'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="connectivity"
+ key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[0].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.connectivityA" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.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>
+ </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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-ltp-id' value='`$oof.vpn.dst-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type' value='ietf-eth-tran-types:mef-10-bwp' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type' value='ietf-eth-tran-types:p2p-svc' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status' value='ietf-te-types:tunnel-state-up' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id' value='0' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id' value='1' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />
+ <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="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 Create vpn 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.vpnName' >
+ <parameter name='vpn-id' value='`$tmp.vpnName`' />
+ <parameter name='vpn-name' value='`$tmp.vpnName`' />
+ <parameter name='operational-status' value='DeActivated' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainA-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainA-uuid`' />
+ <parameter name='operational-status' value='DeActivated' />
+ </update>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ <outcome value='false'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="connectivity"
+ key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[1].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.connectivityB" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.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>
+ </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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-provider-id' value='`$oof.vpn.access-provider-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-client-id' value='`$oof.vpn.access-client-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].access-topology-id' value='`$oof.vpn.access-topology-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-ltp-id' value='`$oof.vpn.src-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-node-id' value='`$oof.vpn.access-node-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-ltp-id' value='`$oof.vpn.dst-access-ltp-id`' />
+ <parameter name='ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type' value='ietf-eth-tran-types:mef-10-bwp' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type' value='ietf-eth-tran-types:p2p-svc' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status' value='ietf-te-types:tunnel-state-up' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id' value='0' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id' value='1' />
+ <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type' value='ietf-eth-tran-types:port-classification' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" />
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-ethernet-service.json'`" />
+ <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="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 Create vpn 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.vpnName' >
+ <parameter name='vpn-id' value='`$tmp.vpnName`' />
+ <parameter name='vpn-name' value='`$tmp.vpnName`' />
+ <parameter name='operational-status' value='DeActivated' />
+ </update>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainA-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainA-uuid`' />
+ <parameter name='operational-status' value='DeActivated' />
+ </update>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ </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/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-delete.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-delete.xml
new file mode 100644
index 00000000..5c047638
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-trans-slice-delete.xml
@@ -0,0 +1,395 @@
+<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.core.slipluginutils.SliPluginUtils' method='requiredParameters' >
+ <parameter name="vnf-topology-operation-input.vnf-information.vnf-id" value="$vnf-topology-operation-input.vnf-information.vnf-id"/>
+ </execute>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test="`$service-data.vnfs.vnf[$nidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.nidx' value='`$nidx`' />
+ <parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$nidx].vnf-data.`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.nidx`">
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`'>
+ <outcome value='PendingDelete'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='prop.vnfidxLen' value='`0`' />
+ </set>
+ <for index='lidx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <block atomic="true">
+ <switch test="`$service-data.vnfs.vnf[$lidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`">
+ <outcome value='false'>
+ <block atomic="true">
+ <set>
+ <parameter name='service-data.vnfs.vnf[$prop.vnfidxLen].vnf-id' value='`$service-data.vnfs.vnf[$lidx].vnf-id`' />
+ <parameter name='service-data.vnfs.vnf[$prop.vnfidxLen].vnf-data.' value='`$service-data.vnfs.vnf[$lidx].vnf-data.`' />
+ </set>
+ <set>
+ <parameter name='prop.vnfidxLen' value='`$prop.vnfidxLen + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <set>
+ <parameter name="service-data.vnfs.vnf_length" value='`$prop.vnfidxLen`'/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$prop.vnfidxLen]." value=""/>
+ </set>
+ <set>
+ <parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='vnf-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vnf-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'` " />
+ </set>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $vnfId" >
+ <parameter name="orchestration-status" value="PendingDelete" />
+ <parameter name="vnf-type" value="some vnf-type" />
+ </delete>
+ <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'>
+ <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'>
+ <switch test="`$rel-index == 0`">
+ <outcome value='true'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="connectivity"
+ key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[0].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.connectivityA" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.vpn-id = $tmp.aai.connectivityA.relationship-list.relationship[0].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.vpn-bindingA" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.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>
+ </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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='ietf-te_te.tunnels.tunnel[0].source' value='`$tmp.aai.vpn-bindingA.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].destination' value='`$tmp.aai.vpn-bindingA.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].dst-ttp-id' value='`$tmp.aai.vpn-bindingA.dst-access-ltp-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].ietf-otn-tunnel_dst-tpn' value='' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingA.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingA.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingA.access-topology-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].source' value='`$tmp.aai.vpn-bindingA.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].destination' value='`$tmp.aai.vpn-bindingA.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].name' value='tptunnel-22' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].dependency-tunnels.dependency-tunnel[0].name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingA.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingA.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingA.access-topology-id`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-otn-tunnel-service.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-te:te'`" />
+ <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="patch"/>
+ <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" />
+ <!--<parameter name='dirPath' value="/opt/sdnc/restapi/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"/>
+ <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 vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $tmp.aai.connectivityA.connectivity-id'></delete>
+ <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='tmp.aai.vpn-bindingA = $tmp.aai.vpn-bindingA'></delete>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value='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>
+ <outcome value='false'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="connectivity"
+ key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[1].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.connectivityB" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vpn-binding"
+ key="vpn-binding.vpn-id = $tmp.aai.connectivityB.relationship-list.relationship[0].relationship-data[0].relationship-value"
+ local-only="false"
+ pfx="tmp.aai.vpn-bindingB" >
+ <outcome value='success'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
+ depth = '1'"
+ pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.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>
+ </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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-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 esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='ietf-te_te.tunnels.tunnel[0].source' value='`$tmp.aai.vpn-bindingB.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].destination' value='`$tmp.aai.vpn-bindingB.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].dst-ttp-id' value='`$tmp.aai.vpn-bindingB.dst-access-ltp-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].ietf-otn-tunnel_dst-tpn' value='' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].name' value='`$tmp.aai.vpn-bindingB.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingB.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingB.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[0].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingB.access-topology-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].source' value='`$tmp.aai.vpn-bindingB.access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].destination' value='`$tmp.aai.vpn-bindingB.dst-access-node-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].name' value='tptunnel-22' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].dependency-tunnels.dependency-tunnel[0].name' value='`$tmp.aai.vpn-bindingB.vpn-name`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.client-id' value='`$tmp.aai.vpn-bindingB.access-client-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.provider-id' value='`$tmp.aai.vpn-bindingB.access-provider-id`' />
+ <parameter name='ietf-te_te.tunnels.tunnel[1].te-topology-identifier.topology-id' value='`$tmp.aai.vpn-bindingB.access-topology-id`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-otn-tunnel-service.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-te:te'`" />
+ <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="patch"/>
+ <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" />
+ <!--<parameter name='dirPath' value="/opt/sdnc/restapi/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"/>
+ <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 vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $tmp.aai.connectivityB.connectivity-id'></delete>
+ <delete plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='tmp.aai.vpn-bindingB = $tmp.aai.vpn-bindingB'></delete>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value='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>
+ </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