summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorZhuoyao Huang <10112215@zte.com.cn>2018-09-18 08:58:06 +0800
committerZhuoyao Huang <10112215@zte.com.cn>2018-09-18 14:52:30 +0800
commit29ae4c6b7b516eaac66bb359e6fcb3dad4a742a9 (patch)
tree1a4abf9b0264a856749e5cf4a1687f10f08529ca /platform-logic/generic-resource-api/src/main/xml
parentcac704d8cbfad8710a32a4d589ae1c9a0b054bdd (diff)
Support Wan Connection
(https://wiki.onap.org/display/DW/CCVPN+Integration+Test+Case) Issue-ID: SDNC-354 Change-Id: Ied7189a0f229442517761ec7f785655115af6722 Signed-off-by: Zhuoyao Huang <10112215@zte.com.cn> Former-commit-id: 0b8a0b4581dba2d55608c67ee95ebda356e1cf33
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-activate.xml217
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-create.xml68
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-deactivate.xml215
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-delete.xml81
4 files changed, 581 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-activate.xml
new file mode 100644
index 00000000..fbae8f81
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-activate.xml
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<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="GENERIC-RESOURCE-API" version="${project.version}">
+ <method rpc="wan-connection-topology-operation-activate" mode="sync">
+ <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.core.slipluginutils.SliStringUtils" method="replace">
+ <parameter name="source" value="`$prop.network-provided-resource`"/>
+ <parameter name="outputPath" value="tmp.services-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$network-topology-operation-input.service-information.service-id`"/>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.services-url`"/>
+ <parameter name="restapiUser" value="`$prop.controller.user`"/>
+ <parameter name="restapiPassword" value="`$prop.controller.pwd`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="GET"/>
+ <parameter name="responsePrefix" value="mdsal-psd"/>
+ <outcome value="success">
+ <block></block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: Parent service data not available"/>
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name="tmp.found-network-input" value="false"/>
+ </set>
+ <for index="pidx" start="0" end="`$mdsal-psd.service-data.networks.network_length`">
+ <switch test="`$mdsal-psd.service-data.networks.network[$pidx].network-data.network-information.onap-model-information.model-name == $network-topology-operation-input.network-information.onap-model-information.model-name`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.pidx" value="`$pidx`"/>
+ <parameter name="tmp.network." value="`$mdsal-psd.service-data.networks.network[$pidx].`"/>
+ <parameter name="tmp.network-input-parameters" value="`$mdsal-psd.service-data.networks.network[$pidx].network-data.network-request-input.network-input-parameters`"/>
+ <parameter name="tmp.found-network-input" value="true"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$found-network-input`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: Network input parameters not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.restapiUrl-found" value="false"/>
+ <parameter name="tmp.restapiUser-found" value="false"/>
+ <parameter name="tmp.restapiPassword-found" value="false"/>
+ <parameter name="tmp.templateFileName-found" value="false"/>
+ <parameter name="tmp.thirdPartyAdaptorRpc-found" value="false"/>
+ </set>
+ <for index="cidx" start="0" end="`$tmp.network.network-data.network-topology.network-parameters.network-parameter_length`">
+ <block>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'restapiUrl'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.restapiUrl" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.restapiUrl-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'restapiUser'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.restapiUser" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.restapiUser-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'restapiPassword'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.restapiPassword" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.restapiPassword-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'templateFileName'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.templateFileName" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.templateFileName-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'thirdPartyAdaptorRpc'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.thirdPartyAdaptorRpc" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.thirdPartyAdaptorRpc-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.thirdPartyAdaptorRpc-found == 'true'`">
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="`$tmp.thirdPartyAdaptorRpc`" mode="sync">
+ <outcome value="success">
+ <block></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 calling ' + $tmp.thirdPartyAdaptorRpc`"/>
+ </return>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Error calling ' + $tmp.thirdPartyAdaptorRpc`"/>
+ </return>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value="false">
+ <switch test="`$tmp.restapiUrl-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: 3rd party controller restapiUrl not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <switch test="`$tmp.restapiUser-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: 3rd party controller restapiUser not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <switch test="`$tmp.restapiPassword-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: 3rd party controller restapiPassword not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <switch test="`$tmp.templateFileName-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: 3rd party controller templateFileName not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$tmp.templateFileName`"/>
+ <parameter name="restapiUrl" value="`$tmp.restapiUrl`"/>
+ <parameter name="restapiUser" value="`$tmp.restapiUser`"/>
+ <parameter name="restapiPassword" value="`$tmp.restapiPassword`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="restApi-result"/>
+ <outcome value="success">
+ <block></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 calling ' + $tmp.restapiUrl`"/>
+ </return>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Error calling ' + $tmp.restapiUrl`"/>
+ </return>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </block>
+ </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>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-create.xml
new file mode 100644
index 00000000..61453eaf
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-create.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<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="GENERIC-RESOURCE-API" version="${project.version}">
+ <method rpc="wan-connection-topology-operation-create" mode="sync">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
+ <parameter name="ctx-destination" value="network-topology-operation-input.network-information.network-id"/>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value=""/>
+ <parameter name="error-message" value="An error occured while generation allotted resource ID"/>
+ </return>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value="Other"></outcome>
+ </switch>
+ <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.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="specification"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-save-specification" mode="sync"></call>
+ </outcome>
+ <outcome value="false">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="FC"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-find-specifications" mode="sync"></call>
+ </outcome>
+ <outcome value="false">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="FD"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-find-specifications" mode="sync"></call>
+ </outcome>
+ <outcome value="false">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="Link"/>
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="wan-connection-route-calculation" mode="sync"></call>
+ </outcome>
+ <outcome value="false">
+ <block></block>
+ </outcome>
+ </execute>
+ </outcome>
+ </execute>
+ </outcome>
+ </execute>
+ </outcome>
+ </execute>
+ <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>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-deactivate.xml
new file mode 100644
index 00000000..592fb65d
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-deactivate.xml
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<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="GENERIC-RESOURCE-API" version="${project.version}">
+ <method rpc="wan-connection-topology-operation-deactivate" mode="sync">
+ <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.core.slipluginutils.SliStringUtils" method="replace">
+ <parameter name="source" value="`$prop.network-provided-resource`"/>
+ <parameter name="outputPath" value="tmp.services-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$network-topology-operation-input.service-information.service-id`"/>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.services-url`"/>
+ <parameter name="restapiUser" value="`$prop.controller.user`"/>
+ <parameter name="restapiPassword" value="`$prop.controller.pwd`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="GET"/>
+ <parameter name="responsePrefix" value="mdsal-psd"/>
+ <outcome value="success">
+ <block></block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: Parent service data not available"/>
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name="tmp.found-network-input" value="false"/>
+ </set>
+ <for index="pidx" start="0" end="`$mdsal-psd.service-data.networks.network_length`">
+ <switch test="`$mdsal-psd.service-data.networks.network[$pidx].network-id == $network-topology-operation-input.network-information.network-id`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.pidx" value="`$pidx`"/>
+ <parameter name="tmp.network." value="`$mdsal-psd.service-data.networks.network[$pidx].`"/>
+ <parameter name="tmp.network-input-parameters" value="`$mdsal-psd.service-data.networks.network[$pidx].network-data.network-request-input.network-input-parameters`"/>
+ <parameter name="tmp.found-network-input" value="true"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$found-network-input`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: Network input parameters not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="tmp.restapiUrl-found" value="false"/>
+ <parameter name="tmp.restapiUser-found" value="false"/>
+ <parameter name="tmp.restapiPassword-found" value="false"/>
+ <parameter name="tmp.thirdPartyAdaptorRpc-found" value="false"/>
+ <parameter name="tmp.actualId-found" value="false"/>
+ </set>
+ <for index="cidx" start="0" end="`$tmp.network.network-data.network-topology.network-parameters.network-parameter_length`">
+ <block>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'restapiUrl-deactivate'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.restapiUrl" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.restapiUrl-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'restapiUser'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.restapiUser" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.restapiUser-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'restapiPassword'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.restapiPassword" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.restapiPassword-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'actualId'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.actualId" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.actualId-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-name == 'thirdPartyAdaptorRpc-deactivate'`">
+ <outcome value="true">
+ <set>
+ <parameter name="tmp.thirdPartyAdaptorRpc" value="`$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value`"/>
+ <parameter name="tmp.thirdPartyAdaptorRpc-found" value="true"/>
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.thirdPartyAdaptorRpc-found == 'true'`">
+ <outcome value="true">
+ <call module="GENERIC-RESOURCE-API" rpc="`$tmp.thirdPartyAdaptorRpc`" mode="sync">
+ <outcome value="success">
+ <block></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 calling ' + $tmp.thirdPartyAdaptorRpc`"/>
+ </return>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Error calling ' + $tmp.thirdPartyAdaptorRpc`"/>
+ </return>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value="false">
+ <switch test="`$tmp.restapiUrl-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: 3rd party controller restapiUrl not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <switch test="`$tmp.restapiUser-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: 3rd party controller restapiUser not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <switch test="`$tmp.restapiPassword-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: 3rd party controller restapiPassword not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <switch test="`$tmp.actualId-found == 'true'`">
+ <outcome value="false">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="404"/>
+ <parameter name="error-message" value="Error: Wan Connection actualId not found"/>
+ </return>
+ </outcome>
+ <outcome value="true">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$tmp.restapiUrl + $tmp.actualId`"/>
+ <parameter name="restapiUser" value="`$tmp.restapiUser`"/>
+ <parameter name="restapiPassword" value="`$tmp.restapiPassword`"/>
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="delete"/>
+ <outcome value="success">
+ <block></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 calling ' + $tmp.restapiUrl`"/>
+ </return>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y"/>
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Error calling ' + $tmp.restapiUrl`"/>
+ </return>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </block>
+ </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>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-delete.xml
new file mode 100644
index 00000000..9c24e525
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_wan-connection-topology-operation-delete.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<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="GENERIC-RESOURCE-API" version="${project.version}">
+ <method rpc="wan-connection-topology-operation-delete" mode="sync">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.network-information.network-id`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="error-code" value=""/>
+ <parameter name="error-message" value="An error occured while generation allotted resource ID"/>
+ </return>
+ </outcome>
+ <outcome value="Other"></outcome>
+ </switch>
+ <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.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="FC"/>
+ <outcome value="true">
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="wan-connection-topology-operation-delete"/>
+ <parameter name="field3" value="`$network-topology-operation-input.network-information.onap-model-information.model-name + ' delete'`"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="connectivity" key="connectivity.connectivity-id = $network-topology-operation-input.network-information.network-id"></delete>
+ <set>
+ <parameter name="service-data.networks.network_length" value="`$service-data.networks.network_length - 1`"/>
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$tmp.nidx]." value=""/>
+ </set>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`"/>
+ <parameter name="service-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/service-topology/'` "/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value="false">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains">
+ <parameter name="source" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/>
+ <parameter name="target" value="FD"/>
+ <outcome value="true">
+ <block atomic="true">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="wan-connection-topology-operation-delete"/>
+ <parameter name="field3" value="`$network-topology-operation-input.network-information.onap-model-information.model-name + ' delete'`"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="connectivity" key="connectivity.connectivity-id = $network-topology-operation-input.network-information.network-id"></delete>
+ <set>
+ <parameter name="service-data.networks.network_length" value="`$service-data.networks.network_length - 1`"/>
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$tmp.nidx]." value=""/>
+ </set>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`"/>
+ <parameter name="service-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/service-topology/'` "/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value="false">
+ <block></block>
+ </outcome>
+ </execute>
+ </outcome>
+ </execute>
+ <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>