summaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml
diff options
context:
space:
mode:
authorHesam Rahimi <hesam.rahimi@huawei.com>2020-02-29 00:25:00 +0000
committerHesam Rahimi <hesam.rahimi@huawei.com>2020-03-04 01:30:24 +0000
commit58acc1cd194f7d61b22f875bccc6738e6dfb0b7c (patch)
tree81e28b23e190941c70aec08b6fc9d887bce64d67 /platform-logic/datachange/src/main/xml
parent329b7c6477ec677507b0de33a053f887526b3d84 (diff)
Adding support for multi-layer and multi-domain topology discovery for CCVPN
Issue-ID: SDNC-899 Change-Id: I20f9d82e2488be3f90ef2566511787c69b6f7ed0 Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com> Former-commit-id: e5d3e8b2548f4cfe234e7d35733964e803cc0594
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml180
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml71
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml102
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml101
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_update-tp-ttp-relationship.xml71
5 files changed, 505 insertions, 20 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 c90a5cb2..a80f8710 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,6 +1,6 @@
<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}'>
+ 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'>
<block atomic="true">
<switch test="`$prop.sdncRestApi.vendor == 'ZTE'`">
@@ -64,6 +64,94 @@
<call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
</block>
</for>
+ <switch test='`$topology.networks.network_length`'>
+ <outcome value='2'>
+ <switch test='`$topology.networks.network[0].network-types`'>
+ <outcome value='ethernet-topology'>
+ <switch test='`$topology.networks.network[1].network-types`'>
+ <outcome value='otn-topology'>
+ <block>
+ <set>
+ <parameter name='network-eth.' value='`$topology.networks.network[0].`' />
+ <parameter name='network-otn.' value='`$topology.networks.network[1].`' />
+ </set>
+ <call module='DataChange' rpc='update-tp-ttp-relationship' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='otn-topology'>
+ <switch test='`$topology.networks.network[1].network-types`'>
+ <outcome value='ethernet-topology'>
+ <block>
+ <set>
+ <parameter name='network.eth' value='`$topology.networks.network[1].`' />
+ <parameter name='network.otn' value='`$topology.networks.network[0].`' />
+ </set>
+ <call module='DataChange' rpc='update-tp-ttp-relationship' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-resources"
+ pfx='tmp.aai.network-resources' local-only='false' >
+ <outcome value='success'>
+ <switch test='tmp.aai.network-resources_length'>
+ <outcome value='4'>
+ <block atomic='true'>
+ <for index='nridx' start='0' end='`$tmp.aai.network-resources.network-resource_length`' >
+ <block>
+ <set>
+ <parameter name='otnidx' value='0' />
+ </set>
+ <switch test='`$tmp.aai.network-resources.network-resource[$nridx].network-type`'>
+ <outcome value='otn-topology'>
+ <block>
+ <set>
+ <parameter name='network-resource-otn[$otnidx].' value='`$tmp.aai.network-resources.network-resource[$nridx].`' />
+ </set>
+ <set>
+ <parameter name='otnidx' value='`$otnidx + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <call module='DataChange' rpc='update-open-ended-links' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
</block>
</outcome>
</execute>
@@ -98,6 +186,94 @@
<call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
</block>
</for>
+ <switch test='`$topology.networks.network_length`'>
+ <outcome value='2'>
+ <switch test='`$topology.networks.network[0].network-types`'>
+ <outcome value='ethernet-topology'>
+ <switch test='`$topology.networks.network[1].network-types`'>
+ <outcome value='otn-topology'>
+ <block>
+ <set>
+ <parameter name='network-eth.' value='`$topology.networks.network[0].`' />
+ <parameter name='network-otn.' value='`$topology.networks.network[1].`' />
+ </set>
+ <call module='DataChange' rpc='update-tp-ttp-relationship' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='otn-topology'>
+ <switch test='`$topology.networks.network[1].network-types`'>
+ <outcome value='ethernet-topology'>
+ <block>
+ <set>
+ <parameter name='network.eth' value='`$topology.networks.network[1].`' />
+ <parameter name='network.otn' value='`$topology.networks.network[0].`' />
+ </set>
+ <call module='DataChange' rpc='update-tp-ttp-relationship' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-resources"
+ pfx='tmp.aai.network-resources' local-only='false' >
+ <outcome value='success'>
+ <switch test='tmp.aai.network-resources_length'>
+ <outcome value='4'>
+ <block atomic='true'>
+ <for index='nridx' start='0' end='`$tmp.aai.network-resources.network-resource_length`' >
+ <block>
+ <set>
+ <parameter name='otnidx' value='0' />
+ </set>
+ <switch test='`$tmp.aai.network-resources.network-resource[$nridx].network-type`'>
+ <outcome value='otn-topology'>
+ <block>
+ <set>
+ <parameter name='network-resource-otn[$otnidx].' value='`$tmp.aai.network-resources.network-resource[$nridx].`' />
+ </set>
+ <set>
+ <parameter name='otnidx' value='`$otnidx + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <call module='DataChange' rpc='update-open-ended-links' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ </get-resource>
</block>
</outcome>
</execute>
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
new file mode 100644
index 00000000..3495214e
--- /dev/null
+++ b/platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml
@@ -0,0 +1,71 @@
+<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'>
+ <block atomic="true">
+ <for index='pidx' start='0' end='`$network.link_length`' >
+ <set>
+ <parameter name='link.' value='`$network.link[$pidx].`' />
+ <parameter name='unique-networkId' value='`$tmp.network-id`' />
+ <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='dst-tpId' value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node + '-ltpId-' + $link.destination.dest-tp`" />
+ </set>
+ <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`' />
+ </save>
+ <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="`'/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="`'/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>
+ <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`" />
+ </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>
+ </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>
+ </save>
+ <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>
+ </for>
+ </for>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
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 666d337a..9c17eac5 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,6 +1,6 @@
<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}'>
+ 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'>
<block atomic="true">
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
@@ -9,35 +9,88 @@
<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' >
+ <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`' >
<set>
<parameter name='node.' value='`$network.node[$pidx].`' />
+ <parameter name='unique-networkId' value='`$tmp.network-id`' />
+ <parameter name='unique-nodeId' value="`'networkId-' + $unique-networkId + '-nodeId-' + $node.node-id`" />
+ <parameter name='src-tpId' value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node + '-ltpId-' + $link.source.source-tp`" />
</set>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'
- key='pnf.pnf-name = $node.node-id' >
- <parameter name='pnf-name' value='`$node.node-id`' />
+ <set>
+ <parameter name='unique-networkId' value='`$tmp.network-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>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list'
- key='pnf.pnf-name = $node.node-id' force="true" pfx="tmp.AnAI-data">
+ <for index='ttidx' start='0' end='`$node.te.tunnel-termination-point_length`' >
+ <set>
+ <parameter name='ttp.' value='`$node.te.tunnel-termination-point[$ttidx].`' />
+ </set>
+ <set>
+ <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='pnf.pnf-name = $unique-nodeId
+ AND 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>
+ </outcome>
+ <outcome value='failure'>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='tunnel-termination-point'
+ key='pnf.pnf-name = $node.node-id
+ AND tunnel-termination-point.ttp-id = $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].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`" />
+ </save>
+ </for>
+ <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">
+ <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" />
@@ -48,10 +101,10 @@
<parameter name='tp.' value='`$node.termination-point[$tidx].`' />
</set>
<set>
- <parameter name='unique-ltpId' value="`'nodeId-' + $node.node-id + '-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 = $node.node-id
+ <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`' />
@@ -59,12 +112,14 @@
<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>
</outcome>
<outcome value='failure'>
- <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
- key='pnf.pnf-name = $node.node-id
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
+ key='pnf.pnf-name = $node.node-id
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`' />
@@ -72,11 +127,22 @@
<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`' />
</update>
</outcome>
</save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface:relationship-list'
+ key='pnf.pnf-name = $unique-nodeId
+ AND p-interface.interface-name = $unique-ltpId' 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/' + $unique-nodeId`" />
+ <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="`$unique-nodeId`" />
+ </save>
</for>
</for>
+ <call module='DataChange' rpc='update-network-links-to-aai' mode='sync' ></call>
</block>
</method>
-</service-logic>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml b/platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml
new file mode 100644
index 00000000..1919ec0f
--- /dev/null
+++ b/platform-logic/datachange/src/main/xml/DataChange_update-open-ended-links.xml
@@ -0,0 +1,101 @@
+<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-open-ended-links' mode='sync'>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="logical-links"
+ pfx='tmp.aai.logical-links' local-only='false' >
+ <outcome value='success'>
+ <for index='llidx' start='0' end='`$tmp.aai.logical-links.logical-link_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='src-tpId' value='`$tmp.aai.logical-links.logical-link[$llidx].relationship-list.relationship[0].relationship-data[0].relationship-value`' />
+ <parameter name='dst-tpId' value='`$tmp.aai.logical-links.logical-link[$llidx].relationship-list.relationship[1].relationship-data[0].relationship-value`' />
+ <parameter name='ll-to-be-updated.' value='`$tmp.aai.logical-links.logical-link[$llidx].`' />
+ </set>
+ <switch test='$dst-tpId'>
+ <outcome value=''>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="p-interface.interface-name = $src-ltpId
+ AND depth = '0'"
+ pfx='tmp.aai.src-tp' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='src-plug-id' value='`$tmp.aai.src-tp.inter-domain-plug-id`' />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interfaces"
+ pfx='tmp.aai.p-interfaces' local-only='false' >
+ <outcome value='success'>
+ <for index='tpidx' start='0' end='`$tmp.aai.p-interfaces.p-interface_length`' >
+ <switch test='`$tmp.aai.p-interfaces.p-interface[$tpidx].inter-domain-plug-id`'>
+ <outcome value='`$src-plug-id`'>
+ <switch test='`$tmp.aai.p-interfaces.p-interface[$tpidx].interface-name != $src-tp-id `'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='dst-tp-new' value='`$tmp.aai.p-interfaces.p-interface[$tpidx].interface-name`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
+ key='logical-link.link-name = $ll-to-be-updated.link-name' force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[1].related-to" value="p-interface" />
+ <parameter name="relationship-list.relationship[1].related-link" value="`'/p-interfaces/p-interface/' + $dst-tp-new`" />
+ <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-tp-new`" />
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </for>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </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
new file mode 100644
index 00000000..786265b8
--- /dev/null
+++ b/platform-logic/datachange/src/main/xml/DataChange_update-tp-ttp-relationship.xml
@@ -0,0 +1,71 @@
+<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'>
+ <block atomic="true">
+ <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' >
+ <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`' >
+ <set>
+ <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`" />
+ </set>
+ <for index='tidx' start='0' end='`$node-eth.termination-point_length`' >
+ <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`' >
+ <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[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>
+ </for>
+ </for>
+ </for>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file