aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml202
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml10
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_tapi-update-network-to-aai.xml2
3 files changed, 78 insertions, 136 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 81e8bd20..110c9f61 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
@@ -64,68 +64,6 @@
<call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
</block>
</for>
- <switch test='`$topology.networks.network_length >= 2`'>
- <outcome value='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>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="networks_length" />
- <parameter name="field3" value="`$topology.networks.network_length`" />
- <parameter name="field4" value="network-type-is" />
- <parameter name="field5" value="OTN" />
- </record>
- <set>
- <parameter name='network-otn.' value='`$topology.networks.network[$netidx].`' />
- </set>
- </block>
- </outcome>
- <outcome value='33'>
- <block>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="networks_length" />
- <parameter name="field3" value="`$topology.networks.network_length`" />
- <parameter name="field4" value="network-type-is" />
- <parameter name="field5" value="ETH" />
- </record>
- <set>
- <parameter name='network-eth.' value='`$topology.networks.network[$netidx].`' />
- </set>
- </block>
- </outcome>
- </switch>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field6" value="network-otn-is" />
- <parameter name="field7" value="`$network-otn.te-topology-id`" />
- <parameter name="field8" value="network-eth-is" />
- <parameter name="field9" value="`$network-eth.te-topology-id`" />
- </record>
- <call module='DataChange' rpc='update-tp-ttp-relationship' mode='sync' ></call>
- </block>
- </for>
- </outcome>
- <outcome value='false'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="networks_length" />
- <parameter name="field3" value="`$topology.networks.network_length`" />
- </record>
- </outcome>
- </switch>
</block>
</outcome>
</execute>
@@ -160,68 +98,6 @@
<call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
</block>
</for>
- <switch test='`$topology.networks.network_length >= 2`'>
- <outcome value='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>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="networks_length" />
- <parameter name="field3" value="`$topology.networks.network_length`" />
- <parameter name="field4" value="network-type-is" />
- <parameter name="field5" value="OTN" />
- </record>
- <set>
- <parameter name='network-otn.' value='`$topology.networks.network[$netidx].`' />
- </set>
- </block>
- </outcome>
- <outcome value='33'>
- <block>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="networks_length" />
- <parameter name="field3" value="`$topology.networks.network_length`" />
- <parameter name="field4" value="network-type-is" />
- <parameter name="field5" value="ETH" />
- </record>
- <set>
- <parameter name='network-eth.' value='`$topology.networks.network[$netidx].`' />
- </set>
- </block>
- </outcome>
- </switch>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field6" value="network-otn-is" />
- <parameter name="field7" value="`$network-otn.te-topology-id`" />
- <parameter name="field8" value="network-eth-is" />
- <parameter name="field9" value="`$network-eth.te-topology-id`" />
- </record>
- <call module='DataChange' rpc='update-tp-ttp-relationship' mode='sync' ></call>
- </block>
- </for>
- </outcome>
- <outcome value='false'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/onap/logSdncDiscovery.txt" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="networks_length" />
- <parameter name="field3" value="`$topology.networks.network_length`" />
- </record>
- </outcome>
- </switch>
</block>
</outcome>
</execute>
@@ -324,8 +200,82 @@
</switch>
</block>
</outcome>
- <outcome value='delete'>
- <block atomic="true"></block>
+ <outcome value='Delete'>
+ <block atomic="true">
+ <switch test="`$prop.sdncRestApi.type`">
+ <outcome value='MSA'>
+ <block atomic='true'>
+ <set>
+ <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>
+ </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" />
+ </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" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value='TAPI'>
+ <block>
+ <set>
+ <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>
+ </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" />
+ </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" />
+ </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`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
</outcome>
</switch>
</outcome>
diff --git a/platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml b/platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml
index a4076e51..34fdcebb 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_msa-update-network-to-aai.xml
@@ -20,7 +20,7 @@
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$networks.network-id`" />
</save>
<set>
- <parameter name='controller_id' value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url`" />
+ <parameter name='controller_id' value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url + '_' + $prop.sdncRestApi.thirdpartySdnc.id`" />
</set>
<for index='nidx' start='0' end='`$networks.node_length`' >
<set>
@@ -120,14 +120,6 @@ key='pnf.pnf-name = $pnfname' >
<parameter name='speed-value' value='100' />
<parameter name='available-capacity' value='100' />
</save>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='custom-query'
- key="format='resource'"
- force="true"
- local-only="false"
- pfx="data">
- <parameter name='interface-name' value='`$interfaceName`' />
- <parameter name='port-description' value='`$tp.tp-id`' />
- </save>
<save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL" key="INSERT INTO TOPOLOGY_LOGICAL_RELATION_TO_PINTERFACE VALUES ( $interfaceName , $tp.tp-id , $pnfname , $node.node-id , $controller_id , '100' , $clli , null );"></save>
</for>
</block>
diff --git a/platform-logic/datachange/src/main/xml/DataChange_tapi-update-network-to-aai.xml b/platform-logic/datachange/src/main/xml/DataChange_tapi-update-network-to-aai.xml
index 626b7c73..e6a17cd1 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_tapi-update-network-to-aai.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_tapi-update-network-to-aai.xml
@@ -25,7 +25,7 @@
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.network-id`" />
</save>
<set>
- <parameter name='controller_id' value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url`" />
+ <parameter name='controller_id' value="`$prop.sdncRestApi.type + '_' + $prop.sdncRestApi.thirdpartySdnc.url + '_' + $prop.sdncRestApi.thirdpartySdnc.id`" />
</set>
<for index='nidx' start='0' end='`$topology.node_length`' >
<set>