diff options
author | ramu.n <ramu.n@huawei.com> | 2017-09-29 11:06:42 +0530 |
---|---|---|
committer | ramu.n <ramu.n@huawei.com> | 2017-09-29 11:12:59 +0530 |
commit | 7857803caf2b274c5e1ee817e1c2032908cd57f5 (patch) | |
tree | a57987e97776df33744eb810f7b217a1473fae9d /platform-logic/generic-resource-api/src/main/xml | |
parent | 5ba894fb3888bc9a0a9d25e85232b2674815ec51 (diff) |
Update underlay DG for VoLTE use case
*Replace openecomp schema with onap
*fix plugin references
*fix svc-action type issue
*Add rest call for site & vrf configuration
*Get ip-prfix & next-hop from route string
Change-Id: I697fb76ab42a7fcb304df19733ac50eef7953f4f
Issue-Id: SDNC-105
Signed-off-by: Ramu N <ramu.n@huawei.com>
Former-commit-id: 3948576d2ce46e492cfead3efd0aa883c280bd30
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
3 files changed, 764 insertions, 507 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml index e24a9ef3..08a49199 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml @@ -1,142 +1,382 @@ -<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-create' mode='sync'>
-<block atomic="true">
-<call module='GENERIC-RESOURCE-API' rpc='validate-network-input-parameters' mode='sync' >
-</call><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'>
-<block atomic="true"></block></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="Network model is_bound_to_vpn=true but no vpn_binding is present" />
-
-</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 retrieving vpn binding" />
-
-</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><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.l3vpn.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 == 'service-type'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.service-type' 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 == 'topology'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.topology' 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 == 'technology'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.technology' 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_name'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.site1_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 == 'site2_name'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.site2_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 == 'sna1_name'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.sna1_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 == 'sna2_name'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.sna2_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 == 'pe1_id'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.pe1_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 == 'pe2_id'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.pe2_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 == 'ac1_id'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac1_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 == 'ac2_id'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac2_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 == 'ac1_ip'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac1_ip' 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 == 'ac2_ip'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac2_ip' 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 == 'ac1_peer_ip'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac1_peer_ip' 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 == 'ac2_peer_ip'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac2_peer_ip' 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 == 'ac1_svlan'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac1_svlan' 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 == 'ac2_svlan'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac2_svlan' 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 == 'ac1_protocol'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac1_protocol' 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 == 'ac2_protocol'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.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 == 'ac1_protocol_bgp_as'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac1_protocol_bgp_as' 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 == 'ac2_protocol_bgp_as'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.ac1_protocol_bgp_as' 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 == 'af_type'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.af_type' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
-</set></outcome></switch></block></for><execute plugin='com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils' method='generateUUID' >
-<parameter name="ctx-destination" value="prop.l3vpn.vpn-policy-id"/>
-<outcome value='failure'>
-<return status='failure'>
-<parameter name='error-code' value='' />
-<parameter name='error-message' value="An error occured while generation vpn policy ID" />
-</return></outcome></execute><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
-<parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'"/>
-<parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'"/>
-<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><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
-<parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smsitetemplate.json'"/>
-<parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/sites'"/>
-<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></block></method></service-logic>
\ No newline at end of file +<?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="network-topology-operation-create" mode="sync">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-network-input-parameters" mode="sync" />
+ <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">
+ <block atomic="true" />
+ </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="Network model is_bound_to_vpn=true but no vpn_binding is present" />
+ </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 retrieving vpn binding" />
+ </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>
+ <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.l3vpn.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 == 'service-type'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.service-type" 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 == 'topology'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.topology" 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 == 'technology'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.technology" 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_name'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.site1_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 == 'site2_name'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.site2_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 == 'sna1_name'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.sna1_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 == 'sna2_name'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.sna2_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 == 'pe1_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.pe1_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 == 'pe2_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.pe2_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 == 'ac1_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac1_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 == 'ac2_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac2_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 == 'ac1_ip'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac1_ip" 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 == 'ac2_ip'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac2_ip" 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 == 'ac1_peer_ip'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac1_peer_ip" 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 == 'ac2_peer_ip'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac2_peer_ip" 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 == 'ac1_svlan'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac1_svlan" 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 == 'ac2_svlan'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac2_svlan" 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 == 'ac1_protocol'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac1_protocol" 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 == 'ac2_protocol'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac2_protocol" 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 == 'ac1_route'`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="prop.l3vpn.ac1_route" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="split">
+ <parameter name="original_string" value="`$prop.l3vpn.ac1-route`" />
+ <parameter name="regex" value=" ## " />
+ <parameter name="ctx_memory_result_key" value="route1" />
+ <outcome value="success">
+ <set>
+ <parameter name="prop.l3vpn.sna1-route.ip-prefix" value="`$route1[0]`" />
+ <parameter name="prop.l3vpn.sna1-route.next-hop" value="`$route1[1]`" />
+ </set>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="An error occured while splitting sna1_route" />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_route'`">
+ <outcome value="true">
+ <block atomic="true">
+ <set>
+ <parameter name="prop.l3vpn.ac2_route" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils" method="split">
+ <parameter name="original_string" value="`$prop.l3vpn.ac2-route`" />
+ <parameter name="regex" value=" ## " />
+ <parameter name="ctx_memory_result_key" value="route2" />
+ <outcome value="success">
+ <set>
+ <parameter name="prop.l3vpn.sna2-route.ip-prefix" value="`$route2[0]`" />
+ <parameter name="prop.l3vpn.sna2-route.next-hop" value="`$route2[1]`" />
+ </set>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="An error occured while splitting sna1_route" />
+ </return>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac1_protocol_bgp_as'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac1_protocol_bgp_as" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ <parameter name="prop.l3vpn.peer1-ip" value="`$prop.l3vpn.ac1_ip`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_protocol_bgp_as'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.ac2_protocol_bgp_as" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ <parameter name="prop.l3vpn.peer2-ip" value="`$prop.l3vpn.ac2_ip`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'af_type'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.af_type" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
+ <parameter name="ctx-destination" value="prop.l3vpn.vpn-policy1-id" />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="An error occured while generation vpn policy ID" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
+ <parameter name="ctx-destination" value="prop.l3vpn.vpn-policy2-id" />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="An error occured while generation vpn policy ID" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name="prop.l3vpn.entry1-id" value="1" />
+ <parameter name="prop.l3vpn.entry2-id" value="1" />
+ </set>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
+ <parameter name="ctx-destination" value="prop.l3vpn.vrf1-id" />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="An error occured while generation vpn policy ID" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
+ <parameter name="ctx-destination" value="prop.l3vpn.vrf2-id" />
+ <outcome value="failure">
+ <return status="failure">
+ <parameter name="error-code" value="" />
+ <parameter name="error-message" value="An error occured while generation vpn policy ID" />
+ </return>
+ </outcome>
+ </execute>
+ <record plugin="org.onap.ccsdk.sli.core.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-create" />
+ <parameter name="SubMethod" value="L3VPN-Config" />
+ <parameter name="l3vpn_name" value="`$prop.l3vpn.name`" />
+ <parameter name="topology" value="`$prop.l3vpn.topology`" />
+ <parameter name="site1_name" value="`$prop.l3vpn.site1_name`" />
+ <parameter name="vpn-policy1-id" value="`$prop.l3vpn.vpn-policy1-id}`" />
+ <parameter name="l3vpn.entry1-id" value="`$prop.l3vpn.entry1-id`" />
+ <parameter name="sna1_name" value="`$prop.l3vpn.sna1_name`" />
+ <parameter name="pe1_id" value="`$prop.l3vpn.pe1_id`" />
+ <parameter name="ac1_id" value="`$prop.l3vpn.ac1_id`" />
+ <parameter name="sna1_svlan" value="`$prop.l3vpn.sna1_svlan`" />
+ <parameter name="ac1-peer-ip" value="`$prop.l3vpn.ac1-peer-ip`" />
+ <parameter name="ac1-ip" value="`$prop.l3vpn.ac1-ip`" />
+ <parameter name="ac1_protocol" value="`$prop.l3vpn.ac1_protocol`" />
+ <parameter name="sna1-route-ip-prefix" value="`$prop.l3vpn.sna1-route-ip-prefix`" />
+ <parameter name="sna1-route-next-hop" value="`$prop.l3vpn.sna1-route-next-hop`" />
+ <parameter name="peer2-ip" value="`$prop.l3vpn.peer2-ip`" />
+ <parameter name="ac2_protocol_bgp_as" value="`$prop.l3vpn.ac2_protocol_bgp_as`" />
+ <parameter name="vrf1-id" value="`$prop.l3vpn.vrf1-id`" />
+ <parameter name="site2_name" value="`$prop.l3vpn.site2_name`" />
+ <parameter name="vpn-policy2-id" value="`$prop.l3vpn.vpn-policy2-id}`" />
+ <parameter name="l3vpn.entry2-id" value="`$prop.l3vpn.entry2-id`" />
+ <parameter name="sna2_name" value="`$prop.l3vpn.sna2_name`" />
+ <parameter name="pe2_id" value="`$prop.l3vpn.pe2_id`" />
+ <parameter name="ac2_id" value="`$prop.l3vpn.ac2_id`" />
+ <parameter name="sna2_svlan" value="`$prop.l3vpn.sna2_svlan`" />
+ <parameter name="ac2-peer-ip" value="`$prop.l3vpn.ac2-peer-ip`" />
+ <parameter name="ac2-ip" value="`$prop.l3vpn.ac2-ip`" />
+ <parameter name="ac2_protocol" value="`$prop.l3vpn.ac2_protocol`" />
+ <parameter name="sna2-route-ip-prefix" value="`$prop.l3vpn.sna2-route-ip-prefix`" />
+ <parameter name="sna2-route-next-hop" value="`$prop.l3vpn.sna2-route-next-hop`" />
+ <parameter name="peer2-ip" value="`$prop.l3vpn.peer2-ip`" />
+ <parameter name="ac2_protocol_bgp_as" value="`$prop.l3vpn.ac2_protocol_bgp_as`" />
+ <parameter name="vrf2-id" value="`$prop.l3vpn.vrf2-id`" />
+ <parameter name="af_type" value="`$prop.l3vpn.af_type`" />
+ </record>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'service-type'`">
+ <outcome value="l3vpn-ipwan">
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
+ <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'" />
+ <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>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
+ <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'" />
+ <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>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
+ <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'" />
+ <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>
+ </block>
+ </outcome>
+ <outcome value="true">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smsitetemplate.json'" />
+ <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url" />
+ <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="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Unexpected error retrieving vpn binding" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml index ca5fa9df..019f4dab 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml @@ -1,47 +1,64 @@ -<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-delete' mode='sync'>
-<block atomic="true">
-<call module='GENERIC-RESOURCE-API' rpc='validate-network-input-parameters' mode='sync' >
-</call><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.l3vpn.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 == 'service-type'`">
-<outcome value='true'>
-<set>
-<parameter name='prop.l3vpn.service-type' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
-</set></outcome></switch></block></for><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'>
-<block atomic="true"></block></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="Network model is_bound_to_vpn=true but no vpn_binding is present" />
-
-</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 retrieving vpn binding" />
-
-</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.l3vpn.service-type`">
-<outcome value='l3vpn-ipwan'>
-<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
-<parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'"/>
-<parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services/vpnservice='+$prop.l3vpn.name'"/>
-<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></method></service-logic>
\ No newline at end of file +<?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="network-topology-operation-delete" 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`">
+ <block>
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.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 == 'service-type'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.service-type" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <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">
+ <block atomic="true" />
+ </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="Network model is_bound_to_vpn=true but no vpn_binding is present" />
+ </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 retrieving vpn binding" />
+ </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.l3vpn.service-type`">
+ <outcome value="l3vpn-ipwan">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'" />
+ <parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services/vpnservice='+$prop.l3vpn.name'" />
+ <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>
+ </method>
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml index 56325af1..367abdfa 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-network-input-parameters.xml @@ -1,319 +1,319 @@ <?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="validate-network-input-parameters" mode="sync">
- <block atomic="true">
- <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
- </return>
- </outcome>
- </switch>
- <switch test="`$service-topology-operation-input.sdnc-request-header.svc-action`">
- <outcome value="assign">
- <block atomic="true">
- <switch test="`$network-topology-operation-input.request-information.request-action`">
- <outcome value="CreateNetworkInstance">
- <block atomic="true">
- <for index="i" start="0" end="`$network-topology-information.network-request-input.network-input-parameters.param_length`">
- <block>
- <set>
- <parameter name="tmp.name" value="" />
- <parameter name="tmp.value" value="" />
- </set>
- <set>
- <parameter name="tmp.name" value="'$network-topology-operation-input.network-request-input.network-input-parameters.param[i].name'" />
- <parameter name="tmp.value" value="'$network-topology-operation-input.network-request-input.network-input-parameters.param[i].value'" />
- </set>
- <switch test="'$tmp.name'">
- <outcome value="name">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="service-type">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="site1-name">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="site2-name">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="sna1_name">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="sna2_name">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="pe1_id">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="pe2_id">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac1-id">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac2-id">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac1-ip">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac2-ip">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac1_peer_ip">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac2_peer_ip">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac1_svlan">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="ac2_svlan">
- <switch test="`$tmp.value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
- </return>
- </outcome>
- </switch>
- </block>
- </for>
- </block>
- </outcome>
- <outcome value="Other">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
- <outcome value="activate">
- <switch test="`$network-topology-operation-input.request-information.request-action`">
- <outcome value="ActivateNetworkInstance">
- <block atomic="true">
- <call module="GENERIC-RESOURCE-API" rpc="validate-overlay-network-input-parameters" mode="sync" />
- </block>
- </outcome>
- <outcome value="Other">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="request-information.request-action is required to be ActivateNetworkInstance for svc-action=activate" />
- </return>
- </outcome>
- </switch>
- </outcome>
- <outcome value="deactivate">
- <block atomic="true">
- <outcome value="DeactivateNetworkInstance">
- <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].id == 'id'`">
- <outcome value="true">
- <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </block>
- </for>
- </block>
- </outcome>
- <outcome value="Other">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
- </return>
- </outcome>
- </block>
- </outcome>
- <outcome value="Other">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
- </return>
- </outcome>
- <outcome value="delete">
- <block atomic="true">
- <outcome value="DeleteNetworkInstance">
- <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">
- <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`">
- <outcome value="">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </block>
- </for>
- </block>
- </outcome>
- <outcome value="Other">
- <return status="failure">
- <parameter name="ack-final" value="Y" />
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
- </return>
- </outcome>
- </block>
- </outcome>
- </switch>
- </block>
- </method>
-</service-logic>
\ No newline at end of file +<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="validate-network-input-parameters" mode="sync">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test="`$service-topology-operation-input.sdnc-request-header.svc-action`">
+ <outcome value="create">
+ <block atomic="true">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="CreateNetworkInstance">
+ <block atomic="true">
+ <for index="i" start="0" end="`$network-topology-information.network-request-input.network-input-parameters.param_length`">
+ <block>
+ <set>
+ <parameter name="tmp.name" value="" />
+ <parameter name="tmp.value" value="" />
+ </set>
+ <set>
+ <parameter name="tmp.name" value="'$network-topology-operation-input.network-request-input.network-input-parameters.param[i].name'" />
+ <parameter name="tmp.value" value="'$network-topology-operation-input.network-request-input.network-input-parameters.param[i].value'" />
+ </set>
+ <switch test="'$tmp.name'">
+ <outcome value="name">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="service-type">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="site1-name">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="site2-name">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="sna1_name">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="sna2_name">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="pe1_id">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="pe2_id">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac1-id">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac2-id">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac1-ip">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac2-ip">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac1_peer_ip">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac2_peer_ip">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac1_svlan">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="ac2_svlan">
+ <switch test="`$tmp.value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'network-request-input.network-input-parameters.param '+ $tmp.name +' is a required input'" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=create" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value="activate">
+ <switch test="`$network-topology-operation-input.request-information.request-action`">
+ <outcome value="ActivateNetworkInstance">
+ <block atomic="true">
+ <call module="GENERIC-RESOURCE-API" rpc="validate-overlay-network-input-parameters" mode="sync" />
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be ActivateNetworkInstance for svc-action=activate" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value="deactivate">
+ <block atomic="true">
+ <outcome value="DeactivateNetworkInstance">
+ <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].id == 'id'`">
+ <outcome value="true">
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be DeactivateNetworkInstance for svc-action=deactivate" />
+ </return>
+ </outcome>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`$network-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`" />
+ </return>
+ </outcome>
+ <outcome value="delete">
+ <block atomic="true">
+ <outcome value="DeleteNetworkInstance">
+ <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">
+ <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`">
+ <outcome value="">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-request-input.network-input-parameters.name is a required input" />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="request-information.request-action is required to be DeleteNetworkInstance for svc-action=delete" />
+ </return>
+ </outcome>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
|