diff options
author | Zhuoyao Huang <10112215@zte.com.cn> | 2018-10-22 09:45:28 +0800 |
---|---|---|
committer | Zhuoyao Huang <10112215@zte.com.cn> | 2018-10-22 09:45:28 +0800 |
commit | a30bb1f74c1e3762e9b84688e7003a428b9b7575 (patch) | |
tree | 5e91a56c0dac5986d30e3a28514445305f4ac80d /platform-logic/generic-resource-api/src/main/xml | |
parent | 9310f04aab4fe7ec87d634f9e223559888b2ca0d (diff) |
wan-connection bug fix for ccvpn
Issue-ID: SDNC-354
Change-Id: I3f867b657b2f86f4c2ee0b49580d2cfad1bdd6d9
Signed-off-by: Zhuoyao Huang <10112215@zte.com.cn>
Former-commit-id: 75163854e97cc1d7fc71df510c8ea6c4458e537e
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
2 files changed, 910 insertions, 195 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 index fbae8f81..0b1ff5a9 100644 --- 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 @@ -2,216 +2,702 @@ <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"> + <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"> + <return status="success"> + <parameter name="ack-final-indicator" value="Y"/> + <parameter name="error-code" value="200"/> + <parameter name="error-message" value="`$error-message`"/> + </return> + </outcome> + <outcome value="false"> + <block atomic="true"> <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> <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"/> + <parameter name="tmp.found-network-input" 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 index="pidx" start="0" end="`$service-data.networks.network_length`"> + <switch test="`$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"> + <set> + <parameter name="tmp.pidx" value="`$pidx`"/> + <parameter name="tmp.network." value="`$service-data.networks.network[$pidx].`"/> + <parameter name="tmp.network-input-parameters" value="`$service-data.networks.network[$pidx].network-data.network-request-input.network-input-parameters`"/> + <parameter name="tmp.found-network-input" value="true"/> + </set> + </outcome> + </switch> </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"/> + </block> + <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"> + <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="sotn"/> + <outcome value="true"> + <block> + <block atomic="true"> + <set> + <parameter name="sotnFcPortListLength" value="0"/> + </set> + <for index="sIdx" start="0" end="`$service-data.networks.network_length`"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains"> + <parameter name="source" value="`$service-data.networks.network[$sIdx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="sotn"/> + <outcome value="true"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains"> + <parameter name="source" value="`$service-data.networks.network[$sIdx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="FcPort"/> + <outcome value="true"> + <block atomic="true"> + <set> + <parameter name="tmp.sotnFcPortList[`$sotnFcPortListLength`]" value="`$sIdx`"/> + </set> + <for index="paramIdx" start="0" end="`$service-data.networks.network[$sIdx].network-data.network-request-input.network-input-parameters.param_length`"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains"> + <parameter name="source" value="`$service-data.networks.network[$sIdx].network-data.network-request-input.network-input-parameters.param[$paramIdx].name`"/> + <parameter name="target" value="address"/> + <outcome value="true"> + <block atomic="true"> + <set> + <parameter name="sotnFcPortAddress" value="`$service-data.networks.network[$sIdx].network-data.network-request-input.network-input-parameters.param[$paramIdx].value`"/> + </set> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="restapiUrl" value="`$prop.oss.url + '/oss/inventory?location=' + $sotnFcPortAddress`"/> + <parameter name="format" value="json"/> + <parameter name="customHttpHeaders" value="X-FromAppId=MSO"/> + <parameter name="httpMethod" value="GET"/> + <parameter name="responsePrefix" value="temp.oss.accessTPs"/> + <outcome value="success"> + <switch test="`$temp.oss.accessTPs_length`"> + <outcome value="Other"> + <block atomic="true"> + <switch test="`$temp.accessTPs_length`"> + <outcome value=""> + <set> + <parameter name="tp_length" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="tp_length" value="`$temp.accessTPs_length`"/> + </set> + </outcome> + </switch> + <for index="idx" start="0" end="`$temp.oss.accessTPs_length`"> + <set> + <parameter name="`temp.accessTPs[$idx + $tp_length].`" value="`$temp.oss.accessTPs[$idx].`"/> + </set> + </for> + <set> + <parameter name="temp.accessTPs_length" value="`$temp.accessTPs_length + $temp.oss.accessTPs_length`"/> + </set> + </block> + </outcome> + </switch> + </outcome> + </execute> + </block> + </outcome> + </execute> + </for> + </block> + </outcome> + </execute> + </outcome> + </execute> + </for> + </block> + <switch test="`$temp.accessTPs_length >= 2`"> + <outcome value="true"> + <block atomic="true"> + <set> + <parameter name="prop.connection-attachment.access-topology-id" value="`$temp.accessTPs[0].access-topology-id`"/> + <parameter name="prop.connection-attachment.access-client-id" value="`$temp.accessTPs[0].access-client-id`"/> + <parameter name="prop.connection-attachment.access-provider-id" value="`$temp.accessTPs[0].access-provider-id`"/> + <parameter name="prop.connection-attachment.access-node-id" value="`$temp.accessTPs[0].access-node-id`"/> + <parameter name="prop.connection-attachment.access-ltp-id" value="`$temp.accessTPs[0].access-ltp-id`"/> + <parameter name="prop.remote.connection-attachment.access-topology-id" value="`$temp.accessTPs[1].access-topology-id`"/> + <parameter name="prop.remote.connection-attachment.access-client-id" value="`$temp.accessTPs[1].access-client-id`"/> + <parameter name="prop.remote.connection-attachment.access-provider-id" value="`$temp.accessTPs[1].access-provider-id`"/> + <parameter name="prop.remote.connection-attachment.access-node-id" value="`$temp.accessTPs[1].access-node-id`"/> + <parameter name="prop.remote.connection-attachment.access-ltp-id" value="`$temp.accessTPs[1].access-ltp-id`"/> + </set> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.oof-getpath.templatefile`"/> + <parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`"/> + <parameter name="restapiUser" value="`$prop.oof.user`"/> + <parameter name="restapiPassword" value="`$prop.oof.password`"/> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="post"/> + <parameter name="responsePrefix" value="oof"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.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"></outcome> + <outcome value="success"> + <for index="vidx" start="0" end="`$oof.vpns_length`"> + <block atomic="true"> + <set> + <parameter name="oof.vpn." value="`$oof.vpns[$vidx].`"/> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $oof.vpn.access-node-id AND depth = '0'" pfx="tmp.aai.pnf" local-only="false"> + <outcome value="success"> + <set> + <parameter name="tmp.thirdparty-sdnc-id" value="`$tmp.aai.pnf.relationship-list.relationship[0].relationship-data[0].relationship-value`"/> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`"/> + </return> + </outcome> + <outcome value="Other"> + <return status="failure"> + <parameter name="ack-final" value="Y"/> + <parameter name="error-code" value="500"/> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`"/> + </return> + </outcome> + </get-resource> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false"> + <outcome value="success"> + <set> + <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`"/> + </set> + </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="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`"/> + </return> + </outcome> + <outcome value="Other"> + <return status="failure"> + <parameter name="ack-final" value="Y"/> + <parameter name="error-code" value="500"/> + <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`"/> + </return> + </outcome> + </get-resource> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sotn-api-ConnectivityService.json'`"/> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ZTE-API-ConnectivityService:create-connectivity-service'`"/> + <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="patch"/> + <parameter name="responsePrefix" value="vpn-result"/> + <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.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"/> + </outcome> + </execute> + </block> + </for> + </outcome> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + <outcome value="false"> + <block atomic="true"> + <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 == 'thirdPartySdncId'`"> + <outcome value="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = `$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value` AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false"> + <outcome value="success"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="true"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`"/> + </set> + </outcome> + <outcome value="not-found"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="false"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="false"/> + </set> + </outcome> + </get-resource> + </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 == '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 == '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.prop.thirdpartySdnc-found == 'true' and $tmp.templateFileName-found == 'true' and `$tmp.prop.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"> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="templateFileName" value="`$tmp.templateFileName`"/> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + $tmp.restapiUrl`"/> + <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"/> + <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> + </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> - </outcome> - <outcome value="true"> - <switch test="`$tmp.restapiUser-found == 'true'`"> + </block> + </outcome> + </execute> + </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"> + <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: 3rd party controller restapiUser not found"/> + <parameter name="error-message" value="Error: Network input parameters 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'`"> + <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 == 'thirdPartySdncId'`"> + <outcome value="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = `$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value` AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false"> + <outcome value="success"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="true"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`"/> + </set> + </outcome> + <outcome value="not-found"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="false"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="false"/> + </set> + </outcome> + </get-resource> + </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 == '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 == '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.prop.thirdpartySdnc-found == 'true' and $tmp.templateFileName-found == 'true' and `$tmp.prop.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"> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="templateFileName" value="`$tmp.templateFileName`"/> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + $tmp.restapiUrl`"/> + <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"/> + <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> + </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> + </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="FcPort"/> + <outcome value="true"> + <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="sitewan"/> + <outcome value="true"> + <block atomic="true"> + <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: 3rd party controller templateFileName not found"/> + <parameter name="error-message" value="Error: Network input parameters 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> + <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 == 'thirdPartySdncId'`"> + <outcome value="true"> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="esr-thirdparty-sdnc" key="esr-thirdparty-sdnc.thirdparty-sdnc-id = `$tmp.network.network-data.network-topology.network-parameters.network-parameter[$cxid].network-parameter-value` AND depth = '1'" pfx="tmp.aai.esr-thirdparty-sdnc" local-only="false"> + <outcome value="success"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="true"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`"/> + <parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`"/> + </set> + </outcome> + <outcome value="not-found"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="false"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="prop.thirdpartySdnc-found" value="false"/> + </set> + </outcome> + </get-resource> + </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 == '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 == '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.prop.thirdpartySdnc-found == 'true' and $tmp.templateFileName-found == 'true' and `$tmp.prop.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"> + <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest"> + <parameter name="templateFileName" value="`$tmp.templateFileName`"/> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + $tmp.restapiUrl`"/> + <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"/> + <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> + </block> </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> + <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> + </outcome> + <outcome value="false"> + <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> + </outcome> + </execute> + </outcome> + <outcome value="false"> + <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> + </outcome> + </execute> + </outcome> + </execute> + </outcome> + </execute> + </block> + </outcome> + </execute> </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 index 61453eaf..d3b24d43 100644 --- 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 @@ -25,28 +25,257 @@ <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> + <block atomic="true"> + <switch test="`$service-data.networks.network_length`"> + <outcome value=""> + <set> + <parameter name="nidx" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="nidx" value="`$service-data.networks.network_length`"/> + </set> + </outcome> + </switch> + <set> + <parameter name="service-data.networks.network[$nidx].network-id" value="`$network-topology-operation-input.network-information.network-id`"/> + <parameter name="service-data.networks.network[$nidx].network-data.sdnc-request-header." value="`$network-topology-operation-input.sdnc-request-header.`"/> + <parameter name="service-data.networks.network[$nidx].network-data.request-information." value="`$network-topology-operation-input.request-information.`"/> + <parameter name="service-data.networks.network[$nidx].network-data.service-information." value="`$network-topology-operation-input.service-information.`"/> + <parameter name="service-data.networks.network[$nidx].network-data.network-information." value="`$network-topology-operation-input.network-information.`"/> + <parameter name="service-data.networks.network[$nidx].network-data.network-request-input." value="`$network-topology-operation-input.network-request-input.`"/> + <parameter name="service-data.networks.network_length" value="`$nidx+1`"/> + </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="FC"/> <outcome value="true"> - <call module="GENERIC-RESOURCE-API" rpc="wan-connection-find-specifications" mode="sync"></call> + <block atomic="true"> + <switch test="`$service-data.networks.network_length`"> + <outcome value=""> + <set> + <parameter name="nidx" value="0"/> + <parameter name="isExist" value="false"/> + </set> + </outcome> + <outcome value="Other"> + <block> + <set> + <parameter name="nidx" value="`$service-data.networks.network_length`"/> + <parameter name="isExist" value="false"/> + </set> + <for index="idx" start="0" end="`$nidx`"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains" emitsOutcome="true"> + <parameter name="source" value="`$service-data.networks.network[$idx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="specification"/> + <outcome value="true"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains" emitsOutcome="true"> + <parameter name="source" value="`$service-data.networks.network[$idx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/> + <outcome value="true"> + <block atomic="true"> + <set> + <parameter name="nidx" value="`$idx`"/> + <parameter name="isExist" value="true"/> + </set> + <switch test="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param_length`"> + <outcome value=""> + <set> + <parameter name="param_length" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="param_length" value="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param_length`"/> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"> + <outcome value=""> + <set> + <parameter name="input_param_length" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="input_param_length" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"/> + </set> + </outcome> + </switch> + <for index="pidx" start="0" end="`$param_length`"> + <set> + <parameter name="network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx+$input_param_length]." value="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx].`"/> + </set> + </for> + <set> + <parameter name="network-topology-operation-input.network-request-input.network-input-parameters.param_length" value="`$input_param_length + $param_length`"/> + </set> + </block> + </outcome> + </execute> + </outcome> + </execute> + </for> + </block> + </outcome> + </switch> + </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"> - <call module="GENERIC-RESOURCE-API" rpc="wan-connection-find-specifications" mode="sync"></call> + <block atomic="true"> + <switch test="`$service-data.networks.network_length`"> + <outcome value=""> + <set> + <parameter name="nidx" value="0"/> + <parameter name="isExist" value="false"/> + </set> + </outcome> + <outcome value="Other"> + <block> + <set> + <parameter name="nidx" value="`$service-data.networks.network_length`"/> + <parameter name="isExist" value="false"/> + </set> + <for index="idx" start="0" end="`$nidx`"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains" emitsOutcome="true"> + <parameter name="source" value="`$service-data.networks.network[$idx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="specification"/> + <outcome value="true"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains" emitsOutcome="true"> + <parameter name="source" value="`$service-data.networks.network[$idx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/> + <outcome value="true"> + <block atomic="true"> + <set> + <parameter name="nidx" value="`$idx`"/> + <parameter name="isExist" value="true"/> + </set> + <switch test="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param_length`"> + <outcome value=""> + <set> + <parameter name="param_length" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="param_length" value="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param_length`"/> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"> + <outcome value=""> + <set> + <parameter name="input_param_length" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="input_param_length" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"/> + </set> + </outcome> + </switch> + <for index="pidx" start="0" end="`$param_length`"> + <set> + <parameter name="network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx+$input_param_length]." value="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx].`"/> + </set> + </for> + <set> + <parameter name="network-topology-operation-input.network-request-input.network-input-parameters.param_length" value="`$input_param_length + $param_length`"/> + </set> + </block> + </outcome> + </execute> + </outcome> + </execute> + </for> + </block> + </outcome> + </switch> + </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="Link"/> + <parameter name="target" value="FcPort"/> <outcome value="true"> - <call module="GENERIC-RESOURCE-API" rpc="wan-connection-route-calculation" mode="sync"></call> + <block atomic="true"> + <switch test="`$service-data.networks.network_length`"> + <outcome value=""> + <set> + <parameter name="nidx" value="0"/> + <parameter name="isExist" value="false"/> + </set> + </outcome> + <outcome value="Other"> + <block> + <set> + <parameter name="nidx" value="`$service-data.networks.network_length`"/> + <parameter name="isExist" value="false"/> + </set> + <for index="idx" start="0" end="`$nidx`"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains" emitsOutcome="true"> + <parameter name="source" value="`$service-data.networks.network[$idx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="specification"/> + <outcome value="true"> + <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="contains" emitsOutcome="true"> + <parameter name="source" value="`$service-data.networks.network[$idx].network-data.network-information.onap-model-information.model-name`"/> + <parameter name="target" value="`$network-topology-operation-input.network-information.onap-model-information.model-name`"/> + <outcome value="true"> + <block atomic="true"> + <set> + <parameter name="nidx" value="`$idx`"/> + <parameter name="isExist" value="true"/> + </set> + <switch test="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param_length`"> + <outcome value=""> + <set> + <parameter name="param_length" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="param_length" value="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param_length`"/> + </set> + </outcome> + </switch> + <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"> + <outcome value=""> + <set> + <parameter name="input_param_length" value="0"/> + </set> + </outcome> + <outcome value="Other"> + <set> + <parameter name="input_param_length" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`"/> + </set> + </outcome> + </switch> + <for index="pidx" start="0" end="`$param_length`"> + <set> + <parameter name="network-topology-operation-input.network-request-input.network-input-parameters.param[$pidx+$input_param_length]." value="`$service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx].`"/> + </set> + </for> + <set> + <parameter name="network-topology-operation-input.network-request-input.network-input-parameters.param_length" value="`$input_param_length + $param_length`"/> + </set> + </block> + </outcome> + </execute> + </outcome> + </execute> + </for> + </block> + </outcome> + </switch> + </block> </outcome> <outcome value="false"> <block></block> |