aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-28 14:45:34 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-28 14:45:34 +0000
commitf08e5bbafb168df633ca09e22e49659c79572837 (patch)
tree70a274e6e6a1919ce2a58a373f33894b495d98be /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml
parenta4777dd2463860764b5b298832889f27a553c8b6 (diff)
parent4d9351b103c6de276a716df637eac181584e3b95 (diff)
Merge "Update DG network-topology-operation-deactivate"
Former-commit-id: aa5d0ada80d9854beabbe52f82b16eb2f247aaa5
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml95
1 files changed, 95 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml
new file mode 100644
index 00000000..d9c3fbb3
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd" module="GENERIC-RESOURCE-API" version="${project.version}">
+ <method rpc="network-topology-operation-deactivate" mode="sync">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-network-input-parameters" mode="sync" />
+ <for index="idx" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`">
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.dci-connects.id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="dci-connects" key="dci-connects.id AND depth = '1'" pfx="tmp.aai.dci-connects" local-only="false">
+ <outcome value="success">
+ <set>
+ <parameter name="prop.dci-connects.tunnelType" value="`$tmp.aai.dci-connects.dci-connects.serviceType`" />
+ </set>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="" />
+ </return>
+ </outcome>
+ </get-resource>
+ <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log" />
+ <parameter name="Time" value="__TIMESTAMP__" />
+ <parameter name="Method" value="network-topology-operation-deactivate" />
+ <parameter name="SubMethod" value="l3-dci-connects" />
+ <parameter name="L3DciConnectsId" value="`$l3-dci-connects.id`" />
+ </record>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.dci-connects.id AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false">
+ <outcome value="success">
+ <block atomic="true" />
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.serviceUrl`" />
+ <parameter name="prop.sdncRestApi.templateDir" value="/opt/onap/sdnc/data" />
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.user-name`" />
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.password`" />
+ </set>
+ <switch test="`$prop.dci-connects.tunnelType`">
+ <outcome value="L3-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l3-dci-connects/' + $prop.l3-dci-connects.id" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="restapi-result" />
+ </execute>
+ </outcome>
+ <outcome value="L2-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l2-dci-connects/' + $prop.l2-dci-connects.id" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="restapi-result" />
+ </execute>
+ </outcome>
+ </switch>
+ </block>
+ <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