aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml62
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery-of-zte.xml533
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml291
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml124
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml2
5 files changed, 519 insertions, 493 deletions
diff --git a/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml b/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml
index 529b8497..76f2fe89 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_data-change-notification.xml
@@ -1,41 +1,27 @@
<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='data-change-notification' mode='sync'>
- <block atomic="true">
- <switch test='`$data-change-notification-input.aai-node-type`'>
- <outcome value='esr-thirdparty-sdnc'>
- <for index='idx' start='0' end='`$data-change-notification-input.key-data_length`'>
- <switch test='`$data-change-notification-input.key-data[$idx].key-value == 'ZTE'`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='zte.prop.sdncRestApi.vendor' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
- </set>
- <call module='DataChange' rpc='esr-thirdparty-sdnc-of-zte' mode='sync'></call>
- </block>
- </outcome>
- <outcome value='false'>
- <block atomic="true">
- <call module='DataChange' rpc='esr-thirdparty-sdnc' mode='sync'></call>
- </block>
- </outcome>
+ 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='data-change-notification' mode='sync'>
+ <block atomic="true">
+ <switch test='`$data-change-notification-input.aai-node-type`'>
+ <outcome value='esr-thirdparty-sdnc'>
+ <block atomic="true">
+ <call module='DataChange' rpc='esr-thirdparty-sdnc' mode='sync' ></call>
+ </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="AAI node type not supported" />
+ </return>
+ </outcome>
</switch>
- </for>
- </outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500"/>
- <parameter name="error-message" value="AAI node type not supported"/>
- </return>
- </outcome>
- </switch>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y"/>
- <parameter name="error-code" value="200"/>
- <parameter name="error-message" value="`$error-message`"/>
- </return>
- </block>
- </method>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </method>
</service-logic> \ No newline at end of file
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
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
index e71c0419..e11daddd 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
@@ -1,144 +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='esr-thirdparty-sdnc-discovery' 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.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 + '/actokentemplate.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="responsePrefix" value="token-result"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <outcome value='success'>
- <set>
- <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
- </set>
- </outcome>
- <outcome value='failure'>
- <block></block>
- </outcome>
- </execute>
- <switch test="`$prop.sdncRestApi.token_id`">
- <outcome value=''>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="get"/>
- <parameter name="responsePrefix" value="topology"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <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" />
- </return>
- </outcome>
- <outcome value='success'>
- <block atomic="true">
- <for index='nidx' start='0' end='`$topology.networks.network_length`' >
- <block>
- <set>
- <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
- </set>
- <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
- </block>
- </for>
- </block>
- </outcome>
- </execute>
- </outcome>
- <outcome value='Other'>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="get"/>
- <parameter name="responsePrefix" value="topology"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- <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" />
- </return>
- </outcome>
- <outcome value='success'>
- <block atomic="true">
- <for index='nidx' start='0' end='`$topology.networks.network_length`' >
- <block>
- <set>
- <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
- </set>
- <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
- </block>
- </for>
- </block>
- </outcome>
- </execute>
- </outcome>
- </switch>
- <set>
- <parameter name='input' value='ietf-subscribed-notifications:establish-subscription.input.' />
- <parameter name="`$input + 'encoding'`" value="encode-json" />
- </set>
- <execute plugin='org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode' method='establishSubscription' >
- <parameter name="subscriberId" value="sotn-controller" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="sseConnectURL" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`" />
- <parameter name="dirPath" value="/opt/sdnc/restconfapi/yang/notification" />
- <parameter name="format" value="json" />
- <parameter name="httpMethod" value="post" />
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- <parameter name="module" value="DataChange" />
- <parameter name="rpc" value="sotn-notification-handler" />
- <parameter name="mode" value="sync" />
- </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>
- </outcome>
- <outcome value='delete'>
- <block atomic="true"></block>
- </outcome>
- </switch>
- </block>
- </method>
+<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" mode="sync">
+ <block atomic="true">
+ <switch test="`$prop.sdncRestApi.vendor == 'ZTE'`">
+ <outcome value="false">
+ <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.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 + '/actokentemplate.json'`"/>
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <outcome value="success">
+ <set>
+ <parameter name="prop.sdncRestApi.token_id" value="`$token-result.data.token_id`"/>
+ </set>
+ </outcome>
+ <outcome value="failure">
+ <block></block>
+ </outcome>
+ </execute>
+ <switch test="`$prop.sdncRestApi.token_id`">
+ <outcome value="">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <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"/>
+ </return>
+ </outcome>
+ <outcome value="success">
+ <block atomic="true">
+ <for index="nidx" start="0" end="`$topology.networks.network_length`">
+ <block>
+ <set>
+ <parameter name="network." value="`$topology.networks.network[$nidx].`"/>
+ </set>
+ <call module="DataChange" rpc="update-network-to-aai" mode="sync"></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value="Other">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`"/>
+ <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"/>
+ </return>
+ </outcome>
+ <outcome value="success">
+ <block atomic="true">
+ <for index="nidx" start="0" end="`$topology.networks.network_length`">
+ <block>
+ <set>
+ <parameter name="network." value="`$topology.networks.network[$nidx].`"/>
+ </set>
+ <call module="DataChange" rpc="update-network-to-aai" mode="sync"></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="input" value="ietf-subscribed-notifications:establish-subscription.input."/>
+ <parameter name="`$input + 'encoding'`" value="encode-json"/>
+ </set>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode" method="establishSubscription">
+ <parameter name="subscriberId" value="sotn-controller"/>
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`"/>
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`"/>
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`"/>
+ <parameter name="sseConnectURL" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`"/>
+ <parameter name="dirPath" value="/opt/sdnc/restconfapi/yang/notification"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`"/>
+ <parameter name="module" value="DataChange"/>
+ <parameter name="rpc" value="sotn-notification-handler"/>
+ <parameter name="mode" value="sync"/>
+ </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>
+ </outcome>
+ <outcome value="delete">
+ <block atomic="true"/>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="true">
+ <call module="DataChange" rpc="esr-thirdparty-sdnc-of-zte" mode="sync"></call>
+ </outcome>
+ </switch>
+ </block>
+ </method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml
index 25fef6b2..e98dc7b6 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-of-zte.xml
@@ -1,64 +1,66 @@
<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-of-zte' mode='sync'>
- <block atomic="true">
- <call module='DataChange' rpc='validate-esr-thirdparty-sdnc-input' mode='sync'></call>
- <for index='idx' start='0' end='`$data-change-notification-input.key-data_length`'>
- <block>
- <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'service-url'`'>
- <outcome value='true'>
- <set>
- <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.url' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
- </set>
- </outcome>
- </switch>
- <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'user-name'`'>
- <outcome value='true'>
- <set>
- <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.user' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
- </set>
- </outcome>
- </switch>
- <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'password'`'>
- <outcome value='true'>
- <set>
- <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.password' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
- </set>
- </outcome>
- </switch>
- <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'esr-system-info-id'`'>
- <outcome value='true'>
- <set>
- <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.system-info-id' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
- </set>
- </outcome>
- </switch>
- <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'thirdparty-sdnc-id'`'>
- <outcome value='true'>
- <set>
- <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.id' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
- </set>
- </outcome>
- </switch>
- <switch test='`$data-change-notification-input.key-data[$idx].key-name == 'type'`'>
- <outcome value='true'>
- <set>
- <parameter name='zte.prop.sdncRestApi.type' value='`$data-change-notification-input.key-data[$idx].key-value`'/>
- </set>
- </outcome>
- </switch>
+ 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-of-zte' mode='sync'>
+ <block atomic='true'>
+ <set>
+ <parameter name='prop.zte.sdncRestApi.vendor' value='`$prop.sdncRestApi.vendor`' />
+ </set>
+ <for index='idx' start='0' end='`$data-change-notification-input.key-data_length`' >
+ <block>
+ <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'service-url'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.url' value='`$data-change-notification-input.key-data[$idx].key-value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'user-name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.user' value='`$data-change-notification-input.key-data[$idx].key-value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'password'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.password' value='`$data-change-notification-input.key-data[$idx].key-value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'esr-system-info-id'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.system-info-id' value='`$data-change-notification-input.key-data[$idx].key-value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'thirdparty-sdnc-id'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.thirdpartySdnc.id' value='`$data-change-notification-input.key-data[$idx].key-value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$data-change-notification-input.key-data[$idx].key-name == 'type'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='zte.prop.sdncRestApi.type' value='`$data-change-notification-input.key-data[$idx].key-value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/zte.svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="data-change-notification"/>
+ <parameter name="field3" value="Config"/>
+ <parameter name="field4" value="`service-url`"/>
+ <parameter name="field5" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url`"/>
+ </record>
+ <call module='DataChange' rpc='esr-thirdparty-sdnc-discovery-of-zte' mode='sync' ></call>
</block>
- </for>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/opendaylight/current/data/log/zte.svclogic.log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="data-change-notification"/>
- <parameter name="field3" value="Config"/>
- <parameter name="field4" value="`service-url`"/>
- <parameter name="field5" value="`$zte.prop.sdncRestApi.thirdpartySdnc.url`"/>
- </record>
- <call module='DataChange' rpc='esr-thirdparty-sdnc-discovery-of-zte' mode='sync'></call>
- </block>
- </method>
+ </method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml
index c2e75d22..15ac4016 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc.xml
@@ -68,4 +68,4 @@
<call module='DataChange' rpc='esr-thirdparty-sdnc-discovery' mode='sync' ></call>
</block>
</method>
-</service-logic>
+</service-logic> \ No newline at end of file