diff options
author | 2018-12-02 21:12:15 -0500 | |
---|---|---|
committer | 2018-12-02 21:13:14 -0500 | |
commit | 76c5155fb4262a1aa2872c7e34e29ed2bcefac5c (patch) | |
tree | 68a67fe19b619dd10d0fabfcc534dcf2172585dc /platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml | |
parent | 08ff1d1faa600a41dff298aca1205cb50a035682 (diff) |
fix topology discovery bug for ccvpn
Issue-ID: SDNC-354
Change-Id: I3c3d0a464af933da449f009690085d778bbb4614
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
Former-commit-id: f795758fd327fad2a9ed7ac411cfd10a3d5922a0
Diffstat (limited to 'platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml')
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml | 533 |
1 files changed, 283 insertions, 250 deletions
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml index 77c83bb9..4ffb73ee 100644 --- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml +++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml @@ -1,259 +1,292 @@ -<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="esr-thirdparty-sdnc-discovery-of-zte" mode="sync">
- <block atomic="true">
- <switch test="`$data-change-notification-input.aai-event-trigger`">
- <outcome value="Update">
- <block>
- <switch test="`$prop.sdncRestApi.type`">
- <outcome value="SOTN">
- <block atomic="true">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutopotemplate.json'`"/>
- <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`"/>
- <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="POST"/>
- <parameter name="responsePrefix" value="ztetopology"/>
- <outcome value="success">
- <block atomic="true"/>
- </outcome>
- <outcome value="failure">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="Error executing Get odutopo rest api"/>
- </return>
- </outcome>
- </execute>
- <for index="nidx" start="0" end="`$ztetopology.output.topology.node-ref-id_length`">
- <block atomic="true">
- <set>
- <parameter name="prop.zte.network-id" value="zteNetwork"/>
- <parameter name="prop.zte.client-id" value="zteClient1"/>
- <parameter name="prop.zte.topo-id" value="zteTopo1"/>
- <parameter name="prop.zte.provider-id" value="zteProvider1"/>
- <parameter name="prop.zte.odutopo.name" value="`$ztetopology.output.topology.node-ref-id[$nidx]`"/>
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-resource" key="network-resource.network-id = $prop.zte.network-id">
- <parameter name="network-id" value="`$prop.zte.network-id`"/>
- <parameter name="client-id" value="`$prop.zte.client-id`"/>
- <parameter name="te-topo-id" value="`$prop.zte.topo-id`"/>
- <parameter name="provider-id" value="`$prop.zte.provider-id`"/>
- </save>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodetemplate.json'`"/>
- <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`"/>
- <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="POST"/>
- <parameter name="responsePrefix" value="ztetopologynode"/>
- <outcome value="failure">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="Error executing Get odutopo node rest api"/>
- </return>
- </outcome>
- <outcome value="success">
- <for index="pidx" start="0" end="`$ztetopologynode.output.topology.node-ref-id_length`">
- <block>
- <set>
- <parameter name="prop.zte.odutopo.node.name" value="`$ztetopologynode.output.topology.node-ref-id[$pidx]`"/>
- </set>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodedetailstemplate.json'`"/>
- <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-details'`"/>
- <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="POST"/>
- <parameter name="responsePrefix" value="ztetopologynodedetails"/>
- <outcome value="failure">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="Error executing Get odutopo node details rest api"/>
- </return>
- </outcome>
- <outcome value="success">
- <block>
- <switch test="`$ztetopologynodedetails.node.global-state-pac.operational-state == 'ENABLED'`">
- <outcome value="true">
- <switch test="`$ztetopologynodedetails.node.global-state-pac.administrative-state == 'LOCKED'`">
- <outcome value="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
- <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="operational-status" value="up"/>
- <parameter name="admin-status" value="up"/>
- <parameter name="in-maint" value="true"/>
- </save>
- </outcome>
- <outcome value="false">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
- <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="operational-status" value="up"/>
- <parameter name="admin-status" value="down"/>
- <parameter name="in-maint" value="true"/>
- </save>
- </outcome>
- </switch>
- </outcome>
- <outcome value="false">
- <switch test="`$ztetopologynodedetails.node.global-state-pac.administrative-state == 'LOCKED'`">
- <outcome value="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
- <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="operational-status" value="down"/>
- <parameter name="admin-status" value="up"/>
- <parameter name="in-maint" value="true"/>
- </save>
- </outcome>
- <outcome value="false">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid">
- <parameter name="pnf-name" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="pnf-id" value="`$ztetopologynodedetails.node.uuid`"/>
- <parameter name="operational-status" value="down"/>
- <parameter name="admin-status" value="down"/>
- <parameter name="in-maint" value="true"/>
- </save>
- </outcome>
- </switch>
- </outcome>
- </switch>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf:relationship-list" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid" 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/' + 'zteNetwork'"/>
- <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="zteNetwork"/>
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc:relationship-list" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $zte.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/' + $ztetopologynodedetails.node.uuid`"/>
- <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="`$ztetopologynodedetails.node.uuid`"/>
- </save>
- <for index="ridx" start="0" end="`$ztetopologynodedetails.output.node.node-edge-point-id_length`">
- <block>
- <set>
- <parameter name="prop.zte.odutopo.node.nep.uuid" value="`$ztetopologynodedetails.output.node.node-edge-point-id[$ridx]`"/>
- </set>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodenepdetailstemplate.json'`"/>
- <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-edge-point-details'`"/>
- <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`"/>
- <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`"/>
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="POST"/>
- <parameter name="responsePrefix" value="ztetopologynodenepdetails"/>
- <outcome value="failure">
- <return status="failure">
- <parameter name="ack-final" value="Y"/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="Error executing Get odutopo node edge point details rest api"/>
+<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='esr-thirdparty-sdnc-discovery-of-zte' mode='sync'>
+ <block atomic='true'>
+ <switch test="`$data-change-notification-input.aai-event-trigger`">
+ <outcome value='Update'>
+ <block>
+ <switch test="`$zte.prop.sdncRestApi.type`">
+ <outcome value='SOTN'>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutopotemplate.json'`" />
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`" />
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopology"/>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Get odutopo rest api" />
</return>
- </outcome>
- <outcome value="success">
- <for index="tidx" start="0" end="`$ztetopologynodenepdetails.output.node-edge-point.name_length`">
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
- <parameter name="source" value="`$ztetopologynodenepdetails.node-edge-point.name[tidx].value`"/>
- <parameter name="target" value="client"/>
- <outcome value="false">
- <block></block>
+ </outcome>
+ </execute>
+ <for index='nidx' start='0' end='`$ztetopology.output.topology.node-ref-id_length`' >
+ <block>
+ <set>
+ <parameter name='prop.zte.odutopo.name' value='`$ztetopology.output.topology.node-ref-id[$nidx]`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodetemplate.json'`" />
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-topology-details'`" />
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopologynode"/>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Get odutopo node rest api" />
+ </return>
</outcome>
- <outcome value="true">
- <block>
- <set>
- <parameter name="zte-unique-ltpId" value="`'nodeId-' + $ztetopologynodedetails.node.uuid + '-ltpId-' + $ztetopologynodenepdetails.node-edge-point.uuid`"/>
- </set>
- <set>
- <parameter name="zte-bandwidth" value="`1000 * 1000000 * 1.25 * $ztetopologynodenepdetails.node-edge-point.lp[0].odu-nep-pac.oducapacity`"/>
- </set>
- <switch test="`$ztetopologynodedetails.node.global-state-pac.operational-state == 'ENABLED'`">
- <outcome value="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
- <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
- <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
- <parameter name="transparent" value="true"/>
- <parameter name="speed-value" value="`$zte-bandwidth`"/>
- <parameter name="operational-status" value="up"/>
- <parameter name="in-maint" value="true"/> "`'nodeId-' + $node.node-id + '-ltpId-' + $tp.te-tp-id`"
- <outcome value="success">
+ <outcome value='success'>
+ <switch test="`$ztetopologynode.output.topology.layer-protocol-name[0] == 'ODU'`">
+ <outcome value='false'>
<block></block>
- </outcome>
- <outcome value="failure">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
- <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
- <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
- <parameter name="transparent" value="true"/>
- <parameter name="speed-value" value="`$zte-bandwidth`"/>
- <parameter name="operational-status" value="up"/>
- <parameter name="in-maint" value="true"/>
- </save>
- </outcome>
- </save>
- </outcome>
- <outcome value="false">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
- <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
- <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
- <parameter name="transparent" value="true"/>
- <parameter name="speed-value" value="`$zte-bandwidth`"/>
- <parameter name="operational-status" value="down"/>
- <parameter name="in-maint" value="true"/>
- <outcome value="success">
- <block></block>
- </outcome>
- <outcome value="failure">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="p-interface" key="pnf.pnf-name = $ztetopologynodedetails.node.uuid AND p-interface.interface-name = $zte-unique-ltpId">
- <parameter name="interface-name" value="`$zte-unique-ltpId`"/>
- <parameter name="network-ref" value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`"/>
- <parameter name="transparent" value="true"/>
- <parameter name="speed-value" value="`$zte-bandwidth`"/>
- <parameter name="operational-status" value="up"/>
- <parameter name="in-maint" value="true"/>
- </save>
- </outcome>
- </save>
- </outcome>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='prop.zte.network-id' value="zteNetwork" />
+ <parameter name='prop.zte.client-id' value="zteClient1" />
+ <parameter name='prop.zte.topo-id' value="zteTopo1" />
+ <parameter name='prop.zte.provider-id' value="zteProvider1" />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='network-resource'
+ key='network-resource.network-id = $prop.zte.network-id' >
+ <parameter name='network-id' value='`$prop.zte.network-id`' />
+ <parameter name='client-id' value='`$prop.zte.client-id`' />
+ <parameter name='te-topo-id' value='`$prop.zte.topo-id`' />
+ <parameter name='provider-id' value='`$prop.zte.provider-id`' />
+ </save>
+ <for index='pidx' start='0' end='`$ztetopologynode.output.topology.node-ref-id_length`' >
+ <block>
+ <set>
+ <parameter name='prop.zte.odutopo.node.name' value='`$ztetopologynode.output.topology.node-ref-id[$pidx]`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodedetailstemplate.json'`" />
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-details'`" />
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopologynodedetails"/>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Get odutopo node details rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <switch test="`$ztetopologynodedetails.output.node.global-state-pac.operational-state == 'ENABLED'`">
+ <outcome value='true'>
+ <switch test="`$ztetopologynodedetails.output.node.global-state-pac.administrative-state == 'LOCKED'`">
+ <outcome value='true'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid' >
+ <parameter name='pnf-name' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='pnf-id' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='operational-status' value="up" />
+ <parameter name='admin-status' value="up" />
+ <parameter name='in-maint' value='true' />
+ </save>
+ </outcome>
+ <outcome value='false'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid' >
+ <parameter name='pnf-name' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='pnf-id' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='operational-status' value="up" />
+ <parameter name='admin-status' value="down" />
+ <parameter name='in-maint' value='true' />
+ </save>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='false'>
+ <switch test="`$ztetopologynodedetails.output.node.global-state-pac.administrative-state == 'LOCKED'`">
+ <outcome value='true'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid' >
+ <parameter name='pnf-name' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='pnf-id' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='operational-status' value="down" />
+ <parameter name='admin-status' value="up" />
+ <parameter name='in-maint' value='true' />
+ </save>
+ </outcome>
+ <outcome value='false'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid' >
+ <parameter name='pnf-name' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='pnf-id' value='`$ztetopologynodedetails.output.node.uuid`' />
+ <parameter name='operational-status' value="down" />
+ <parameter name='admin-status' value="down" />
+ <parameter name='in-maint' value='true' />
+ </save>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid' 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/' + $prop.zte.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="`$prop.zte.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 = $zte.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/' + $ztetopologynodedetails.output.node.uuid`" />
+ <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="`$ztetopologynodedetails.output.node.uuid`" />
+ </save>
+ <for index='ridx' start='0' end='`$ztetopologynodedetails.output.node.node-edge-point-id_length`' >
+ <block>
+ <set>
+ <parameter name='prop.zte.odutopo.node.nep.uuid' value='`$ztetopologynodedetails.output.node.node-edge-point-id[$ridx]`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/getzteodutoponodenepdetailstemplate.json'`" />
+ <parameter name="restapiUrl" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-Topology:get-node-edge-point-details'`" />
+ <parameter name="restapiUser" value="`$zte.prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$zte.prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="POST"/>
+ <parameter name="responsePrefix" value="ztetopologynodenepdetails"/>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Get odutopo node edge point details rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <for index='tidx' start='0' end='`$ztetopologynodenepdetails.output.node-edge-point.name_length`' >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' >
+ <parameter name="source" value="`$ztetopologynodenepdetails.node-edge-point.name[tidx].value`"/>
+ <parameter name="target" value="client"/>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='zte-unique-ltpId' value="`'nodeId-' + $ztetopologynodedetails.output.node.uuid + '-ltpId-' + $ztetopologynodenepdetails.output.node-edge-point.uuid`" />
+ </set>
+ <set>
+ <parameter name='zte-bandwidth' value='`1250000000 * $ztetopologynodenepdetails.output.node-edge-point.lp[0].odu-nep-pac.odu-capacity`' />
+ </set>
+ <switch test="`$ztetopologynodedetails.output.node.global-state-pac.operational-state == 'ENABLED'`">
+ <outcome value='true'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid
+ AND p-interface.interface-name = $zte-unique-ltpId' >
+ <parameter name='interface-name' value='`$zte-unique-ltpId`' />
+ <parameter name='network-ref' value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`" />
+ <parameter name='transparent' value="true" />
+ <parameter name='speed-value' value='`$zte-bandwidth`' />
+ <parameter name='operational-status' value="up" />
+ <parameter name='in-maint' value="true" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid
+ AND p-interface.interface-name = $zte-unique-ltpId' >
+ <parameter name='interface-name' value='`$zte-unique-ltpId`' />
+ <parameter name='network-ref' value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`" />
+ <parameter name='transparent' value="true" />
+ <parameter name='speed-value' value='`$zte-bandwidth`' />
+ <parameter name='operational-status' value="up" />
+ <parameter name='in-maint' value="true" />
+ </save>
+ </outcome>
+ </save>
+ </outcome>
+ <outcome value='false'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid
+ AND p-interface.interface-name = $zte-unique-ltpId' >
+ <parameter name='interface-name' value='`$zte-unique-ltpId`' />
+ <parameter name='network-ref' value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`" />
+ <parameter name='transparent' value="true" />
+ <parameter name='speed-value' value='`$zte-bandwidth`' />
+ <parameter name='operational-status' value="down" />
+ <parameter name='in-maint' value="true" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface'
+ key='pnf.pnf-name = $ztetopologynodedetails.output.node.uuid
+ AND p-interface.interface-name = $zte-unique-ltpId' >
+ <parameter name='interface-name' value='`$zte-unique-ltpId`' />
+ <parameter name='network-ref' value="`'providerId/' + $prop.zte.provider-id + '/topologyId/' + $prop.zte.topo-id + '/clientId/' + $prop.zte.client-id`" />
+ <parameter name='transparent' value="true" />
+ <parameter name='speed-value' value='`$zte-bandwidth`' />
+ <parameter name='operational-status' value="up" />
+ <parameter name='in-maint' value="true" />
+ </save>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </for>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </block>
+ </outcome>
</switch>
- </block>
</outcome>
- </execute>
- </for>
- </outcome>
- </execute>
- </block>
+ </execute>
+ </block>
</for>
- </block>
- </outcome>
- </execute>
- </block>
- </for>
- </outcome>
- </execute>
+ </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>
- </for>
- </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>
+ </outcome>
+ <outcome value='delete'>
+ <block atomic='true'></block>
+ </outcome>
</switch>
- </block>
- </outcome>
- <outcome value="delete">
- <block atomic="true"/>
- </outcome>
- </switch>
- </block>
- </method>
+ </block>
+ </method>
</service-logic>
\ No newline at end of file |