aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
diff options
context:
space:
mode:
authorFranklin Dsilva <franklin.dsilva@us.fujitsu.com>2020-04-16 11:06:44 +0000
committerFranklin Dsilva <franklin.dsilva@us.fujitsu.com>2020-04-16 11:06:57 +0000
commit514181267234844f79768cef214ab5608ecab391 (patch)
tree916f02d3b841c025f97f7b7417704843ab2e732e /platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
parent94fcc571a06ceab8b2119fc0d802340ba0086a70 (diff)
Few modifications in DataChange DGs
Change-Id: I608ffee7ab5b24013cc7136abb62faecb353587e Issue-ID: SDNC-1144 Signed-off-by: Franklin Dsilva <franklin.dsilva@us.fujitsu.com> Former-commit-id: 6ffbef3f0528e9cafecadf59317f5722942d8228
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>