summaryrefslogtreecommitdiffstats
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:
authorGaurav Agrawal <gaurav.agrawal@huawei.com>2017-10-05 19:55:42 +0530
committerGaurav Agrawal <gaurav.agrawal@huawei.com>2017-10-05 14:35:45 +0000
commita26adc924eba86198fbf91e0932023fb2f79bb0d (patch)
tree774a7d766b48e272d09c76ffca4e92fc6dc08a3c /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml
parenta673f0efbde4ded7a48722aaa85b01775fb2dd95 (diff)
Deactivate flow modification for DCI
Changes includes: 1) Save network information SDNC's MD-SAL data store 2) Send network-id & network-object-path in network-topology-operation-output 3) Deactivation based on stored network-id Change-Id: I4498d33e9e7921e047bfe9dff8c9801153f5f5f4 Issue-Id: SDNC-113 Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com> Former-commit-id: 4d38cecf0f03e1244ca0c605c5802632b36f3b82
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.xml242
1 files changed, 164 insertions, 78 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
index 3a9e57dc..3de08ffe 100644
--- 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
@@ -3,89 +3,175 @@
<method rpc="dci-connects-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">
+ <block atomic="true">
+ <for index="idx" start="0" end="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param_length`">
+ <block>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'site1_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.dci-connects.id" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'tunnelType'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.dci-connects.tunnelType" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <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>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log" />
+ <parameter name="field1" value="__TIMESTAMP__" />
+ <parameter name="field2" value="dci-network-topology-operation-deactivate" />
+ <parameter name="field3" value="dci-connects.id" />
+ <parameter name="field4" value="`$prop.dci-connects.id`" />
+ <parameter name="field5" value="dci-connects.tunnelType" />
+ <parameter name="field6" value="`$prop.dci-connects.tunnelType`" />
+ <parameter name="field7" value="dci-connects.tunnelType" />
+ <parameter name="field8" value="`$prop.dci-connects.tunnelType`" />
+ <parameter name="field9" value="sdncRestApi.thirdpartySdnc.url" />
+ <parameter name="field10" value="`$prop.sdncRestApi.thirdpartySdnc.url`" />
+ </record>
+ <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.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.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>
+ </block>
+ <block atomic="true">
+ <for index="idx" start="0" end="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param_length`">
+ <block>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'site2_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.dci-connects.id" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <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.dci-connects.tunnelType" value="`$tmp.aai.dci-connects.dci-connects.serviceType`" />
+ <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>
- </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.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="network-topology-operation-deactivate" />
- <parameter name="field3" value="dci-connects.id" />
- <parameter name="field4" value="`$prop.dci-connects.id`" />
- <parameter name="field5" value="dci-connects.tunnelType" />
- <parameter name="field6" value="`$prop.dci-connects.tunnelType`" />
- </record>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log" />
+ <parameter name="field1" value="__TIMESTAMP__" />
+ <parameter name="field2" value="dci-network-topology-operation-deactivate" />
+ <parameter name="field3" value="dci-connects.id" />
+ <parameter name="field4" value="`$prop.dci-connects.id`" />
+ <parameter name="field5" value="dci-connects.tunnelType" />
+ <parameter name="field6" value="`$prop.dci-connects.tunnelType`" />
+ <parameter name="field7" value="dci-connects.tunnelType" />
+ <parameter name="field8" value="`$prop.dci-connects.tunnelType`" />
+ <parameter name="field9" value="sdncRestApi.thirdpartySdnc.url" />
+ <parameter name="field10" value="`$prop.sdncRestApi.thirdpartySdnc.url`" />
+ </record>
+ <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.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.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>
+ </block>
<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`" />
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.sdnc-request-header." value="`$network-topology-operation-input.sdnc-request-header.`" />
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.request-information." value="`$network-topology-operation-input.request-information.`" />
+ </set>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
+ </set>
+ <set>
+ <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $networkId + '/network-data/network-topology/'` " />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status" value="Deleted" />
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
+ <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
</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.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.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" />