diff options
author | 2017-09-28 18:23:44 +0530 | |
---|---|---|
committer | 2017-09-28 18:23:44 +0530 | |
commit | 3d0d25cce16ec10496dbe324e635f051a4ebad34 (patch) | |
tree | b27a61a2f220b9ff4260eeeac025a5f70e744468 /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml | |
parent | be72599d4037a6968cfba75d824c5c14a57bd556 (diff) |
Updated DG for network-topology-operation-activate
Following changes are included:
1) Handle l2 and l3 dci.
2) Handle 2 sites data keeping rest node template generic.
3) Fetch 3rd parth controller information using site-id.
Change-Id: I6d075cab2c7850197d91bd4e707c10c579458d48
Issue-Id: SDNC-104
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Former-commit-id: 93b36edae1b14165ebd9c0fc9bbbe916c725790a
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml | 218 |
1 files changed, 218 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml new file mode 100644 index 00000000..a13d6497 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml @@ -0,0 +1,218 @@ +<?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-activate" mode="sync"> + <block atomic="true"> + <call module="GENERIC-RESOURCE-API" rpc="validate-network-input-parameters" mode="sync" /> + <block atomic="true"> + <block atomic="true"> + <for index="idx" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"> + <block> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.name" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" /> + </set> + </outcome> + </switch> + <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> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_description'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.description" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_networkName'`"> + <outcome value="true" /> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_routerId'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.router_id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_importRT1'`"> + <outcome value="true" /> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_exportRT1'`"> + <outcome value="true" /> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_vni'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.vni" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'tunnelType'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.tunnelType" value="`$network-topology-operation-input.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> + <switch test="`$prop.dci-connects.tunnelType`"> + <outcome value="L3-DCI"> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3-dci-connects-template.json'" /> + <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l3-dci-connects'" /> + <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="post" /> + <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="templateFileName" value="$prop.sdncRestApi.tempDir +'/l2-dci-connects-template.json'" /> + <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l2-dci-connects'" /> + <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="post" /> + <parameter name="responsePrefix" value="restapi-result" /> + </execute> + </outcome> + </switch> + </block> + </block> + <block atomic="true"> + <for index="idx" start="0" end="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"> + <block> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_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> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_description'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.description" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" /> + </set> + </outcome> + <outcome value="false"> + <set> + <parameter name="prop.dci-connects.description" value="" /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_networkName'`"> + <outcome value="true" /> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_routerId'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.router_id" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" /> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_importRT1'`"> + <outcome value="true" /> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_exportRT1'`"> + <outcome value="true" /> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_vni'`"> + <outcome value="true"> + <set> + <parameter name="prop.dci-connects.vni" value="`$network-topology-operation-input.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> + <switch test="`$prop.dci-connects.tunnelType`"> + <outcome value="L3-DCI"> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3-dci-connects-template.json'" /> + <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l3-dci-connects'" /> + <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="post" /> + <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="templateFileName" value="$prop.sdncRestApi.tempDir +'/l2-dci-connects-template.json'" /> + <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l2-dci-connects'" /> + <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="post" /> + <parameter name="responsePrefix" value="restapi-result" /> + </execute> + </outcome> + </switch> + </block> + </block> + </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 |