summaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml
diff options
context:
space:
mode:
authorHesam Rahimi <hesam.rahimi@huawei.com>2019-04-17 00:02:13 +0000
committerHesam Rahimi <hesam.rahimi@huawei.com>2020-04-20 13:18:00 +0000
commit45d198493727a8907f011a7eb49b2259037f690b (patch)
tree2c467c64535d29b85e13ba695af6df2d647b9aa9 /platform-logic/datachange/src/main/xml
parent14eb036d9e35e7cd26894c041bb2c490f5eaa848 (diff)
Bug fixing in topology discovery as part of CCVPN (Cross-Layer Cross-Domain VPN) use-case.
1. Cross-layer tp-ttp relationship update. 2. Save te-link-attribute and label-restriction and relationship between them. 3. Add 3rd party controller id into network-id to make it unique for cross-domain use case. 4. Calling Base64 converter plugin to convert inter-domain-plug-id Issue-ID: SDNC-899 Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com> Change-Id: I892249f8197ceb0e2d32b35a521fdbb1b833010c Former-commit-id: a3603b522c83ffd8e8cfc0f6451697dc89a5a9a3
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml326
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml481
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml288
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_update-tp-ttp-relationship.xml120
4 files changed, 694 insertions, 521 deletions
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
index 110c9f61..007f3bf5 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
@@ -1,23 +1,21 @@
-<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='DataChange' version='${project.version}'>
- <method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>
+<service-logic xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="DataChange" version="${project.version}">
+ <method rpc="esr-thirdparty-sdnc-discovery" mode="sync">
<block atomic="true">
<switch test="`$prop.sdncRestApi.vendor == 'ZTE'`">
- <outcome value='false'>
+ <outcome value="false">
<switch test="`$data-change-notification-input.aai-event-trigger`">
- <outcome value='Update'>
+ <outcome value="Update">
<block>
<switch test="`$prop.sdncRestApi.type`">
- <outcome value='SOTN'>
+ <outcome value="SOTN">
<block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
- <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
- <parameter name='contextPrefix' value='prop' />
+ <execute 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>
- <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"/>
@@ -25,21 +23,21 @@
<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'>
- <block></block>
+ <outcome value="failure">
+ <block/>
</outcome>
</execute>
<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-network:networks'`" />
- <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-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"/>
@@ -47,32 +45,65 @@
<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'>
+ <outcome value="success">
<block atomic="true">
- <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <for index="nidx" start="0" end="`$topology.networks.network_length`">
<block>
<set>
- <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ <parameter name="network." value="`$topology.networks.network[$nidx].`"/>
</set>
- <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ <call module="DataChange" rpc="update-network-to-aai" mode="sync"/>
</block>
</for>
+ <switch test="`$topology.networks.network_length >= 2`">
+ <outcome value="true">
+ <block atomic="true">
+ <for index="netidx" start="0" end="`$topology.networks.network_length`">
+ <block>
+ <set>
+ <parameter name="network." value=""/>
+ </set>
+ <set>
+ <parameter name="network." value="`$topology.networks.network[$netidx].`"/>
+ </set>
+ <switch test="`$network.te-topology-id`">
+ <outcome value="11">
+ <block>
+ <set>
+ <parameter name="network-otn." value="`$topology.networks.network[$netidx].`"/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value="33">
+ <block>
+ <set>
+ <parameter name="network-eth." value="`$topology.networks.network[$netidx].`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <call module="DataChange" rpc="update-tp-ttp-relationship" mode="sync"/>
+ </block>
+ </outcome>
+ </switch>
</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-network:networks'`" />
- <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-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"/>
@@ -80,56 +111,89 @@
<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'>
+ <outcome value="success">
<block atomic="true">
- <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <for index="nidx" start="0" end="`$topology.networks.network_length`">
<block>
<set>
- <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ <parameter name="network." value="`$topology.networks.network[$nidx].`"/>
</set>
- <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ <call module="DataChange" rpc="update-network-to-aai" mode="sync"/>
</block>
</for>
+ <switch test="`$topology.networks.network_length >= 2`">
+ <outcome value="true">
+ <block atomic="true">
+ <for index="netidx" start="0" end="`$topology.networks.network_length`">
+ <block>
+ <set>
+ <parameter name="network." value=""/>
+ </set>
+ <set>
+ <parameter name="network." value="`$topology.networks.network[$netidx].`"/>
+ </set>
+ <switch test="`$network.te-topology-id`">
+ <outcome value="11">
+ <block>
+ <set>
+ <parameter name="network-otn." value="`$topology.networks.network[$netidx].`"/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value="33">
+ <block>
+ <set>
+ <parameter name="network-eth." value="`$topology.networks.network[$netidx].`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <call module="DataChange" rpc="update-tp-ttp-relationship" mode="sync"/>
+ </block>
+ </outcome>
+ </switch>
</block>
</outcome>
</execute>
</outcome>
</switch>
<set>
- <parameter name='input' value='ietf-subscribed-notifications:establish-subscription.input.' />
- <parameter name="`$input + 'encoding'`" value="encode-json" />
+ <parameter name="input" value="ietf-subscribed-notifications:establish-subscription.input."/>
+ <parameter name="`$input + 'encoding'`" value="encode-json"/>
</set>
- <execute plugin='org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode' method='establishSubscription' >
- <parameter name="subscriberId" value="sotn-controller" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="sseConnectURL" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`" />
- <parameter name="dirPath" value="/opt/sdnc/restconfapi/yang/notification" />
- <parameter name="format" value="json" />
- <parameter name="httpMethod" value="post" />
+ <execute plugin="org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode" method="establishSubscription">
+ <parameter name="subscriberId" value="sotn-controller"/>
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="sseConnectURL" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`"/>
+ <parameter name="dirPath" value="/opt/sdnc/restconfapi/yang/notification"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
<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`" />
- <parameter name="module" value="DataChange" />
- <parameter name="rpc" value="sotn-notification-handler" />
- <parameter name="mode" value="sync" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`"/>
+ <parameter name="module" value="DataChange"/>
+ <parameter name="rpc" value="sotn-notification-handler"/>
+ <parameter name="mode" value="sync"/>
</execute>
</block>
</outcome>
- <outcome value='TAPI'>
+ <outcome value="TAPI">
<block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/tapi/v2/topologies?topology-id-or-name=otn'`"/>
<parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
<parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
@@ -140,21 +204,21 @@
<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 get topology TAPI 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 topology TAPI rest api"/>
</return>
</outcome>
- <outcome value='success'>
+ <outcome value="success">
<block atomic="true">
- <for index='tidx' start='0' end="`$topologies.topology_length`" >
+ <for index="tidx" start="0" end="`$topologies.topology_length`">
<block>
<set>
- <parameter name='topology.' value='`$topologies.topology[$tidx].`' />
+ <parameter name="topology." value="`$topologies.topology[$tidx].`"/>
</set>
- <call module='DataChange' rpc='tapi-update-network-to-aai' mode='sync' ></call>
+ <call module="DataChange" rpc="tapi-update-network-to-aai" mode="sync"/>
</block>
</for>
</block>
@@ -162,9 +226,9 @@
</execute>
</block>
</outcome>
- <outcome value='MSA'>
+ <outcome value="MSA">
<block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/cxf/openroadm/v2/networks/otn-topology'`"/>
<parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
<parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
@@ -175,103 +239,91 @@
<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 get topology MSA 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 topology MSA rest api"/>
</return>
</outcome>
- <outcome value='success'>
+ <outcome value="success">
<block atomic="true">
- <call module='DataChange' rpc='msa-update-network-to-aai' mode='sync' ></call>
+ <call module="DataChange" rpc="msa-update-network-to-aai" mode="sync"/>
</block>
</outcome>
</execute>
</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="`'Unsupported type = ' + $prop.sdncRestApi.type`" />
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`"/>
</return>
</outcome>
</switch>
</block>
</outcome>
- <outcome value='Delete'>
+ <outcome value="Delete">
<block atomic="true">
<switch test="`$prop.sdncRestApi.type`">
- <outcome value='MSA'>
- <block atomic='true'>
+ <outcome value="MSA">
+ <block atomic="true">
<set>
- <parameter name='controllerid' value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url + '_' + $prop.sdncRestApi.thirdpartySdnc.id`" />
+ <parameter name="controllerid" value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url + '_' + $prop.sdncRestApi.thirdpartySdnc.id`"/>
</set>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
-key='SELECT controller_id
-from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
-WHERE controller_id = $controllerid'
-pfx='dbcontrollerid'>
- <outcome value='success'>
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
- resource="SQL"
- key="DELETE FROM TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE WHERE controller_id = $controllerid"></delete>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="SELECT controller_id from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE WHERE controller_id = $controllerid" pfx="dbcontrollerid">
+ <outcome value="success">
+ <delete plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="DELETE FROM TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE WHERE controller_id = $controllerid"/>
</outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Failure in getting controller-id from DB" />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure in getting controller-id from DB"/>
</return>
</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="controller-id could not be found in DB" />
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="controller-id could not be found in DB"/>
</return>
</outcome>
</get-resource>
</block>
</outcome>
- <outcome value='TAPI'>
+ <outcome value="TAPI">
<block>
<set>
- <parameter name='controllerid' value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url + '_' + $prop.sdncRestApi.thirdpartySdnc.id`" />
+ <parameter name="controllerid" value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url + '_' + $prop.sdncRestApi.thirdpartySdnc.id`"/>
</set>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
-key='SELECT controller_id
-from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE
-WHERE controller_id = $controllerid'
-pfx='dbcontrollerid'>
- <outcome value='success'>
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
- resource="SQL"
- key="DELETE FROM TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE WHERE controller_id = $controllerid"></delete>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="SELECT controller_id from TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE WHERE controller_id = $controllerid" pfx="dbcontrollerid">
+ <outcome value="success">
+ <delete plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="DELETE FROM TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE WHERE controller_id = $controllerid"/>
</outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Failure in getting controller-id from DB" />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Failure in getting controller-id from DB"/>
</return>
</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="controller-id could not be found in DB" />
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="controller-id could not be found in DB"/>
</return>
</outcome>
</get-resource>
</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="`'Unsupported type = ' + $prop.sdncRestApi.type`" />
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Unsupported type = ' + $prop.sdncRestApi.type`"/>
</return>
</outcome>
</switch>
@@ -279,8 +331,8 @@ pfx='dbcontrollerid'>
</outcome>
</switch>
</outcome>
- <outcome value='true'>
- <call module='DataChange' rpc='esr-thirdparty-sdnc-of-zte' mode='sync' ></call>
+ <outcome value="true">
+ <call module="DataChange" rpc="esr-thirdparty-sdnc-of-zte" mode="sync"/>
</outcome>
</switch>
</block>
diff --git a/platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml b/platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml
index b867b56a..ab50abd3 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml
@@ -1,202 +1,271 @@
-<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='DataChange' version='${project.version}'>
- <method rpc='update-network-links-to-aai' mode='sync'>
+<service-logic xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="DataChange" version="${project.version}">
+ <method rpc="update-network-links-to-aai" mode="sync">
<block atomic="true">
- <for index='pidx' start='0' end='`$network.link_length`' >
+ <for index="pidx" start="0" end="`$network.link_length`">
<set>
- <parameter name='link.' value='' />
- <parameter name='dst-tpId' value='' />
- <parameter name='unique-dst-node-Id' value='' />
- <parameter name='is-open-ended-link' value='false' />
- <parameter name='is-invalid-open-ended-link' value='false' />
+ <parameter name="link." value=""/>
+ <parameter name="dst-tpId" value=""/>
+ <parameter name="unique-dst-node-Id" value=""/>
+ <parameter name="is-open-ended-link" value="false"/>
+ <parameter name="is-invalid-open-ended-link" value="false"/>
</set>
<set>
- <parameter name='link.' value='`$network.link[$pidx].`' />
- <parameter name='unique-networkId' value='`$tmp.network-id`' />
+ <parameter name="link." value="`$network.link[$pidx].`"/>
+ <parameter name="unique-networkId" value="`$tmp.network-id`"/>
</set>
<set>
- <parameter name='unique-linkId' value="`'networkId-' + $unique-networkId + '-linkId-' + $link.link-id`" />
- <parameter name='src-tpId' value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node + '-ltpId-' + $link.source.source-tp`" />
- <parameter name='unique-src-node-Id' value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node`" />
+ <parameter name="unique-linkId" value="`'networkId-' + $unique-networkId + '-linkId-' + $link.link-id`"/>
+ <parameter name="src-tpId" value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node + '-ltpId-' + $link.source.source-tp`"/>
+ <parameter name="unique-src-node-Id" value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node`"/>
</set>
- <switch test='`$link.destination.dest-node`'>
- <outcome value=''>
+ <switch test="`$link.destination.dest-node`">
+ <outcome value="">
<block>
<set>
- <parameter name='is-open-ended-link' value='true' />
+ <parameter name="is-open-ended-link" value="true"/>
</set>
<set>
- <parameter name='tmp.aai.p-interface' value='' />
- <parameter name='tmp.aai.p-interface.inter-domain-plug-id' value='' />
+ <parameter name="tmp.aai.p-interface" value=""/>
+ <parameter name="tmp.aai.p-interface.inter-domain-plug-id" value=""/>
</set>
- <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 = $src-tpId"
- local-only="false"
- pfx="tmp.aai.p-interface" >
- <outcome value='success'>
- <switch test='`$tmp.aai.p-interface.inter-domain-plug-id`'>
- <outcome value=''>
+ <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 = $src-tpId" local-only="false" pfx="tmp.aai.p-interface">
+ <outcome value="success">
+ <switch test="`$tmp.aai.p-interface.inter-domain-plug-id`">
+ <outcome value="">
<set>
- <parameter name='is-open-ended-link' value='false' />
- <parameter name='is-invalid-open-ended-link' value='true' />
+ <parameter name="is-open-ended-link" value="false"/>
+ <parameter name="is-invalid-open-ended-link" value="true"/>
</set>
</outcome>
- <outcome value='Other'>
+ <outcome value="Other">
<set>
- <parameter name='alt-unique-linkId' value="`$tmp.aai.p-interface.inter-domain-plug-id`" />
- <!--<parameter name='alt-unique-linkId' value="`'networkId-' + $unique-networkId + '-linkId-' + $tmp.aai.p-interface.inter-domain-plug-id`" />-->
+ <parameter name="alt-unique-linkId" value="`$tmp.aai.p-interface.inter-domain-plug-id`"/>
+ <!--
+ <parameter name='alt-unique-linkId' value="`'networkId-' + $unique-networkId + '-linkId-' + $tmp.aai.p-interface.inter-domain-plug-id`" />
+ -->
</set>
</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`" />
+ <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='' />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value=""/>
+ <parameter name="error-message" value=""/>
</return>
</outcome>
</get-resource>
</block>
</outcome>
- <outcome value='Other'>
+ <outcome value="Other">
<set>
- <parameter name='dst-tpId' value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node + '-ltpId-' + $link.destination.dest-tp`" />
- <parameter name='unique-dst-node-Id' value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node`" />
- <parameter name='is-open-ended-link' value='false' />
+ <parameter name="dst-tpId" value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node + '-ltpId-' + $link.destination.dest-tp`"/>
+ <parameter name="unique-dst-node-Id" value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node`"/>
+ <parameter name="is-open-ended-link" value="false"/>
</set>
</outcome>
</switch>
- <switch test='`$is-invalid-open-ended-link`'>
- <outcome value='true'>
- <block></block>
+ <switch test="`$is-invalid-open-ended-link`">
+ <outcome value="true">
+ <block/>
</outcome>
- <outcome value='false'>
- <switch test='`$is-open-ended-link`'>
- <outcome value='true'>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="logical-link"
- key="logical-link.link-name = $alt-unique-linkId"
- local-only="false"
- pfx="tmp.aai.logical-link" >
- <outcome value='success'>
+ <outcome value="false">
+ <switch test="`$is-open-ended-link`">
+ <outcome value="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link" key="logical-link.link-name = $alt-unique-linkId" local-only="false" pfx="tmp.aai.logical-link">
+ <outcome value="success">
<block>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logMerge.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="altUniqueLinkId" />
- <parameter name="field3" value="`$alt-unique-linkId`" />
- <parameter name="field4" value="srcTpId" />
- <parameter name="field5" value="`$src-tpId`" />
- <parameter name="field6" value="relationship-value" />
- <parameter name="field7" value='`$tmp.aai.logical-link.relationship-list.relationship[0].relationship-data[1].relationship-value`' />
+ <parameter name="file" value="/opt/onap/logMerge.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="altUniqueLinkId"/>
+ <parameter name="field3" value="`$alt-unique-linkId`"/>
+ <parameter name="field4" value="srcTpId"/>
+ <parameter name="field5" value="`$src-tpId`"/>
+ <parameter name="field6" value="relationship-value"/>
+ <parameter name="field7" value="`$tmp.aai.logical-link.relationship-list.relationship[0].relationship-data[1].relationship-value`"/>
</record>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
- key='logical-link.link-name = $alt-unique-linkId' force="true" pfx="tmp.AnAI-data">
- <!--<parameter name="relationship-list.relationship[0].related-to" value="p-interface" />-->
- <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-tpId`" />-->
- <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="p-interface.interface-name" />-->
- <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$src-tpId`" />-->
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link:relationship-list" key="logical-link.link-name = $alt-unique-linkId" force="true" pfx="tmp.AnAI-data">
+ <!--
<parameter name="relationship-list.relationship[0].related-to" value="p-interface" />
+ -->
+ <!--
<parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-tpId`" />
+ -->
+ <!--
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="p-interface.interface-name" />
+ -->
+ <!--
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$src-tpId`" />
- <outcome value='success'>
+ -->
+ <parameter name="relationship-list.relationship[0].related-to" value="p-interface"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-tpId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="p-interface.interface-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$src-tpId`"/>
+ <outcome value="success">
<block>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logMergeSuccess.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="altUniqueLinkId" />
- <parameter name="field3" value="`$alt-unique-linkId`" />
- <parameter name="field4" value="srcTpId" />
- <parameter name="field5" value="`$src-tpId`" />
- <parameter name="field6" value="relationship-value" />
- <parameter name="field7" value='`$tmp.aai.logical-link.relationship-list.relationship[0].relationship-data[1].relationship-value`' />
+ <parameter name="file" value="/opt/onap/logMergeSuccess.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="altUniqueLinkId"/>
+ <parameter name="field3" value="`$alt-unique-linkId`"/>
+ <parameter name="field4" value="srcTpId"/>
+ <parameter name="field5" value="`$src-tpId`"/>
+ <parameter name="field6" value="relationship-value"/>
+ <parameter name="field7" value="`$tmp.aai.logical-link.relationship-list.relationship[0].relationship-data[1].relationship-value`"/>
</record>
</block>
</outcome>
- <outcome value='failure'>
+ <outcome value="failure">
<block>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logMergeFailure.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="altUniqueLinkId" />
- <parameter name="field3" value="`$alt-unique-linkId`" />
- <parameter name="field4" value="srcTpId" />
- <parameter name="field5" value="`$src-tpId`" />
- <parameter name="field6" value="relationship-value" />
- <parameter name="field7" value='`$tmp.aai.logical-link.relationship-list.relationship[0].relationship-data[1].relationship-value`' />
+ <parameter name="file" value="/opt/onap/logMergeFailure.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="altUniqueLinkId"/>
+ <parameter name="field3" value="`$alt-unique-linkId`"/>
+ <parameter name="field4" value="srcTpId"/>
+ <parameter name="field5" value="`$src-tpId`"/>
+ <parameter name="field6" value="relationship-value"/>
+ <parameter name="field7" value="`$tmp.aai.logical-link.relationship-list.relationship[0].relationship-data[1].relationship-value`"/>
</record>
</block>
</outcome>
</save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute" key="te-link-attribute.id = $link.te.te-link-attributes.name">
+ <parameter name="id" value="`$link.te.te-link-attributes.name`"/>
+ <parameter name="access-type" value="`$link.te.te-link-attributes.access-type`"/>
+ </save>
+ <switch test="`$link.te.te-link-attributes.label-restriction_length`">
+ <outcome value="">
+ <block/>
+ </outcome>
+ <outcome value="0">
+ <block/>
+ </outcome>
+ <outcome value="Other">
+ <for index="tidx" start="0" end="`$link.te.te-link-attributes.label-restriction_length`">
+ <set>
+ <parameter name="label-restriction." value=""/>
+ <parameter name="unique-lrId" value=""/>
+ </set>
+ <set>
+ <parameter name="label-restriction." value="`$link.te.te-link-attributes.label-restriction[$tidx].`"/>
+ </set>
+ <set>
+ <parameter name="unique-lrId" value="`$alt-unique-linkId + '-lrId-' + $label-restriction.index`"/>
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="label-restriction.id = $unique-lrId">
+ <parameter name="id" value="`$unique-lrId`"/>
+ <parameter name="label-start" value="`$label-restriction.label-start.te-label-tpn`"/>
+ <parameter name="label-end" value="`$label-restriction.label-end.te-label-tpn`"/>
+ <parameter name="range-bitmap" value="`$label-restriction.range-bitmap`"/>
+ <parameter name="label-step" value="`$label-restriction.label-step`"/>
+ <parameter name="inclusive-exclusive" value="`$label-restriction.inclusive-exclusive`"/>
+ <outcome value="success">
+ <block/>
+ </outcome>
+ <outcome value="failure">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="label-restriction.id = $unique-lrId">
+ <parameter name="id" value="`$unique-lrId`"/>
+ <parameter name="label-start" value="`$label-restriction.label-start.te-label-tpn`"/>
+ <parameter name="label-end" value="`$label-restriction.label-end.te-label-tpn`"/>
+ <parameter name="range-bitmap" value="`$label-restriction.range-bitmap`"/>
+ <parameter name="label-step" value="`$label-restriction.label-step`"/>
+ <parameter name="inclusive-exclusive" value="`$label-restriction.inclusive-exclusive`"/>
+ </save>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute:relationship-list" key="te-link-attribute.id = $link.te.te-link-attributes.name" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="logical-link"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/logical-links/logical-link/' + $alt-unique-linkId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="logical-link.link-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$alt-unique-linkId`"/>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute:relationship-list" key="te-link-attribute.id = $link.te.te-link-attributes.name" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="label-restriction"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/label-restrictions/label-restriction/' + $unique-lrId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="label-restriction.id"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$unique-lrId`"/>
+ </save>
+ </for>
+ </outcome>
+ </switch>
</block>
</outcome>
- <outcome value='not-found'>
- <block atomic='true'>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link'
- key='logical-link.link-name = $alt-unique-linkId' >
- <parameter name='link-name' value='`$alt-unique-linkId`' />
- <parameter name='link-id' value='`$link.link-id`' />
- <parameter name='link-type' value='`$link.te.te-link-attributes.access-type`' />
+ <outcome value="not-found">
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link" key="logical-link.link-name = $alt-unique-linkId">
+ <parameter name="link-name" value="`$alt-unique-linkId`"/>
+ <parameter name="link-id" value="`$link.link-id`"/>
+ <parameter name="link-type" value="`$link.te.te-link-attributes.access-type`"/>
</save>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
- key='logical-link.link-name = $alt-unique-linkId' force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="p-interface" />
- <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-tpId`" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="p-interface.interface-name" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$src-tpId`" />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link:relationship-list" key="logical-link.link-name = $alt-unique-linkId" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="p-interface"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-tpId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="p-interface.interface-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$src-tpId`"/>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute" key="te-link-attribute.id = $link.te.te-link-attributes.name">
+ <parameter name="id" value="`$link.te.te-link-attributes.name`"/>
+ <parameter name="access-type" value="`$link.te.te-link-attributes.access-type`"/>
</save>
- <switch test='`$link.te.te-link-attributes.label-restriction`'>
- <outcome value=''>
- <block></block>
+ <switch test="`$link.te.te-link-attributes.label-restriction_length`">
+ <outcome value="">
+ <block/>
</outcome>
- <outcome value='Other'>
- <for index='tidx' start='0' end='`$link.te.te-link-attributes.label-restriction_length`' >
+ <outcome value="0">
+ <block/>
+ </outcome>
+ <outcome value="Other">
+ <for index="tidx" start="0" end="`$link.te.te-link-attributes.label-restriction_length`">
+ <set>
+ <parameter name="label-restriction." value=""/>
+ <parameter name="unique-lrId" value=""/>
+ </set>
+ <set>
+ <parameter name="label-restriction." value="`$link.te.te-link-attributes.label-restriction[$tidx].`"/>
+ </set>
<set>
- <parameter name='label-restriction.' value='`$link.te.te-link-attributes.label-restriction[$tidx].`' />
- <parameter name='unique-lrId' value="`$alt-unique-linkId + '-lrId-' + $label-restriction.index`" />
+ <parameter name="unique-lrId" value="`$alt-unique-linkId + '-lrId-' + $label-restriction.index`"/>
</set>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='label-restriction'
- key='logical-link.link-name = $alt-unique-linkId
- AND label-restriction.id = $unique-lrId' >
- <parameter name='id' value='`$unique-lrId`' />
- <parameter name='label-start' value='`$label-restriction.label-start`' />
- <parameter name='label-end' value='`$label-restriction.label-end`' />
- <parameter name='range-bitmap' value='`$label-restriction.range-bitmap`' />
- <parameter name='label-step' value='`$label-restriction.label-step`' />
- <parameter name='inclusive-exclusive' value='`$label-restriction.inclusive-exclusive`' />
- <outcome value='success'>
- <block></block>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="label-restriction.id = $unique-lrId">
+ <parameter name="id" value="`$unique-lrId`"/>
+ <parameter name="label-start" value="`$label-restriction.label-start.te-label-tpn`"/>
+ <parameter name="label-end" value="`$label-restriction.label-end.te-label-tpn`"/>
+ <parameter name="range-bitmap" value="`$label-restriction.range-bitmap`"/>
+ <parameter name="label-step" value="`$label-restriction.label-step`"/>
+ <parameter name="inclusive-exclusive" value="`$label-restriction.inclusive-exclusive`"/>
+ <outcome value="success">
+ <block/>
</outcome>
- <outcome value='failure'>
- <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='label-restriction'
- key='logical-link.link-name = $alt-unique-linkId
- AND label-restriction.id = $unique-lrId' >
- <parameter name='id' value='`$unique-lrId`' />
- <parameter name='label-start' value='`$label-restriction.label-start`' />
- <parameter name='label-end' value='`$label-restriction.label-end`' />
- <parameter name='range-bitmap' value='`$label-restriction.range-bitmap`' />
- <parameter name='label-step' value='`$label-restriction.label-step`' />
- <parameter name='inclusive-exclusive' value='`$label-restriction.inclusive-exclusive`' />
- </update>
+ <outcome value="failure">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="logical-link.link-name = $alt-unique-linkId AND label-restriction.id = $unique-lrId">
+ <parameter name="id" value="`$unique-lrId`"/>
+ <parameter name="label-start" value="`$label-restriction.label-start`"/>
+ <parameter name="label-end" value="`$label-restriction.label-end`"/>
+ <parameter name="range-bitmap" value="`$label-restriction.range-bitmap`"/>
+ <parameter name="label-step" value="`$label-restriction.label-step`"/>
+ <parameter name="inclusive-exclusive" value="`$label-restriction.inclusive-exclusive`"/>
+ </save>
</outcome>
</save>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
- key='logical-link.link-name = $alt-unique-linkId' force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[$tidx].related-to" value="label-restriction" />
- <parameter name="relationship-list.relationship[$tidx].related-link" value="`'/network/label-restrictions/label-restriction/' + $unique-lrId`" />
- <parameter name="relationship-list.relationship[$tidx].relationship-data[0].relationship-key" value="label-restriction.id" />
- <parameter name="relationship-list.relationship[$tidx].relationship-data[0].relationship-value" value="`$unique-lrId`" />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute:relationship-list" key="te-link-attribute.id = $link.te.te-link-attributes.name" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="logical-link"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/logical-links/logical-link/' + $alt-unique-linkId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="logical-link.link-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$alt-unique-linkId`"/>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute:relationship-list" key="te-link-attribute.id = $link.te.te-link-attributes.name" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="label-restriction"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/label-restrictions/label-restriction/' + $unique-lrId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="label-restriction.id"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$unique-lrId`"/>
</save>
</for>
</outcome>
@@ -205,77 +274,89 @@
</outcome>
</get-resource>
</outcome>
- <outcome value='false'>
- <block atomic='true'>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link'
- key='logical-link.link-name = $unique-linkId' >
- <parameter name='link-name' value='`$unique-linkId`' />
- <parameter name='link-id' value='`$link.link-id`' />
- <parameter name='link-type' value='`$link.te.te-link-attributes.access-type`' />
+ <outcome value="false">
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link" key="logical-link.link-name = $unique-linkId">
+ <parameter name="link-name" value="`$unique-linkId`"/>
+ <parameter name="link-id" value="`$link.link-id`"/>
+ <parameter name="link-type" value="`$link.te.te-link-attributes.access-type`"/>
</save>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="uniqueLinkId" />
- <parameter name="field3" value="`$unique-linkId`" />
- <parameter name="field4" value="srcTpId" />
- <parameter name="field5" value="`$src-tpId`" />
- <parameter name="field6" value="dstTpId" />
- <parameter name="field7" value="`$dst-tpId`" />
+ <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="uniqueLinkId"/>
+ <parameter name="field3" value="`$unique-linkId`"/>
+ <parameter name="field4" value="srcTpId"/>
+ <parameter name="field5" value="`$src-tpId`"/>
+ <parameter name="field6" value="dstTpId"/>
+ <parameter name="field7" value="`$dst-tpId`"/>
</record>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
- key='logical-link.link-name = $unique-linkId' force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="p-interface" />
- <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-tpId`" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="p-interface.interface-name" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$src-tpId`" />
- <parameter name="relationship-list.relationship[1].related-to" value="p-interface" />
- <parameter name="relationship-list.relationship[1].related-link" value="`'/network/pnfs/pnf/' + $unique-dst-node-Id + '/p-interfaces/p-interface/' + $dst-tpId`" />
- <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="p-interface.interface-name" />
- <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$dst-tpId`" />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link:relationship-list" key="logical-link.link-name = $unique-linkId" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="p-interface"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-tpId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="p-interface.interface-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$src-tpId`"/>
+ <parameter name="relationship-list.relationship[1].related-to" value="p-interface"/>
+ <parameter name="relationship-list.relationship[1].related-link" value="`'/network/pnfs/pnf/' + $unique-dst-node-Id + '/p-interfaces/p-interface/' + $dst-tpId`"/>
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="p-interface.interface-name"/>
+ <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$dst-tpId`"/>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute" key="te-link-attribute.id = $link.te.te-link-attributes.name">
+ <parameter name="id" value="`$link.te.te-link-attributes.name`"/>
+ <parameter name="access-type" value="`$link.te.te-link-attributes.access-type`"/>
</save>
- <switch test='`$link.te.te-link-attributes.label-restriction`'>
- <outcome value=''>
- <block></block>
+ <switch test="`$link.te.te-link-attributes.label-restriction_length`">
+ <outcome value="">
+ <block/>
</outcome>
- <outcome value='Other'>
- <for index='tidx' start='0' end='`$link.te.te-link-attributes.label-restriction_length`' >
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
- key='logical-link.link-name = $unique-linkId' force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[$tidx].related-to" value="label-restriction" />
- <parameter name="relationship-list.relationship[$tidx].related-link" value="`'/network/label-restrictions/label-restriction/' + $unique-lrId`" />
- <parameter name="relationship-list.relationship[$tidx].relationship-data[0].relationship-key" value="label-restriction.id" />
- <parameter name="relationship-list.relationship[$tidx].relationship-data[0].relationship-value" value="`$unique-lrId`" />
- </save>
+ <outcome value="0">
+ <block/>
+ </outcome>
+ <outcome value="Other">
+ <for index="tidx" start="0" end="`$link.te.te-link-attributes.label-restriction_length`">
<set>
- <parameter name='label-restriction.' value='`$link.te.te-link-attributes.label-restriction[$tidx].`' />
- <parameter name='unique-lrId' value="`$unique-linkId + '-lrId-' + $label-restriction.index`" />
+ <parameter name="label-restriction." value=""/>
+ <parameter name="unique-lrId" value=""/>
</set>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='label-restriction'
- key='logical-link.link-name = $unique-linkId
- AND label-restriction.id = $unique-lrId' >
- <parameter name='id' value='`$unique-lrId`' />
- <parameter name='label-start' value='`$label-restriction.label-start`' />
- <parameter name='label-end' value='`$label-restriction.label-end`' />
- <parameter name='range-bitmap' value='`$label-restriction.range-bitmap`' />
- <parameter name='label-step' value='`$label-restriction.label-step`' />
- <parameter name='inclusive-exclusive' value='`$label-restriction.inclusive-exclusive`' />
- <outcome value='success'>
- <block></block>
+ <set>
+ <parameter name="label-restriction." value="`$link.te.te-link-attributes.label-restriction[$tidx].`"/>
+ </set>
+ <set>
+ <parameter name="unique-lrId" value="`$unique-linkId + '-lrId-' + $label-restriction.index`"/>
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="label-restriction.id = $unique-lrId">
+ <parameter name="id" value="`$unique-lrId`"/>
+ <parameter name="label-start" value="`$label-restriction.label-start.te-label-tpn`"/>
+ <parameter name="label-end" value="`$label-restriction.label-end.te-label-tpn`"/>
+ <parameter name="range-bitmap" value="`$label-restriction.range-bitmap`"/>
+ <parameter name="label-step" value="`$label-restriction.label-step`"/>
+ <parameter name="inclusive-exclusive" value="`$label-restriction.inclusive-exclusive`"/>
+ <outcome value="success">
+ <block/>
</outcome>
- <outcome value='failure'>
- <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='label-restriction'
- key='logical-link.link-name = $unique-linkId
- AND label-restriction.id = $unique-lrId' >
- <parameter name='id' value='`$unique-lrId`' />
- <parameter name='label-start' value='`$label-restriction.label-start`' />
- <parameter name='label-end' value='`$label-restriction.label-end`' />
- <parameter name='range-bitmap' value='`$label-restriction.range-bitmap`' />
- <parameter name='label-step' value='`$label-restriction.label-step`' />
- <parameter name='inclusive-exclusive' value='`$label-restriction.inclusive-exclusive`' />
- </update>
+ <outcome value="failure">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="logical-link.link-name = $unique-linkId AND label-restriction.id = $unique-lrId">
+ <parameter name="id" value="`$unique-lrId`"/>
+ <parameter name="label-start" value="`$label-restriction.label-start`"/>
+ <parameter name="label-end" value="`$label-restriction.label-end`"/>
+ <parameter name="range-bitmap" value="`$label-restriction.range-bitmap`"/>
+ <parameter name="label-step" value="`$label-restriction.label-step`"/>
+ <parameter name="inclusive-exclusive" value="`$label-restriction.inclusive-exclusive`"/>
+ </save>
</outcome>
</save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute:relationship-list" key="te-link-attribute.id = $link.te.te-link-attributes.name" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="logical-link"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/logical-links/logical-link/' + $unique-linkId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="logical-link.link-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$unique-linkId`"/>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="te-link-attribute:relationship-list" key="te-link-attribute.id = $link.te.te-link-attributes.name" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="label-restriction"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/label-restrictions/label-restriction/' + $unique-lrId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="label-restriction.id"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$unique-lrId`"/>
+ </save>
</for>
</outcome>
</switch>
diff --git a/platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml b/platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml
index f9b7d997..839e15de 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml
@@ -1,115 +1,113 @@
-<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='DataChange' version='${project.version}'>
- <method rpc='update-network-to-aai' mode='sync'>
+<service-logic xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="DataChange" version="${project.version}">
+ <method rpc="update-network-to-aai" mode="sync">
<block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="replace">
<parameter name="source" value="`$network.network-id`"/>
- <parameter name="outputPath" value="tmp.network-id"/>
+ <parameter name="outputPath" value="tmp.original-network-id"/>
<parameter name="target" value="/"/>
<parameter name="replacement" value="-"/>
</execute>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='network-resource'
- key='network-resource.network-id = $tmp.network-id' >
- <parameter name='network-id' value='`$tmp.network-id`' />
- <parameter name='client-id' value='`$network.client-id`' />
- <parameter name='te-topo-id' value='`$network.te-topology-id`' />
- <parameter name='provider-id' value='`$network.provider-id`' />
- <parameter name='network-type' value='`$network.network-types`' />
+ <set>
+ <parameter name="tmp.network-id" value="`$prop.sdncRestApi.thirdpartySdnc.id + '-' + $tmp.original-network-id`"/>
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-resource" key="network-resource.network-id = $tmp.network-id">
+ <parameter name="network-id" value="`$tmp.network-id`"/>
+ <parameter name="client-id" value="`$network.client-id`"/>
+ <parameter name="te-topo-id" value="`$network.te-topology-id`"/>
+ <parameter name="provider-id" value="`$network.provider-id`"/>
+ <parameter name="network-type" value="`$network.network-types`"/>
</save>
- <for index='pidx' start='0' end='`$network.node_length`' >
+ <for index="pidx" start="0" end="`$network.node_length`">
<set>
- <parameter name='node.' value='' />
+ <parameter name="node." value=""/>
</set>
<set>
- <parameter name='node.' value='`$network.node[$pidx].`' />
- <parameter name='unique-networkId' value='`$tmp.network-id`' />
+ <parameter name="node." value="`$network.node[$pidx].`"/>
+ <parameter name="unique-networkId" value="`$tmp.network-id`"/>
</set>
<set>
- <parameter name='unique-nodeId' value="`'networkId-' + $unique-networkId + '-nodeId-' + $node.node-id`" />
+ <parameter name="unique-nodeId" value="`'networkId-' + $unique-networkId + '-nodeId-' + $node.node-id`"/>
</set>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'
- key='pnf.pnf-name = $unique-nodeId' >
- <parameter name='pnf-name' value='`$unique-nodeId`' />
- <parameter name='pnf-id' value='`$node.node-id`' />
- <parameter name='operational-status' value='`$node.te.oper-status`' />
- <parameter name='admin-status' value='`$node.te.te-node-attributes.admin-status`' />
- <parameter name='in-maint' value='true' />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $unique-nodeId">
+ <parameter name="pnf-name" value="`$unique-nodeId`"/>
+ <parameter name="pnf-id" value="`$node.node-id`"/>
+ <parameter name="operational-status" value="`$node.te.oper-status`"/>
+ <parameter name="admin-status" value="`$node.te.te-node-attributes.admin-status`"/>
+ <parameter name="in-maint" value="true"/>
</save>
- <switch test='`$node.te.tunnel-termination-point_length`'>
- <outcome value=''>
- <block></block>
+ <switch test="`$node.te.tunnel-termination-point_length`">
+ <outcome value="">
+ <block/>
</outcome>
- <outcome value='0'>
- <block></block>
+ <outcome value="0">
+ <block/>
</outcome>
- <outcome value='Other'>
- <for index='ttidx' start='0' end='`$node.te.tunnel-termination-point_length`' >
+ <outcome value="Other">
+ <for index="ttidx" start="0" end="`$node.te.tunnel-termination-point_length`">
<set>
- <parameter name='ttp.' value='' />
+ <parameter name="ttp." value=""/>
</set>
<set>
- <parameter name='ttp.' value='`$node.te.tunnel-termination-point[$ttidx].`' />
+ <parameter name="ttp." value="`$node.te.tunnel-termination-point[$ttidx].`"/>
</set>
<set>
- <parameter name='unique-ttpId' value="`$unique-nodeId + '-ttpId-' + $ttp.tunnel-tp-id`" />
+ <parameter name="unique-ttpId" value="`$unique-nodeId + '-ttpId-' + $ttp.tunnel-tp-id`"/>
</set>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='tunnel-termination-point'
- key='tunnel-termination-point.ttp-id = $unique-ttpId' >
- <parameter name='ttp-id' value='`$unique-ttpId`' />
- <parameter name='tunnel-tp-id' value='`$ttp.tunnel-tp-id`' />
- <parameter name='name' value='`$ttp.name`' />
- <parameter name='admin-status' value='`$ttp.admin-status`' />
- <parameter name='oper-status' value='`$ttp.oper-status`' />
- <parameter name='inter-layer-lock-id' value='`$ttp.inter-layer-lock-id`' />
- <parameter name='switching-capability' value='`$ttp.switching-capability`' />
- <parameter name='protection-type' value='`$ttp.protection-type`' />
- <parameter name='encoding' value='`$ttp.encoding`' />
- <outcome value='success'>
- <block></block>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="tunnel-termination-point" key="tunnel-termination-point.ttp-id = $unique-ttpId">
+ <parameter name="ttp-id" value="`$unique-ttpId`"/>
+ <parameter name="tunnel-tp-id" value="`$ttp.tunnel-tp-id`"/>
+ <parameter name="name" value="`$ttp.name`"/>
+ <parameter name="admin-status" value="`$ttp.admin-status`"/>
+ <parameter name="oper-status" value="`$ttp.oper-status`"/>
+ <parameter name="inter-layer-lock-id" value="`$ttp.inter-layer-lock-id`"/>
+ <parameter name="switching-capability" value="`$ttp.switching-capability`"/>
+ <parameter name="protection-type" value="`$ttp.protection-type`"/>
+ <parameter name="encoding" value="`$ttp.encoding`"/>
+ <outcome value="success">
+ <block/>
</outcome>
- <outcome value='failure'>
- <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='tunnel-termination-point'
- key='tunnel-termination-point.ttp-id = $unique-ttpId' >
- <parameter name='ttp-id' value='`$unique-ttpId`' />
- <parameter name='tunnel-tp-id' value='`$ttp.tunnel-tp-id`' />
- <parameter name='name' value='`$ttp.name`' />
- <parameter name='admin-status' value='`$ttp.admin-status`' />
- <parameter name='oper-status' value='`$ttp.oper-status`' />
- <parameter name='inter-layer-lock-id' value='`$ttp.inter-layer-lock-id`' />
- <parameter name='switching-capability' value='`$ttp.switching-capability`' />
- <parameter name='protection-type' value='`$ttp.protection-type`' />
- <parameter name='encoding' value='`$ttp.encoding`' />
+ <outcome value="failure">
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="tunnel-termination-point" key="tunnel-termination-point.ttp-id = $unique-ttpId">
+ <parameter name="ttp-id" value="`$unique-ttpId`"/>
+ <parameter name="tunnel-tp-id" value="`$ttp.tunnel-tp-id`"/>
+ <parameter name="name" value="`$ttp.name`"/>
+ <parameter name="admin-status" value="`$ttp.admin-status`"/>
+ <parameter name="oper-status" value="`$ttp.oper-status`"/>
+ <parameter name="inter-layer-lock-id" value="`$ttp.inter-layer-lock-id`"/>
+ <parameter name="switching-capability" value="`$ttp.switching-capability`"/>
+ <parameter name="protection-type" value="`$ttp.protection-type`"/>
+ <parameter name="encoding" value="`$ttp.encoding`"/>
</update>
</outcome>
</save>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list'
- key='pnf.pnf-name = $unique-nodeId' force="true" pfx="tmp.AnAI-data">
- <parameter name="`relationship-list.relationship[$ttidx].related-to`" value="tunnel-termination-point" />
- <!--<parameter name="relationship-list.relationship[$ttidx].related-link" value="`'/network/network-resources/network-resource/' + $tmp.network-id + '/pnfs/pnf/' + $node.node-id '/tunnel-termination-points/tunnel-termination-point/' + $unique-ttpId`" />-->
- <parameter name="`relationship-list.relationship[$ttidx].related-link`" value="`'/network/tunnel-termination-points/tunnel-termination-point/' + $unique-ttpId`" />
- <parameter name="`relationship-list.relationship[$ttidx].relationship-data[0].relationship-key`" value="tunnel-termination-point.ttp-id" />
- <parameter name="`relationship-list.relationship[$ttidx].relationship-data[0].relationship-value`" value="`$unique-ttpId`" />
- <outcome value='success'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf:relationship-list" key="pnf.pnf-name = $unique-nodeId" force="true" pfx="tmp.AnAI-data">
+ <parameter name="`relationship-list.relationship[$ttidx].related-to`" value="tunnel-termination-point"/>
+ <!--
+ <parameter name="relationship-list.relationship[$ttidx].related-link" value="`'/network/network-resources/network-resource/' + $tmp.network-id + '/pnfs/pnf/' + $node.node-id '/tunnel-termination-points/tunnel-termination-point/' + $unique-ttpId`" />
+ -->
+ <parameter name="`relationship-list.relationship[$ttidx].related-link`" value="`'/network/tunnel-termination-points/tunnel-termination-point/' + $unique-ttpId`"/>
+ <parameter name="`relationship-list.relationship[$ttidx].relationship-data[0].relationship-key`" value="tunnel-termination-point.ttp-id"/>
+ <parameter name="`relationship-list.relationship[$ttidx].relationship-data[0].relationship-value`" value="`$unique-ttpId`"/>
+ <outcome value="success">
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="sucess executing Hesam log file" />
- <parameter name="field3" value="`$node.te.tunnel-termination-point_length`" />
- <parameter name="field4" value="`$node.termination-point_length`" />
- <parameter name="field5" value="sucessfully saved ttp" />
- <parameter name="field6" value="`relationship-list.relationship[$ttidx].related-link`" />
+ <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="sucess executing Hesam log file"/>
+ <parameter name="field3" value="`$node.te.tunnel-termination-point_length`"/>
+ <parameter name="field4" value="`$node.termination-point_length`"/>
+ <parameter name="field5" value="sucessfully saved ttp"/>
+ <parameter name="field6" value="`relationship-list.relationship[$ttidx].related-link`"/>
</record>
</outcome>
- <outcome value='failure'>
+ <outcome value="failure">
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="sucess executing Hesam log file" />
- <parameter name="field3" value="`$node.te.tunnel-termination-point_length`" />
- <parameter name="field4" value="`$node.termination-point_length`" />
- <parameter name="field5" value="failuire on saving ttp" />
- <parameter name="field6" value="`relationship-list.relationship[$ttidx].related-link`" />
+ <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="sucess executing Hesam log file"/>
+ <parameter name="field3" value="`$node.te.tunnel-termination-point_length`"/>
+ <parameter name="field4" value="`$node.termination-point_length`"/>
+ <parameter name="field5" value="failuire on saving ttp"/>
+ <parameter name="field6" value="`relationship-list.relationship[$ttidx].related-link`"/>
</record>
</outcome>
</save>
@@ -117,71 +115,91 @@
</outcome>
</switch>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="sucess executing Hesam log file" />
- <parameter name="field3" value="`$node.te.tunnel-termination-point_length`" />
- <parameter name="field4" value="`$node.termination-point_length`" />
+ <parameter name="file" value="/opt/onap/logTopologyDiscovery.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="sucess executing Hesam log file"/>
+ <parameter name="field3" value="`$node.te.tunnel-termination-point_length`"/>
+ <parameter name="field4" value="`$node.termination-point_length`"/>
</record>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list'
- key='pnf.pnf-name = $unique-nodeId' force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="network-resource" />
- <parameter name="relationship-list.relationship[0].related-link" value="`'/network/network-resources/network-resource/' + $tmp.network-id`" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-resource.network-id" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.network-id`" />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf:relationship-list" key="pnf.pnf-name = $unique-nodeId" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="network-resource"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/network-resources/network-resource/' + $tmp.network-id`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-resource.network-id"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.network-id`"/>
</save>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list'
- key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id'
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="pnf" />
- <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $node.node-id`" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="pnf.pnf-name" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$node.node-id`" />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc:relationship-list" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="pnf"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/pnfs/pnf/' + $node.node-id`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="pnf.pnf-name"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$node.node-id`"/>
</save>
- <switch test='`$node.termination-point_length`'>
- <outcome value=''>
- <block></block>
+ <switch test="`$node.termination-point_length`">
+ <outcome value="">
+ <block/>
</outcome>
- <outcome value='0'>
- <block></block>
+ <outcome value="0">
+ <block/>
</outcome>
- <outcome value='Other'>
- <for index='tidx' start='0' end='`$node.termination-point_length`' >
+ <outcome value="Other">
+ <for index="tidx" start="0" end="`$node.termination-point_length`">
<set>
- <parameter name='tp.' value='' />
+ <parameter name="tp." value=""/>
</set>
<set>
- <parameter name='tp.' value='`$node.termination-point[$tidx].`' />
+ <parameter name="tp." value="`$node.termination-point[$tidx].`"/>
</set>
<set>
- <parameter name='unique-ltpId' value="`$unique-nodeId + '-ltpId-' + $tp.te-tp-id`" />
+ <parameter name="unique-ltpId" value="`$unique-nodeId + '-ltpId-' + $tp.te-tp-id`"/>
</set>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
- key='pnf.pnf-name = $unique-nodeId
- AND p-interface.interface-name = $unique-ltpId' >
- <parameter name='interface-name' value='`$unique-ltpId`' />
- <parameter name='network-ref' value='`$tp.supporting-termination-point[0].network-ref`' />
- <parameter name='transparent' value='`$tp.svc.supported-classification.transparent`' />
- <parameter name='speed-value' value='`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`' />
- <parameter name='operational-status' value='`$tp.te.oper-status`' />
- <parameter name='in-maint' value="true" />
- <parameter name='inter-layer-lock-id' value='`$tp.te.inter-layer-lock-id[0]`' />
+ <switch test="`length($tp.te.inter-domain-plug-id) == 0`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.decoded-plug-id" value=""/>
+ </set>
+ </outcome>
+ <outcome value="false">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="base64DecodingAlgo">
+ <parameter name="encodedValue" value="`$tp.te.inter-domain-plug-id`"/>
+ <parameter name="decodedValue" value="tmp.decoded-plug-id"/>
+ <outcome value="success">
+ <block/>
+ </outcome>
+ <outcome value="failure">
+ <set>
+ <parameter name="tmp.decoded-plug-id" value="`$tp.te.inter-domain-plug-id`"/>
+ </set>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $unique-nodeId AND p-interface.interface-name = $unique-ltpId">
+ <parameter name="interface-name" value="`$unique-ltpId`"/>
+ <parameter name="network-ref" value="`$tp.supporting-termination-point[0].network-ref`"/>
+ <parameter name="transparent" value="`$tp.svc.supported-classification.transparent`"/>
+ <parameter name="speed-value" value="`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`"/>
+ <parameter name="operational-status" value="`$tp.te.oper-status`"/>
+ <parameter name="in-maint" value="true"/>
+ <parameter name="inter-layer-lock-id" value="`$tp.te.inter-layer-lock-id[0]`"/>
+ <!--
<parameter name='inter-domain-plug-id' value='`$tp.te.inter-domain-plug-id`' />
- <outcome value='success'>
- <block></block>
+ -->
+ <parameter name="inter-domain-plug-id" value="`$tmp.decoded-plug-id`"/>
+ <outcome value="success">
+ <block/>
</outcome>
- <outcome value='failure'>
- <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
- key='pnf.pnf-name = $unique-nodeId
- AND p-interface.interface-name = $unique-ltpId' >
- <parameter name='interface-name' value='`$unique-ltpId`' />
- <parameter name='network-ref' value='`$tp.supporting-termination-point[0].network-ref`' />
- <parameter name='transparent' value='`$tp.svc.supported-classification.transparent`' />
- <parameter name='speed-value' value='`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`' />
- <parameter name='operational-status' value='`$tp.te.oper-status`' />
- <parameter name='in-maint' value="true" />
- <parameter name='inter-layer-lock-id' value='`$tp.te.inter-layer-lock-id[0]`' />
+ <outcome value="failure">
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $unique-nodeId AND p-interface.interface-name = $unique-ltpId">
+ <parameter name="interface-name" value="`$unique-ltpId`"/>
+ <parameter name="network-ref" value="`$tp.supporting-termination-point[0].network-ref`"/>
+ <parameter name="transparent" value="`$tp.svc.supported-classification.transparent`"/>
+ <parameter name="speed-value" value="`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`"/>
+ <parameter name="operational-status" value="`$tp.te.oper-status`"/>
+ <parameter name="in-maint" value="true"/>
+ <parameter name="inter-layer-lock-id" value="`$tp.te.inter-layer-lock-id[0]`"/>
+ <!--
<parameter name='inter-domain-plug-id' value='`$tp.te.inter-domain-plug-id`' />
+ -->
+ <parameter name="inter-domain-plug-id" value="`$tmp.decoded-plug-id`"/>
</update>
</outcome>
</save>
@@ -189,7 +207,7 @@
</outcome>
</switch>
</for>
- <call module='DataChange' rpc='update-network-links-to-aai' mode='sync' ></call>
+ <call module="DataChange" rpc="update-network-links-to-aai" mode="sync"/>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_update-tp-ttp-relationship.xml b/platform-logic/datachange/src/main/xml/DataChange_update-tp-ttp-relationship.xml
index f009a801..b9dbae7a 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_update-tp-ttp-relationship.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_update-tp-ttp-relationship.xml
@@ -1,76 +1,98 @@
-<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='DataChange' version='${project.version}'>
- <method rpc='update-tp-ttp-relationship' mode='sync'>
+<service-logic xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="DataChange" version="${project.version}">
+ <method rpc="update-tp-ttp-relationship" mode="sync">
<block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="replace">
<parameter name="source" value="`$network-eth.network-id`"/>
<parameter name="outputPath" value="tmp.network-eth.network-id"/>
<parameter name="target" value="/"/>
<parameter name="replacement" value="-"/>
</execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="replace">
<parameter name="source" value="`$network-otn.network-id`"/>
<parameter name="outputPath" value="tmp.network-otn.network-id"/>
<parameter name="target" value="/"/>
<parameter name="replacement" value="-"/>
</execute>
- <for index='pethidx' start='0' end='`$network-eth.node_length`' >
+ <for index="pethidx" start="0" end="`$network-eth.node_length`">
<set>
- <parameter name='node-eth.' value='`$network-eth.node[$pethidx].`' />
+ <parameter name="node-eth." value="`$network-eth.node[$pethidx].`"/>
</set>
<set>
- <parameter name='unique-network-ethId' value='`$tmp.network-eth.network-id`' />
- <parameter name='unique-node-ethId' value="`'networkId-' + $unique-network-ethId + '-nodeId-' + $node-eth.node-id`" />
+ <parameter name="unique-network-ethId" value="`$tmp.network-eth.network-id`"/>
+ <parameter name="unique-node-ethId" value="`'networkId-' + $unique-network-ethId + '-nodeId-' + $node-eth.node-id`"/>
</set>
- <for index='tidx' start='0' end='`$node-eth.termination-point_length`' >
- <set>
- <parameter name='tp-eth.' value='' />
- </set>
- <set>
- <parameter name='tp-eth.' value='`$node-eth.termination-point[$tidx].`' />
- </set>
- <set>
- <parameter name='unique-ltpethId' value="`$unique-node-ethId + '-ltpId-' + $tp-eth.te-tp-id`" />
- </set>
- <set>
- <parameter name='tp-inter-layer-lock-id' value='`$node-eth.termination-point[$tidx].te.inter-layer-lock-id[0]`' />
- </set>
- <for index='potnidx' start='0' end='`$network-otn.node_length`' >
- <set>
- <parameter name='node-otn.' value='`$network-otn.node[$potnidx].`' />
- </set>
- <set>
- <parameter name='unique-network-otnId' value='`$tmp.network-otn.network-id`' />
- <parameter name='unique-node-otnId' value="`'networkId-' + $unique-network-otnId + '-nodeId-' + $node-otn.node-id`" />
- </set>
- <for index='ttidx' start='0' end='`$node.te.tunnel-termination-point_length`' >
+ <switch test="`$node-eth.termination-point_length`">
+ <outcome value="">
+ <block/>
+ </outcome>
+ <outcome value="0">
+ <block/>
+ </outcome>
+ <outcome value="Other">
+ <for index="tidx" start="0" end="`$node-eth.termination-point_length`">
<set>
- <parameter name='ttp.' value='' />
+ <parameter name="tp-eth." value=""/>
</set>
<set>
- <parameter name='ttp.' value='`$node-otn.te.tunnel-termination-point[$ttidx].`' />
+ <parameter name="tp-eth." value="`$node-eth.termination-point[$tidx].`"/>
</set>
<set>
- <parameter name='unique-ttpId' value="`$unique-node-otnId + '-ttpId-' + $ttp.tunnel-tp-id`" />
+ <parameter name="unique-ltpethId" value="`$unique-node-ethId + '-ltpId-' + $tp-eth.te-tp-id`"/>
</set>
<set>
- <parameter name='ttp-inter-layer-lock-id' value='`$node-otn.te.tunnel-termination-point[$ttidx].inter-layer-lock-id`' />
+ <parameter name="tp-inter-layer-lock-id" value="`$node-eth.termination-point[$tidx].te.inter-layer-lock-id[0]`"/>
</set>
- <switch test='tp-inter-layer-lock-id'>
- <outcome value='ttp-inter-layer-lock-id'>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface:relationship-list'
- key='p-interface.interface-name = $unique-ltpethId' force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[1].related-to" value="tunnel-termination-point" />
- <parameter name="relationship-list.relationship[1].related-link" value="/network/tunnel-termination-points/tunnel-termination-point/ + `$unique-ttpId`" />
- <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="tunnel-termination-point.tunnel-tp-id" />
- <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$unique-ttpId`" />
- </save>
- </outcome>
- </switch>
+ <for index="potnidx" start="0" end="`$network-otn.node_length`">
+ <set>
+ <parameter name="node-otn." value=""/>
+ <parameter name="unique-network-otnId" value=""/>
+ <parameter name="unique-node-otnId" value=""/>
+ </set>
+ <set>
+ <parameter name="node-otn." value="`$network-otn.node[$potnidx].`"/>
+ </set>
+ <set>
+ <parameter name="unique-network-otnId" value="`$tmp.network-otn.network-id`"/>
+ <parameter name="unique-node-otnId" value="`'networkId-' + $unique-network-otnId + '-nodeId-' + $node-otn.node-id`"/>
+ </set>
+ <switch test="`$node-otn.te.tunnel-termination-point_length`">
+ <outcome value="">
+ <block/>
+ </outcome>
+ <outcome value="0">
+ <block/>
+ </outcome>
+ <outcome value="Other">
+ <for index="ttidx" start="0" end="`$node-otn.te.tunnel-termination-point_length`">
+ <set>
+ <parameter name="ttp." value=""/>
+ </set>
+ <set>
+ <parameter name="ttp." value="`$node-otn.te.tunnel-termination-point[$ttidx].`"/>
+ </set>
+ <set>
+ <parameter name="unique-ttpId" value="`$unique-node-otnId + '-ttpId-' + $ttp.tunnel-tp-id`"/>
+ </set>
+ <set>
+ <parameter name="ttp-inter-layer-lock-id" value="`$node-otn.te.tunnel-termination-point[$ttidx].inter-layer-lock-id`"/>
+ </set>
+ <switch test="`$tp-inter-layer-lock-id`">
+ <outcome value="`$ttp-inter-layer-lock-id`">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface:relationship-list" key="p-interface.interface-name = $unique-ltpethId" force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="tunnel-termination-point"/>
+ <parameter name="relationship-list.relationship[0].related-link" value="/network/tunnel-termination-points/tunnel-termination-point/ + `$unique-ttpId`"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="tunnel-termination-point.tunnel-tp-id"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$unique-ttpId`"/>
+ </save>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ </for>
</for>
- </for>
- </for>
+ </outcome>
+ </switch>
</for>
</block>
</method>