aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml
diff options
context:
space:
mode:
authorwsx25289 <10200860@zte.com.cn>2018-09-29 03:43:29 -0400
committerDan Timoney <dtimoney@att.com>2018-10-04 19:55:53 +0000
commit202115d9b54c98e2850d47bbeb41a07c8b8c581f (patch)
treedc7d1493fb448c45a21f7b33165e66e00202dc0d /platform-logic/datachange/src/main/xml
parent0d607948ff5a38a1ca0306bc68f7985a94b0be37 (diff)
fix update zte topology resource to aai code
Issue-ID: SDNC-354 Change-Id: Ief575669916e62b3270207d415984f7225f9d2e3 Signed-off-by: Wsx25289 <10200860@zte.com.cn> Former-commit-id: 7ce2bffd9bc9dfeab0b5c9e0862fa47adb2e1c42
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml254
1 files changed, 230 insertions, 24 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 2cc77da8..77c83bb9 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,42 +1,248 @@
-<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'>
+<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'>
+ <switch test="`$data-change-notification-input.aai-event-trigger`">
+ <outcome value="Update">
<block>
- <switch test='`$prop.sdncRestApi.type`'>
- <outcome value='SOTN'>
+ <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 + '/getztetopotemplate.json'`"/>
+ <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"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.zte.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.zte.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <outcome value='success'>
+ <parameter name="responsePrefix" value="ztetopology"/>
+ <outcome value="success">
<block atomic="true"/>
</outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
+ <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 Create vpn rest api"/>
+ <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"/>
+ </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>
+ <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">
+ <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>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </for>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </for>
+ </outcome>
+ </execute>
+ </block>
+ </for>
</block>
</outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
+ <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>
@@ -44,7 +250,7 @@
</switch>
</block>
</outcome>
- <outcome value='delete'>
+ <outcome value="delete">
<block atomic="true"/>
</outcome>
</switch>