diff options
author | 2020-02-29 00:25:00 +0000 | |
---|---|---|
committer | 2020-03-04 01:30:24 +0000 | |
commit | 58acc1cd194f7d61b22f875bccc6738e6dfb0b7c (patch) | |
tree | 81e28b23e190941c70aec08b6fc9d887bce64d67 /platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml | |
parent | 329b7c6477ec677507b0de33a053f887526b3d84 (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/DataChange_update-network-to-aai.xml')
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml | 102 |
1 files changed, 84 insertions, 18 deletions
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 |