aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-04-16 19:44:32 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-16 19:44:32 +0000
commit14eb036d9e35e7cd26894c041bb2c490f5eaa848 (patch)
tree5780c94dbba49900113671c77ba93e9c37522a30 /platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
parent54299308795738435154128c4a5873fc3ac575e2 (diff)
parent514181267234844f79768cef214ab5608ecab391 (diff)
Merge "Few modifications in DataChange DGs"
Former-commit-id: b48519ba9d2628ad5645c75ca010ee131a1d9f8a
Diffstat (limited to 'platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml')
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml202
1 files changed, 76 insertions, 126 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>