diff options
Diffstat (limited to 'ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_network-topology-operation-create.xml')
-rw-r--r-- | ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_network-topology-operation-create.xml | 565 |
1 files changed, 0 insertions, 565 deletions
diff --git a/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_network-topology-operation-create.xml b/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_network-topology-operation-create.xml deleted file mode 100644 index b3e2b21..0000000 --- a/ms/generic-resource-api/src/test/resources/svclogic/GENERIC-RESOURCE-API_network-topology-operation-create.xml +++ /dev/null @@ -1,565 +0,0 @@ -<?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" />
- <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 == 'serviceType'`">
- <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>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $prop.l3vpn.pe1_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.l3vpn.pe1_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.l3vpn.pe1_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.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.entry1-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.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>
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID">
- <parameter name="ctx-destination" value="prop.l3vpn.network-id" />
- </execute>
- <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>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic.log" />
- <parameter name="field1" value="__TIMESTAMP__" />
- <parameter name="field2" value="network-topology-operation-create" />
- <parameter name="field3" value="L3VPN-Config" />
- <parameter name="field4" value="`l3vpn.name`" />
- <parameter name="field5" value="`$prop.l3vpn.name`" />
- <parameter name="field6" value="`l3vpn.topology`" />
- <parameter name="field7" value="`$prop.l3vpn.topology`" />
- <parameter name="field8" value="`l3vpn.site1_name`" />
- <parameter name="field9" value="`$prop.l3vpn.site1_name`" />
- <parameter name="field10" value="`l3vpn.vpn-policy1-id`" />
- <parameter name="field11" value="`$prop.l3vpn.vpn-policy1-id`" />
- <parameter name="field12" value="`l3vpn.entry1-id`" />
- <parameter name="field13" value="`$prop.l3vpn.entry1-id`" />
- <parameter name="field14" value="`l3vpn.sna1_name`" />
- <parameter name="field15" value="`$prop.l3vpn.sna1_name`" />
- <parameter name="field16" value="`l3vpn.pe1_id`" />
- <parameter name="field17" value="`$prop.l3vpn.pe1_id`" />
- <parameter name="field18" value="`l3vpn.ac1_id`" />
- <parameter name="field19" value="`$prop.l3vpn.ac1_id`" />
- <parameter name="field20" value="`l3vpn.ac1_svlan`" />
- <parameter name="field21" value="`$prop.l3vpn.ac1_svlan`" />
- <parameter name="field22" value="`l3vpn.ac1_peer_ip`" />
- <parameter name="field23" value="`$prop.l3vpn.ac1_peer_ip`" />
- <parameter name="field24" value="`l3vpn.ac1_ip`" />
- <parameter name="field25" value="`$prop.l3vpn.ac1_ip`" />
- <parameter name="field26" value="`l3vpn.ac1_protocol`" />
- <parameter name="field27" value="`$prop.l3vpn.ac1_protocol`" />
- <parameter name="field28" value="`l3vpn.sna1-route-ip-prefix`" />
- <parameter name="field29" value="`$prop.l3vpn.sna1-route-ip-prefix`" />
- <parameter name="field30" value="`l3vpn.sna1-route-next-hop`" />
- <parameter name="field31" value="`$prop.l3vpn.sna1-route-next-hop`" />
- <parameter name="field32" value="`l3vpn.peer1_ip`" />
- <parameter name="field33" value="`$prop.l3vpn.peer1_ip`" />
- <parameter name="field34" value="`l3vpn.ac1_protocol_bgp_as`" />
- <parameter name="field35" value="`$prop.l3vpn.ac1_protocol_bgp_as`" />
- <parameter name="field36" value="`l3vpn.vrf1-id`" />
- <parameter name="field37" value="`$prop.l3vpn.vrf1-id`" />
- <parameter name="field38" value="`l3vpn.site2_name`" />
- <parameter name="field39" value="`$prop.l3vpn.site2_name`" />
- <parameter name="field40" value="`l3vpn.vpn-policy2-id`" />
- <parameter name="field41" value="`$prop.l3vpn.vpn-policy2-id`" />
- <parameter name="field42" value="`l3vpn.entry2-id`" />
- <parameter name="field43" value="`$prop.l3vpn.entry2-id`" />
- <parameter name="field44" value="`l3vpn.sna2_name`" />
- <parameter name="field45" value="`$prop.l3vpn.sna2_name`" />
- <parameter name="field46" value="`l3vpn.pe2_id`" />
- <parameter name="field47" value="`$prop.l3vpn.pe2_id`" />
- <parameter name="field48" value="`l3vpn.ac2_id`" />
- <parameter name="field49" value="`$prop.l3vpn.ac2_id`" />
- <parameter name="field50" value="`l3vpn.ac2_svlan`" />
- <parameter name="field51" value="`$prop.l3vpn.ac2_svlan`" />
- <parameter name="field52" value="`l3vpn.ac2_peer_ip`" />
- <parameter name="field53" value="`$prop.l3vpn.ac2_peer_ip`" />
- <parameter name="field54" value="`l3vpn.ac2_ip`" />
- <parameter name="field55" value="`$prop.l3vpn.ac2_ip`" />
- <parameter name="field56" value="`l3vpn.ac2_protocol`" />
- <parameter name="field57" value="`$prop.l3vpn.ac2_protocol`" />
- <parameter name="field58" value="`l3vpn.sna2-route-ip-prefix`" />
- <parameter name="field59" value="`$prop.l3vpn.sna2-route-ip-prefix`" />
- <parameter name="field60" value="`l3vpn.sna2-route-next-hop`" />
- <parameter name="field61" value="`$prop.l3vpn.sna2-route-next-hop`" />
- <parameter name="field62" value="`l3vpn.peer2_ip`" />
- <parameter name="field63" value="`$prop.l3vpn.peer2_ip`" />
- <parameter name="field64" value="`l3vpn.ac2_protocol_bgp_as`" />
- <parameter name="field65" value="`$prop.l3vpn.ac2_protocol_bgp_as`" />
- <parameter name="field66" value="`l3vpn.vrf2-id`" />
- <parameter name="field67" value="`$prop.l3vpn.vrf2-id`" />
- <parameter name="field68" value="`l3vpn.af_type`" />
- <parameter name="field69" value="`$prop.l3vpn.af_type`" />
- </record>
- <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>
- <switch test="`$prop.l3vpn.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.restapi.templateDir + '/actokentemplate.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
- <parameter name="format" value="json" />
- <parameter name="httpMethod" value="post" />
- <parameter name="responsePrefix" value="token-result" />
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks" />
- <parameter name="trustStorePassword" value="adminadmin" />
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12" />
- <parameter name="keyStorePassword" value="adminadmin" />
- <outcome value="success">
- <set>
- <parameter name="prop.sdncRestApi.token_id" value="`$token-result.data.token_id`" />
- </set>
- </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 executing get token rest api" />
- </return>
- </outcome>
- </execute>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/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="vpn-result" />
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.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>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l3smvrftemplate.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/huawei-ac-net-l3vpn-svc-vfi:vrf-attributes'`" />
- <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="put" />
- <parameter name="responsePrefix" value="vrf-result" />
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.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="success">
- <block atomic="true" />
- </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 executing Create vrf rest api" />
- </return>
- </outcome>
- </execute>
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/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="site-result" />
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.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="success">
- <block atomic="true" />
- </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 executing Create site rest api" />
- </return>
- </outcome>
- </execute>
- </block>
- </outcome>
- <outcome value="l3vpn-sptn">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/sptn-l3vpn-template.xml'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/sptn-service-l3vpn:service/snc-l3vpns'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="xml" />
- <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>
- <set>
- <parameter name="service-data.networks.network[$nidx].network-id" value="`$prop.l3vpn.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>
- <set>
- <parameter name="pidx" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`" />
- </set>
- <set>
- <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx].name" value="vrf1_id" />
- <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx].value" value="`$prop.l3vpn.vrf1-id`" />
- <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx+1].name" value="vrf2_id" />
- <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx+1].value" value="`$prop.l3vpn.vrf2-id`d" />
- <parameter name="service-data.networks.network[$nidx].network_data.network-request-input.network-input-parameters.param_length" value="`$pidx+2`" />
- </set>
- <set>
- <parameter name="networkId" value="`$prop.l3vpn.network-id`" />
- <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.l3vpn.network-id + '/network-data/'` " />
- </set>
- <set>
- <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status" value="Created" />
- <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
- <parameter name="service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration" key="configuration.configuration-id = $prop.l3vpn.network-id">
- <parameter name="configuration-id" value="`$prop.l3vpn.network-id`" />
- <parameter name="configuration-type" value="underlay" />
- <parameter name="configuration-sub-type" value="l3vpn" />
- <parameter name="orchestration-status" value="Created" />
- <parameter name="operational-status" value="Created" />
- <parameter name="model-customization-id" value="`$prop.l3vpn.network-id`" />
- <parameter name="configuration-selflink" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.l3vpn.network-id + '/network-data/'` " />
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="service-instance:relationship-list" key="service-instance.service-instance-id = $service-data.service-information.service-instance-id AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type" force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="configuration" />
- <parameter name="relationship-list.relationship[0].related-link" value="`'/network/configurations/configuration/' + $prop.l3vpn.network-id`" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="configuration.configuration-id" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.l3vpn.network-id`" />
- </save>
- <return status="success">
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </method>
-</service-logic>
|