diff options
author | Hesam Rahimi <hesam.rahimi@huawei.com> | 2020-04-01 19:31:42 +0000 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2020-04-03 17:21:34 +0000 |
commit | 982d8c4bc7a4d01beb848487321beef51e8c1d3d (patch) | |
tree | 356da973390d84cf39e576ade9f0c1f7d005bb94 /platform-logic/datachange/src/main/xml | |
parent | 795847bcc72949601e286392de6f49317049cc84 (diff) |
Bug fixing in DGs related to network and links storing in AAI.
Issue-ID: SDNC-899
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Change-Id: I09df4dd299ebb02386312a58806404cc2ae27b8c
(cherry picked from commit cb78477d4a74b0ab703c1027fffe11b5c17e7335 [formerly 72d0ed54d160546f494781bca5aa0f574d84748d])
Former-commit-id: 49d2e92f91c8d5b65600eaa61b1104f9efca3bd3
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_update-network-links-to-aai.xml | 250 | ||||
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_update-network-to-aai.xml | 261 |
2 files changed, 317 insertions, 194 deletions
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 index 3495214e..8777891a 100644 --- 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 @@ -1,70 +1,192 @@ -<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'> +<service-logic 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`' > + <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`" /> + <parameter name="link." value="`$network.link[$pidx].`"/> + <parameter name="unique-networkId" value="`$tmp.network-id`"/> </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> + <set> + <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="unique-src-node-Id" value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node`"/> + </set> + <switch test="`$link.destination`"> + <outcome value=""> + <block> + <set> + <parameter name="is-open-ended-link" value="true"/> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $unique-src-node-Id and p-interface.interface-name = $src-tpId" local-only="false" pfx="tmp.aai.p-interface"> + <outcome value="success"> + <set> + <parameter name="alt-unique-linkId" value="`$tmp.aai.p-interface.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="failure"> + <return status="failure"> + <parameter name="error-code" value=""/> + <parameter name="error-message" value=""/> + </return> + </outcome> + </get-resource> + </block> + </outcome> + <outcome value="Other"> + <set> + <parameter name="dst-tpId" value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node + '-ltpId-' + $link.destination.dest-tp`"/> + <parameter name="unique-dst-node-Id" value="`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node`"/> + <parameter name="is-open-ended-link" value="false"/> + </set> + </outcome> + </switch> + <switch test="`$is-open-ended-link`"> + <outcome value="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link" key="logical-link.link-name = $alt-unique-linkId" local-only="false" pfx="tmp.aai.logical-link"> + <outcome value="success"> + <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link:relationship-list" key="logical-link.link-name = $alt-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="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/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="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/p-interfaces/p-interface/' + $src-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="`$src-tpId`"/> + </update> + </outcome> + <outcome value="not-found"> + <block atomic="true"> + <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="logical-link" key="logical-link.link-name = $alt-unique-linkId"> + <parameter name="link-name" value="`$alt-unique-linkId`"/> + <parameter name="link-id" value="`$link.link-id`"/> + <parameter name="link-type" value="`$link.te.te-link-attributes.access-type`"/> + </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="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/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`"/> + </save> + <switch test="`$link.te.te-link-attributes.label-restriction`"> + <outcome value=""> + <block/> + </outcome> + <outcome value="Other"> + <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="`$alt-unique-linkId + '-lrId-' + $label-restriction.index`"/> + </set> + <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="logical-link.link-name = $alt-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/> + </outcome> + <outcome value="failure"> + <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="label-restriction" key="logical-link.link-name = $alt-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 = $alt-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> + </outcome> + </switch> + </block> + </outcome> + </get-resource> + </outcome> + <outcome value="false"> + <block atomic="true"> + <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`"/> + <parameter name="link-type" value="`$link.te.te-link-attributes.access-type`"/> + </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="`'/network/pnfs/pnf/' + $unique-src-node-Id + '/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="`'/network/pnfs/pnf/' + $unique-dst-node-Id + '/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> + <switch test="`$link.te.te-link-attributes.label-restriction`"> + <outcome value=""> + <block/> + </outcome> + <outcome value="Other"> + <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/> + </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> + </outcome> + </switch> + </block> + </outcome> + </switch> </for> </block> </method> 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 9c17eac5..17be19ec 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,148 +1,149 @@ -<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-to-aai' mode='sync'>
+<service-logic 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' >
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="replace">
<parameter name="source" value="`$network.network-id`"/>
<parameter name="outputPath" value="tmp.network-id"/>
<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' >
- <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 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`' >
+ <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`" />
+ <parameter name="node." value="`$network.node[$pidx].`"/>
+ <parameter name="unique-networkId" value="`$tmp.network-id`"/>
</set>
<set>
- <parameter name='unique-networkId' value='`$tmp.network-id`' />
- <parameter name='unique-nodeId' value="`'networkId-' + $unique-networkId + '-nodeId-' + $node.node-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 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>
- <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`" />
+ <switch test="`$node.te.tunnel-termination-point_length`">
+ <outcome value="">
+ <block/>
+ </outcome>
+ <outcome value="0">
+ <block/>
+ </outcome>
+ <outcome value="Other">
+ <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/>
+ </outcome>
+ <outcome value="failure">
+ <update 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`"/>
+ </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>
+ </outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/onap/hesamlogx.txt"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="sucess executing Hesam hesam log file"/>
+ <parameter name="field3" value="`$node.te.tunnel-termination-point_length`"/>
+ <parameter name="field4" value="`$node.termination-point_length`"/>
+ </record>
+ <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">
- <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" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$node.node-id`" />
+ <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"/>
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$node.node-id`"/>
</save>
- <for index='tidx' start='0' end='`$node.termination-point_length`' >
- <set>
- <parameter name='tp.' value='`$node.termination-point[$tidx].`' />
- </set>
- <set>
- <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 = $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`' />
- <parameter name='transparent' value='`$tp.svc.supported-classification.transparent`' />
- <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
- 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`' />
- <parameter name='transparent' value='`$tp.svc.supported-classification.transparent`' />
- <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>
+ <switch test="`$node.termination-point_length`">
+ <outcome value="">
+ <block/>
+ </outcome>
+ <outcome value="0">
+ <block/>
+ </outcome>
+ <outcome value="Other">
+ <for index="tidx" start="0" end="`$node.termination-point_length`">
+ <set>
+ <parameter name="tp." value="`$node.termination-point[$tidx].`"/>
+ </set>
+ <set>
+ <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 = $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`"/>
+ <parameter name="transparent" value="`$tp.svc.supported-classification.transparent`"/>
+ <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/>
+ </outcome>
+ <outcome value="failure">
+ <update 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`"/>
+ <parameter name="transparent" value="`$tp.svc.supported-classification.transparent`"/>
+ <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>
+ </for>
+ </outcome>
+ </switch>
</for>
- <call module='DataChange' rpc='update-network-links-to-aai' mode='sync' ></call>
+ <call module="DataChange" rpc="update-network-links-to-aai" mode="sync"/>
</block>
</method>
</service-logic>
\ No newline at end of file |