diff options
author | Hesam Rahimi <hesam.rahimi@huawei.com> | 2021-12-14 21:24:28 -0500 |
---|---|---|
committer | Hesam Rahimi <hesam.rahimi@huawei.com> | 2021-12-14 21:24:28 -0500 |
commit | 65388f15b90ed88de1102db09a7fa17168e7d236 (patch) | |
tree | 96e78be706c7c8bc12ef5759285d4370b3ece673 /platform-logic/generic-resource-api/src/main/xml | |
parent | 09fcafbe6a01ae18abaf7211a21e1bd1cca10431 (diff) |
Support for 1+1 protection path for a cloud leased-line (CLL) service.
Issue-ID: SDNC-1653
Signed-off-by: Hesam Rahimi <hesam.rahimi@huawei.com>
Change-Id: I7839f07fea141cbcb585673744ba06fcc6f63ed6
Former-commit-id: 1f182c0213ea34d45e3255cd63f34a1ff3b1fca9
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
8 files changed, 3443 insertions, 541 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1-Activate-w-Protection.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1-Activate-w-Protection.xml new file mode 100644 index 00000000..97b72469 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1-Activate-w-Protection.xml @@ -0,0 +1,834 @@ +<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='cll-vnf-topology-operation-cll-F1-Activate-w-Protection' mode='sync'> + <block atomic="true"> + <set> + <parameter name='`leaf-tunnels-list.`' value='' /> + <parameter name='`leaf-tunnels-list_length`' value='0' /> + <parameter name='`leaftunsidx`' value='0' /> + </set> + <set> + <parameter name='tmp.aai.all-vpn-bindings.' value="" /> + </set> + <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> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="vpn-bindings" + key="selflink = 'https://aai.onap:8443/aai/v24/network/vpn-bindings" + local-only="false" + pfx="tmp.aai.all-vpn-bindings" > + <outcome value='success'> + <block atomic="true"> + <for index='vpnbidx' start='0' end='`$tmp.aai.all-vpn-bindings.vpn-binding_length`' > + <block atomic='true'> + <block atomic='true'> + <set> + <parameter name='tmp.aai.vpn-binding.' value="" /> + </set> + <set> + <parameter name='tmp.aai.vpn-binding.' value="`$tmp.aai.all-vpn-bindings.vpn-binding[$vpnbidx].`" /> + </set> + <switch test="`$tmp.aai.vpn-binding.operational-status != 'Activated' `"> + <outcome value='true'> + <block atomic="true"> + <set> + <parameter name='gfp-n' value='`$tmp.aai.vpn-binding.route-distinguisher`' /> + </set> + <switch test='`$tmp.aai.vpn-binding.dst-access-ltp-id`'> + <outcome value='Other'> + <switch test='`$tmp.aai.vpn-binding.src-access-ltp-id`'> + <outcome value=''> + <block atomic="true"> + <set> + <parameter name='tmp.aai.vpn-bindingA.' value="`$tmp.aai.vpn-binding.`" /> + <parameter name='tmp.aai.connectivityA.' value="`$tmp.aai.connectivity.`" /> + </set> + <set> + <parameter name='src-node-id' value='`$tmp.aai.vpn-bindingA.src-access-node-id`' /> + <parameter name='dst-node-id' value='`$tmp.aai.vpn-bindingA.dst-access-node-id`' /> + <!--<parameter name='dst-tpn-id' value='1' />--> + <parameter name='dst-tpn-id' value='`$tmp.aai.vpn-bindingA.customer-vpn-id`' /> + <parameter name='dst-ttp-id' value='`$tmp.aai.vpn-bindingA.dst-access-ltp-id`' /> + <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + <parameter name='otn-tunnel-name-src-domain' value='`$tmp.aai.vpn-bindingA.vpn-name`' /> + <parameter name='client-id' value='`$tmp.aai.vpn-bindingA.access-client-id`' /> + <parameter name='provider-id' value='`$tmp.aai.vpn-bindingA.access-provider-id`' /> + <parameter name='topology-id' value='`$tmp.aai.vpn-bindingA.access-topology-id`' /> + </set> + <set> + <parameter name='tmp.src.domainA.pnf-name' value="`'networkId-providerId-' + + $tmp.aai.vpn-bindingA.access-provider-id + '-clientId-' + + $tmp.aai.vpn-bindingA.access-client-id + '-topologyId-' + + $tmp.aai.vpn-bindingA.access-topology-id + '-nodeId-' + + $tmp.aai.vpn-bindingA.src-access-node-id`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.src.domainA.pnf-name" + pfx='tmp.aai.source-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.source-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainA.esr-thirdparty-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainA.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainA.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.url' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.user' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainA.password' value="`$tmp.aai.domainA.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.cll-otn-src-domain-creation.templatefile`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.url + '/restconf/data/ietf-te:te'`" /> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainA.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="patch"/> + <parameter name="responsePrefix" value="otn-oof"/> + <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 OTN tunnel rest api" /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $tmp.aai.vpn-bindingA.vpn-id' > + <parameter name='vpn-id' value='`$tmp.aai.vpn-bindingA.vpn-id`' /> + <parameter name='vpn-name' value='`$tmp.aai.vpn-bindingA.vpn-name`' /> + <parameter name='operational-status' value='Activated' /> + </update> + <set> + <parameter name='`leaf-tunnels-list[$leaftunsidx].tunnel-name`' value='`$tmp.aai.vpn-binding.vpn-name`' /> + <parameter name='`leaf-tunnels-list[$leaftunsidx].vpn-id`' value='`$tmp.aai.vpn-binding.vpn-id`' /> + <parameter name='`leaf-tunnels-list_length`' value='`$leaftunsidx + 1`' /> + </set> + <set> + <parameter name='`leaftunsidx`' value='`$leaftunsidx + 1`' /> + </set> + </block> + </outcome> + <outcome value='Other'> + <block atomic="true"> + <set> + <parameter name='tmp.aai.vpn-bindingG.' value="`$tmp.aai.vpn-binding.`" /> + <parameter name='tmp.aai.connectivityG.' value="`$tmp.aai.connectivity.`" /> + </set> + <set> + <parameter name='src-node-id' value='`$tmp.aai.vpn-bindingG.src-access-node-id`' /> + <parameter name='dst-node-id' value='`$tmp.aai.vpn-bindingG.dst-access-node-id`' /> + <!--<parameter name='dst-tpn-id' value='1' />--> + <parameter name='src-tpn-id' value='`$tmp.aai.vpn-bindingG.customer-vpn-id`' /> + <parameter name='dst-tpn-id' value='`$tmp.aai.vpn-bindingG.customer-vpn-id`' /> + <parameter name='src-ttp-id' value='`$tmp.aai.vpn-bindingG.src-access-ltp-id`' /> + <parameter name='dst-ttp-id' value='`$tmp.aai.vpn-bindingG.dst-access-ltp-id`' /> + <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + <parameter name='otn-tunnel-name-domainG' value='`$tmp.aai.vpn-bindingG.vpn-name`' /> + <parameter name='client-id' value='`$tmp.aai.vpn-bindingG.access-client-id`' /> + <parameter name='provider-id' value='`$tmp.aai.vpn-bindingG.access-provider-id`' /> + <parameter name='topology-id' value='`$tmp.aai.vpn-bindingG.access-topology-id`' /> + </set> + <set> + <parameter name='tmp.domainG.pnf-name' value="`'networkId-providerId-' + + $tmp.aai.vpn-bindingG.access-provider-id + '-clientId-' + + $tmp.aai.vpn-bindingG.access-client-id + '-topologyId-' + + $tmp.aai.vpn-bindingG.access-topology-id + '-nodeId-' + + $tmp.aai.vpn-bindingG.src-access-node-id`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.domainG.pnf-name" + pfx='tmp.aai.domainG-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.domainG-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.domainG-pnf.relationship-list.relationship[$spvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainG.esr-thirdparty-id' value="`$tmp.aai.domainG-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainG.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainG.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.url' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.user' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.password' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.cll-otn-domainG-creation.templatefile`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainG.url + '/restconf/data/ietf-te:te'`" /> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainG.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainG.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="patch"/> + <parameter name="responsePrefix" value="otn-oof"/> + <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 OTN tunnel rest api" /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $tmp.aai.vpn-bindingG.vpn-id' > + <parameter name='vpn-id' value='`$tmp.aai.vpn-bindingG.vpn-id`' /> + <parameter name='vpn-name' value='`$tmp.aai.vpn-bindingG.vpn-name`' /> + <parameter name='operational-status' value='Activated' /> + </update> + </block> + </outcome> + </switch> + </outcome> + <outcome value=''> + <switch test='`$tmp.aai.vpn-binding.src-access-ltp-id`'> + <outcome value='Other'> + <block atomic="true"> + <set> + <parameter name='tmp.aai.vpn-bindingB.' value="`$tmp.aai.vpn-binding.`" /> + <parameter name='tmp.aai.connectivityB.' value="`$tmp.aai.connectivity.`" /> + </set> + <set> + <parameter name='src-node-id' value='`$tmp.aai.vpn-bindingB.src-access-node-id`' /> + <parameter name='dst-node-id' value='`$tmp.aai.vpn-bindingB.dst-access-node-id`' /> + <!--<parameter name='src-tpn-id' value='1' />--> + <parameter name='src-tpn-id' value='`$tmp.aai.vpn-bindingB.customer-vpn-id`' /> + <parameter name='src-ttp-id' value='`$tmp.aai.vpn-bindingB.src-access-ltp-id`' /> + <parameter name='slice-instance-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + <parameter name='otn-tunnel-name-dst-domain' value='`$tmp.aai.vpn-bindingB.vpn-name`' /> + <parameter name='client-id' value='`$tmp.aai.vpn-bindingB.access-client-id`' /> + <parameter name='provider-id' value='`$tmp.aai.vpn-bindingB.access-provider-id`' /> + <parameter name='topology-id' value='`$tmp.aai.vpn-bindingB.access-topology-id`' /> + </set> + <set> + <parameter name='tmp.dst.domainB.pnf-name' value="`'networkId-providerId-' + + $tmp.aai.vpn-bindingB.access-provider-id + '-clientId-' + + $tmp.aai.vpn-bindingB.access-client-id + '-topologyId-' + + $tmp.aai.vpn-bindingB.access-topology-id + '-nodeId-' + + $tmp.aai.vpn-bindingB.dst-access-node-id`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.dst.domainB.pnf-name" + pfx='tmp.aai.destination-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='dpvidx' start='0' end='`$tmp.aai.destination-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainB.esr-thirdparty-id' value="`$tmp.aai.destination-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainB.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainB.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.url' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.user' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainB.password' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.cll-otn-dst-domain-creation.templatefile`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.url + '/restconf/data/ietf-te:te'`" /> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainB.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="patch"/> + <parameter name="responsePrefix" value="otn-oof"/> + <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 OTN tunnel rest api" /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </execute> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $tmp.aai.vpn-bindingB.vpn-id' > + <parameter name='vpn-id' value='`$tmp.aai.vpn-bindingB.vpn-id`' /> + <parameter name='vpn-name' value='`$tmp.aai.vpn-bindingB.vpn-name`' /> + <parameter name='operational-status' value='Activated' /> + </update> + <set> + <parameter name='`root-tunnels-list[$roottunsidx].tunnel-name`' value='`$tmp.aai.vpn-binding.vpn-name`' /> + <parameter name='`root-tunnels-list[$roottunsidx].vpn-id`' value='`$tmp.aai.vpn-binding.vpn-id`' /> + <parameter name='`root-tunnels-list_length`' value='`$roottunsidx + 1`' /> + </set> + <set> + <parameter name='`roottunsidx`' value='`$roottunsidx + 1`' /> + </set> + </block> + </outcome> + <outcome value=''> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + </switch> + </outcome> + </switch> + </block> + </outcome> + <outcome value='false'> + <block></block> + </outcome> + </switch> + </block> + </block> + </for> + </block> + </outcome> + <outcome value='not-found'></outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + </get-resource> + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="service-instance"--> + <!-- key='service-instance.service-instance-id = $service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.service-instance-id--> + <!-- AND customer.global-customer-id = $service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.global-customer-id --> + <!-- AND service-subscription.service-type = $service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.subscription-service-type'--> + <!-- local-only="false"--> + <!-- force="true" pfx="tmp.aai.service-instance">--> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="service-instance" + key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id + AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id + AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type' + local-only="false" + force="true" pfx="tmp.aai.service-instance"> + <!--$vnf-topology-operation-input.service-information.service-instance-id--> + <outcome value='success'> + <for index='rel-index' start='0' end='`$tmp.aai.service-instance.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.service-instance.relationship-list.relationship[$rel-index].related-to`'> + <outcome value='connectivity'> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="connectivity" + key="connectivity.connectivity-id = $tmp.aai.service-instance.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value" + local-only="false" + pfx="tmp.aai.connectivity" > + <outcome value='success'> + <switch test="`$tmp.aai.connectivity.operational-status != 'Activated' `"> + <outcome value='false'> + <block></block> + </outcome> + <outcome value='true'> + <block atomic="true"> + <switch test="`$tmp.aai.connectivity.vpn-type != 'mdsc' `"> + <outcome value='true'> + <block> + <set> + <parameter name='`ethernet-srv-end-points-list.`' value='' /> + <parameter name='`ethernet-srv-end-points-list_length`' value='0' /> + <parameter name='`epidx`' value='0' /> + </set> + <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> + <outcome value='uni'> + <block atomic="true"> + <set> + <parameter name='tmp.aai.uni.' value='' /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="uni" + key="uni.id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" + local-only="false" + pfx="tmp.aai.uni" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </get-resource> + <switch test="`$tmp.aai.uni.type`"> + <outcome value='leaf'> + <block> + <set> + <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:leaf-access' /> + </set> + </block> + </outcome> + <outcome value='root'> + <block> + <set> + <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:root-primary' /> + </set> + </block> + </outcome> + <outcome value='secondary-root'> + <block> + <set> + <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:root-backup' /> + </set> + </block> + </outcome> + <outcome value='Other'> + <block></block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.uni.id`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-uni"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.uni-node-id-short' value='`$param-prefix-uni[$param-prefix-uni_length -4]`' /> + </set> + </block> + </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> + <set> + <!--<parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.connectivity.connectivity-id`' />--> + <parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.uni.id`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].index-number`' value='0' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-id`' value='`$tmp.uni-node-id-short`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-tp-id`' value='`$tmp.aai.uni.tp-id`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].leafOrRootAccess`' value='`$leafOrRootAccess`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].cvlan`' value='`$tmp.aai.connectivity.cvlan`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].CIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].EIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> + <parameter name='`ethernet-srv-end-points-list_length`' value='`$epidx + 1`' /> + </set> + <set> + <parameter name='`epidx`' value='`$epidx + 1`' /> + </set> + </block> + </outcome> + </switch> + </for> + <set> + <parameter name='filenameclleths' value="`$leafOrRootAccess + $tmp.aai.connectivity.access-node-id`" /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name="filename" value="`$filenameclleths`" /> + </execute> + <set> + <parameter name='`otn-tunnels-name-list.`' value='' /> + <parameter name='`otn-tunnels-name-list_length`' value='0' /> + <parameter name='`otntunsidx`' value='0' /> + </set> + <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> + <outcome value='vpn-binding'> + <block atomic="true"> + <set> + <parameter name='tmp.aai.vpn-binding.' value='' /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="vpn-binding" + key="vpn-binding.vpn-id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" + local-only="false" + pfx="tmp.aai.vpn-binding" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='`otn-tunnels-name-list[$otntunsidx].otn-tunnel-name`' value='`$tmp.aai.vpn-binding.vpn-name`' /> + <parameter name='`otn-tunnels-name-list[$otntunsidx].vpn-id`' value='`$tmp.aai.vpn-binding.vpn-id`' /> + <parameter name='`otn-tunnels-name-list_length`' value='`$otntunsidx + 1`' /> + </set> + <set> + <parameter name='`otntunsidx`' value='`$otntunsidx + 1`' /> + </set> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + <set> + <parameter name='filenamecllotns' value="`leafrootOTNtunnelnames`" /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name="filename" value="`$filenamecllotns`" /> + </execute> + <block atomic="true"> + <set> + <parameter name='tmp.pnf-name-forUrl' value="`'networkId-providerId-' + + $tmp.aai.connectivity.access-provider-id + '-clientId-' + + $tmp.aai.connectivity.access-client-id + '-topologyId-' + + $tmp.aai.connectivity.access-topology-id + '-nodeId-' + + $tmp.aai.connectivity.access-node-id`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.pnf-name-forUrl" + pfx='tmp.aai.source-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.source-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainConn.esr-thirdparty-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainConn.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainConn.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.url' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.user' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.password' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + <set> + <!--<parameter name='eth-service-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> + <parameter name='eth-service-name' value='`$tmp.aai.connectivity.etht-svc-name`' /> + <parameter name='slice-id' value='`$vnf-topology-operation-input.service-information.service-instance-id`' /> + <parameter name='provider-id' value='`$tmp.aai.connectivity.access-provider-id`' /> + <parameter name='client-id' value='`$tmp.aai.connectivity.access-client-id`' /> + <parameter name='topology-id' value='`$tmp.aai.connectivity.access-topology-id`' /> + <!--<parameter name='otn-tunnel-name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />--> + <!--<parameter name='ethernet-end-point-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> + <!--<parameter name='index-number' value='0' />--> + <!--<parameter name='eth-node-id' value='`$tmp.aai.connectivityA.access-node-id`' />--> + <!--<parameter name='eth-node-tp-id' value='`$tmp.aai.connectivityA.access-ltp-id`' />--> + <!--<parameter name='CIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> + <!--<parameter name='EIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> + <!--<parameter name='cvlan' value='`$tmp.aai.connectivityA.cvlan`' />--> + </set> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.cll-ethernet-service-loop-protection.templatefile`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" /> + <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />--> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="patch"/> + <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" /> + <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"/> + <outcome value='failure'></outcome> + <outcome value='success'> + <block atomic="true"> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'> + <parameter name='connectivity-id' value='`$tmp.aai.connectivity.connectivity-id`' /> + <parameter name='operational-status' value='Activated' /> + </update> + </block> + </outcome> + </execute> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </outcome> + <outcome value='not-found'></outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + </get-resource> + </outcome> + </switch> + </for> + </outcome> + <outcome value='not-found'></outcome> + <outcome value='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + </get-resource> + </block> + </method> +</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1-Activate.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1-Activate.xml index b2057862..662c46a9 100644 --- a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1-Activate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1-Activate.xml @@ -517,537 +517,294 @@ </outcome> <outcome value='true'> <block atomic="true"> - <switch test="`$tmp.aai.connectivity.vpn-type`"> - <outcome value='leaf'> - <block> - <set> - <parameter name='`ethernet-srv-end-points-list.`' value='' /> - <parameter name='`ethernet-srv-end-points-list_length`' value='0' /> - <parameter name='`epidx`' value='0' /> - </set> - <set> - <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:leaf-access' /> - </set> - <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > - <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> - <outcome value='uni'> - <block atomic="true"> + <block> + <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> + <outcome value='uni'> + <block atomic="true"> + <set> + <parameter name='tmp.aai.uni.' value='' /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="uni" + key="uni.id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" + local-only="false" + pfx="tmp.aai.uni" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"></block> + </outcome> + </get-resource> + <switch test="`$tmp.aai.uni.type`"> + <outcome value='leaf'> <set> - <parameter name='tmp.aai.uni.' value='' /> + <parameter name='`ethernet-srv-end-points-list.`' value='' /> + <parameter name='`ethernet-srv-end-points-list_length`' value='0' /> + <parameter name='`epidx`' value='0' /> </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="uni" - key="uni.id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" - local-only="false" - pfx="tmp.aai.uni" > - <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='failure'> - <return status='failure'> - <parameter name='error-code' value='' /> - <parameter name='error-message' value='' /> - </return> - </outcome> - <outcome value='success'> - <block atomic="true"></block> - </outcome> - </get-resource> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > - <parameter name="original_string" value='`$tmp.aai.uni.id`'/> - <!--<parameter name="regex" value="[^-]+$"/>--> - <parameter name="regex" value="[-]+"/> - <parameter name="ctx_memory_result_key" value="param-prefix-uni"/> - <outcome value='success'> - <block atomic="true"> - <set> - <parameter name='tmp.uni-node-id-short' value='`$param-prefix-uni[$param-prefix-uni_length -4]`' /> - </set> - </block> - </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> <set> - <!--<parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.connectivity.connectivity-id`' />--> - <parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.uni.id`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].index-number`' value='0' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-id`' value='`$tmp.uni-node-id-short`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-tp-id`' value='`$tmp.aai.uni.tp-id`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].leafOrRootAccess`' value='`$leafOrRootAccess`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].cvlan`' value='`$tmp.aai.connectivity.cvlan`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].CIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].EIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> - <parameter name='`ethernet-srv-end-points-list_length`' value='`$epidx + 1`' /> + <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:leaf-access' /> </set> + </outcome> + <outcome value='root'> <set> - <parameter name='`epidx`' value='`$epidx + 1`' /> + <parameter name='`ethernet-srv-end-points-list.`' value='' /> + <parameter name='`ethernet-srv-end-points-list_length`' value='0' /> + <parameter name='`epidx`' value='0' /> </set> - </block> - </outcome> - </switch> - </for> - <set> - <parameter name='filenameclleths' value="`$leafOrRootAccess + $tmp.aai.connectivity.access-node-id`" /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name="filename" value="`$filenameclleths`" /> - </execute> - <set> - <parameter name='`otn-tunnels-name-list.`' value='' /> - <parameter name='`otn-tunnels-name-list_length`' value='0' /> - <parameter name='`otntunsidx`' value='0' /> - </set> - <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > - <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> - <outcome value='vpn-binding'> - <block atomic="true"> - <set> - <parameter name='tmp.aai.vpn-binding.' value='' /> - </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="vpn-binding" - key="vpn-binding.vpn-id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" - local-only="false" - pfx="tmp.aai.vpn-binding" > - <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='failure'> - <return status='failure'> - <parameter name='error-code' value='' /> - <parameter name='error-message' value='' /> - </return> - </outcome> - <outcome value='success'> - <block atomic="true"> - <set> - <parameter name='`otn-tunnels-name-list[$otntunsidx].otn-tunnel-name`' value='`$tmp.aai.vpn-binding.vpn-name`' /> - <parameter name='`otn-tunnels-name-list[$otntunsidx].vpn-id`' value='`$tmp.aai.vpn-binding.vpn-id`' /> - <parameter name='`otn-tunnels-name-list_length`' value='`$otntunsidx + 1`' /> - </set> - <set> - <parameter name='`otntunsidx`' value='`$otntunsidx + 1`' /> - </set> - </block> - </outcome> - </get-resource> - </block> - </outcome> - </switch> - </for> - <set> - <parameter name='filenamecllotns' value="`leafrootOTNtunnelnames`" /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name="filename" value="`$filenamecllotns`" /> - </execute> - <block atomic="true"> - <set> - <parameter name='tmp.pnf-name-forUrl' value="`'networkId-providerId-' + - $tmp.aai.connectivity.access-provider-id + '-clientId-' + - $tmp.aai.connectivity.access-client-id + '-topologyId-' + - $tmp.aai.connectivity.access-topology-id + '-nodeId-' + - $tmp.aai.connectivity.access-node-id`" /> - </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="pnf" - key="pnf.pnf-name = $tmp.pnf-name-forUrl" - pfx='tmp.aai.source-pnf' local-only='false' > - <!--AND depth = '0'"--> - <outcome value='success'> - <block> - <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.source-pnf.relationship-list.relationship_length`' > - <switch test='`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].related-to`'> - <outcome value='esr-thirdparty-sdnc'> - <block atomic="true"> - <set> - <parameter name='tmp.domainConn.esr-thirdparty-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> - </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="esr-thirdparty-sdnc" - key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainConn.esr-thirdparty-id AND - depth = '1'" - pfx='tmp.aai.domainConn.esr-thirdparty-sdnc' local-only='false' > - <outcome value='success'> - <block> - <set> - <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.url' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.user' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.password' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> - <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> - <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> - <!--<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="get"/>--> - <!--<parameter name="responsePrefix" value="topology"/>--> - <!--<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"/>--> - </set> - </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - </get-resource> - </block> - </outcome> - </switch> - </for> - </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - </get-resource> - </block> - <set> - <!--<parameter name='eth-service-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> - <parameter name='eth-service-name' value='`$tmp.aai.connectivity.etht-svc-name`' /> - <parameter name='slice-id' value='`$vnf-topology-operation-input.service-information.service-instance-id`' /> - <parameter name='provider-id' value='`$tmp.aai.connectivity.access-provider-id`' /> - <parameter name='client-id' value='`$tmp.aai.connectivity.access-client-id`' /> - <parameter name='topology-id' value='`$tmp.aai.connectivity.access-topology-id`' /> - <!--<parameter name='otn-tunnel-name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />--> - <!--<parameter name='ethernet-end-point-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> - <!--<parameter name='index-number' value='0' />--> - <!--<parameter name='eth-node-id' value='`$tmp.aai.connectivityA.access-node-id`' />--> - <!--<parameter name='eth-node-tp-id' value='`$tmp.aai.connectivityA.access-ltp-id`' />--> - <!--<parameter name='CIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> - <!--<parameter name='EIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> - <!--<parameter name='cvlan' value='`$tmp.aai.connectivityA.cvlan`' />--> - </set> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.cll-ethernet-service-loop.templatefile`" /> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" /> - <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />--> - <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.user`" /> - <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.password`" /> - <parameter name="format" value="json"/> - <parameter name="httpMethod" value="patch"/> - <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" /> - <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"/> - <outcome value='failure'></outcome> - <outcome value='success'> - <block atomic="true"> - <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' - key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'> - <parameter name='connectivity-id' value='`$tmp.aai.connectivity.connectivity-id`' /> - <parameter name='operational-status' value='Activated' /> - </update> - </block> - </outcome> - </execute> - </block> - </outcome> - <outcome value='root'> - <block> - <set> - <parameter name='`ethernet-srv-end-points-list.`' value='' /> - <parameter name='`ethernet-srv-end-points-list_length`' value='0' /> - <parameter name='`epidx`' value='0' /> - </set> - <set> - <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:root-primary' /> - </set> - <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > - <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> - <outcome value='uni'> - <block atomic="true"> - <set> - <parameter name='tmp.aai.uni.' value='' /> - </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="uni" - key="uni.id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" - local-only="false" - pfx="tmp.aai.uni" > - <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='failure'> - <return status='failure'> - <parameter name='error-code' value='' /> - <parameter name='error-message' value='' /> - </return> - </outcome> - <outcome value='success'> - <block atomic="true"></block> - </outcome> - </get-resource> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > - <parameter name="original_string" value='`$tmp.aai.uni.id`'/> - <!--<parameter name="regex" value="[^-]+$"/>--> - <parameter name="regex" value="[-]+"/> - <parameter name="ctx_memory_result_key" value="param-prefix-uni"/> - <outcome value='success'> - <block atomic="true"> - <set> - <parameter name='tmp.uni-node-id-short' value='`$param-prefix-uni[$param-prefix-uni_length -4]`' /> - </set> - </block> - </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> <set> - <!--<parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.connectivity.connectivity-id`' />--> - <parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.uni.id`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].index-number`' value='0' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-id`' value='`$tmp.uni-node-id-short`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-tp-id`' value='`$tmp.aai.uni.tp-id`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].leafOrRootAccess`' value='`$leafOrRootAccess`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].cvlan`' value='`$tmp.aai.connectivity.cvlan`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].CIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> - <parameter name='`ethernet-srv-end-points-list[$epidx].EIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> - <parameter name='`ethernet-srv-end-points-list_length`' value='`$epidx + 1`' /> + <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:root-primary' /> </set> + </outcome> + <outcome value='root-secondary'> <set> - <parameter name='`epidx`' value='`$epidx + 1`' /> + <parameter name='`ethernet-srv-end-points-list.`' value='' /> + <parameter name='`ethernet-srv-end-points-list_length`' value='0' /> + <parameter name='`epidx`' value='0' /> </set> - </block> - </outcome> - </switch> - </for> - <set> - <parameter name='filenameclleths' value="`$leafOrRootAccess + $tmp.aai.connectivity.access-node-id`" /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name="filename" value="`$filenameclleths`" /> - </execute> - <set> - <parameter name='`otn-tunnels-name-list.`' value='' /> - <parameter name='`otn-tunnels-name-list_length`' value='0' /> - <parameter name='`otntunsidx`' value='0' /> - </set> - <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > - <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> - <outcome value='vpn-binding'> - <block atomic="true"> <set> - <parameter name='tmp.aai.vpn-binding.' value='' /> + <parameter name='`leafOrRootAccess`' value='ietf-eth-tran-types:root-secondary' /> </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="vpn-binding" - key="vpn-binding.vpn-id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" - local-only="false" - pfx="tmp.aai.vpn-binding" > - <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='failure'> - <return status='failure'> - <parameter name='error-code' value='' /> - <parameter name='error-message' value='' /> - </return> - </outcome> - <outcome value='success'> - <block atomic="true"> - <set> - <parameter name='`otn-tunnels-name-list[$otntunsidx].otn-tunnel-name`' value='`$tmp.aai.vpn-binding.vpn-name`' /> - <parameter name='`otn-tunnels-name-list[$otntunsidx].vpn-id`' value='`$tmp.aai.vpn-binding.vpn-id`' /> - <parameter name='`otn-tunnels-name-list_length`' value='`$otntunsidx + 1`' /> - </set> - <set> - <parameter name='`otntunsidx`' value='`$otntunsidx + 1`' /> - </set> - </block> - </outcome> - </get-resource> - </block> - </outcome> - </switch> - </for> - <set> - <parameter name='filenamecllotns' value="`leafrootOTNtunnelnames`" /> - </set> - <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > - <parameter name="filename" value="`$filenamecllotns`" /> - </execute> - <block atomic="true"> - <set> - <parameter name='tmp.pnf-name-forUrl' value="`'networkId-providerId-' + + </outcome> + <outcome value='Other'> + <block></block> + </outcome> + </switch> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.uni.id`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-uni"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.uni-node-id-short' value='`$param-prefix-uni[$param-prefix-uni_length -4]`' /> + </set> + </block> + </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> + <set> + <!--<parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.connectivity.connectivity-id`' />--> + <parameter name='`ethernet-srv-end-points-list[$epidx].ethernet-end-point-name`' value='`$tmp.aai.uni.id`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].index-number`' value='0' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-id`' value='`$tmp.uni-node-id-short`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].eth-node-tp-id`' value='`$tmp.aai.uni.tp-id`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].leafOrRootAccess`' value='`$leafOrRootAccess`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].cvlan`' value='`$tmp.aai.connectivity.cvlan`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].CIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> + <parameter name='`ethernet-srv-end-points-list[$epidx].EIR`' value='`$tmp.aai.uni.data-source * 1000000`' /> + <parameter name='`ethernet-srv-end-points-list_length`' value='`$epidx + 1`' /> + </set> + <set> + <parameter name='`epidx`' value='`$epidx + 1`' /> + </set> + </block> + </outcome> + </switch> + </for> + <set> + <parameter name='filenameclleths' value="`$leafOrRootAccess + $tmp.aai.connectivity.access-node-id`" /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name="filename" value="`$filenameclleths`" /> + </execute> + <set> + <parameter name='`otn-tunnels-name-list.`' value='' /> + <parameter name='`otn-tunnels-name-list_length`' value='0' /> + <parameter name='`otntunsidx`' value='0' /> + </set> + <for silentFailure='true' index='cridx' start='0' end='`$tmp.aai.connectivity.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.connectivity.relationship-list.relationship[$cridx].related-to`'> + <outcome value='vpn-binding'> + <block atomic="true"> + <set> + <parameter name='tmp.aai.vpn-binding.' value='' /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="vpn-binding" + key="vpn-binding.vpn-id = $tmp.aai.connectivity.relationship-list.relationship[$cridx].relationship-data[0].relationship-value" + local-only="false" + pfx="tmp.aai.vpn-binding" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='`otn-tunnels-name-list[$otntunsidx].otn-tunnel-name`' value='`$tmp.aai.vpn-binding.vpn-name`' /> + <parameter name='`otn-tunnels-name-list[$otntunsidx].vpn-id`' value='`$tmp.aai.vpn-binding.vpn-id`' /> + <parameter name='`otn-tunnels-name-list_length`' value='`$otntunsidx + 1`' /> + </set> + <set> + <parameter name='`otntunsidx`' value='`$otntunsidx + 1`' /> + </set> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + <set> + <parameter name='filenamecllotns' value="`leafrootOTNtunnelnames`" /> + </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' > + <parameter name="filename" value="`$filenamecllotns`" /> + </execute> + <block atomic="true"> + <set> + <parameter name='tmp.pnf-name-forUrl' value="`'networkId-providerId-' + $tmp.aai.connectivity.access-provider-id + '-clientId-' + $tmp.aai.connectivity.access-client-id + '-topologyId-' + $tmp.aai.connectivity.access-topology-id + '-nodeId-' + $tmp.aai.connectivity.access-node-id`" /> - </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="pnf" - key="pnf.pnf-name = $tmp.pnf-name-forUrl" - pfx='tmp.aai.source-pnf' local-only='false' > - <!--AND depth = '0'"--> - <outcome value='success'> - <block> - <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.source-pnf.relationship-list.relationship_length`' > - <switch test='`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].related-to`'> - <outcome value='esr-thirdparty-sdnc'> - <block atomic="true"> - <set> - <parameter name='tmp.domainConn.esr-thirdparty-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> - </set> - <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" - resource="esr-thirdparty-sdnc" - key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainConn.esr-thirdparty-id AND + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.pnf-name-forUrl" + pfx='tmp.aai.source-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.source-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainConn.esr-thirdparty-id' value="`$tmp.aai.source-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainConn.esr-thirdparty-id AND depth = '1'" - pfx='tmp.aai.domainConn.esr-thirdparty-sdnc' local-only='false' > - <outcome value='success'> - <block> - <set> - <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.url' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.user' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> - <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.password' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> - <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> - <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> - <!--<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="get"/>--> - <!--<parameter name="responsePrefix" value="topology"/>--> - <!--<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"/>--> - </set> - </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - </get-resource> - </block> - </outcome> - </switch> - </for> - </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - <outcome value='Other'> - <return status='failure'> - <parameter name='ack-final' value='Y'/> - <parameter name="error-code" value="500" /> - <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> - </return> - </outcome> - </get-resource> + pfx='tmp.aai.domainConn.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.url' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.user' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainConn.password' value="`$tmp.aai.domainConn.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + <set> + <!--<parameter name='eth-service-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> + <parameter name='eth-service-name' value='`$tmp.aai.connectivity.etht-svc-name`' /> + <parameter name='slice-id' value='`$vnf-topology-operation-input.service-information.service-instance-id`' /> + <parameter name='provider-id' value='`$tmp.aai.connectivity.access-provider-id`' /> + <parameter name='client-id' value='`$tmp.aai.connectivity.access-client-id`' /> + <parameter name='topology-id' value='`$tmp.aai.connectivity.access-topology-id`' /> + <!--<parameter name='otn-tunnel-name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />--> + <!--<parameter name='ethernet-end-point-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> + <!--<parameter name='index-number' value='0' />--> + <!--<parameter name='eth-node-id' value='`$tmp.aai.connectivityA.access-node-id`' />--> + <!--<parameter name='eth-node-tp-id' value='`$tmp.aai.connectivityA.access-ltp-id`' />--> + <!--<parameter name='CIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> + <!--<parameter name='EIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> + <!--<parameter name='cvlan' value='`$tmp.aai.connectivityA.cvlan`' />--> + </set> + <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > + <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.cll-ethernet-service-loop.templatefile`" /> + <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" /> + <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />--> + <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.user`" /> + <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.password`" /> + <parameter name="format" value="json"/> + <parameter name="httpMethod" value="patch"/> + <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" /> + <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"/> + <outcome value='failure'></outcome> + <outcome value='success'> + <block atomic="true"> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'> + <parameter name='connectivity-id' value='`$tmp.aai.connectivity.connectivity-id`' /> + <parameter name='operational-status' value='Activated' /> + </update> </block> - <set> - <!--<parameter name='eth-service-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> - <parameter name='eth-service-name' value='`$tmp.aai.connectivity.etht-svc-name`' /> - <parameter name='slice-id' value='`$vnf-topology-operation-input.service-information.service-instance-id`' /> - <parameter name='provider-id' value='`$tmp.aai.connectivity.access-provider-id`' /> - <parameter name='client-id' value='`$tmp.aai.connectivity.access-client-id`' /> - <parameter name='topology-id' value='`$tmp.aai.connectivity.access-topology-id`' /> - <!--<parameter name='otn-tunnel-name' value='`$tmp.aai.vpn-bindingA.vpn-name`' />--> - <!--<parameter name='ethernet-end-point-name' value='`$tmp.aai.connectivityA.connectivity-id`' />--> - <!--<parameter name='index-number' value='0' />--> - <!--<parameter name='eth-node-id' value='`$tmp.aai.connectivityA.access-node-id`' />--> - <!--<parameter name='eth-node-tp-id' value='`$tmp.aai.connectivityA.access-ltp-id`' />--> - <!--<parameter name='CIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> - <!--<parameter name='EIR' value='`$tmp.aai.vpn-bindingA.route-distinguisher *1000000`' />--> - <!--<parameter name='cvlan' value='`$tmp.aai.connectivityA.cvlan`' />--> - </set> - <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' > - <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/' + $prop.restapi.cll-ethernet-service-loop.templatefile`" /> - <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.url + '/restconf/data/ietf-eth-tran-service:etht-svc'`" /> - <!--<parameter name="restapiUrl" value="`$prop.restapi.connection-oof-url`" />--> - <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.user`" /> - <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.domainConn.password`" /> - <parameter name="format" value="json"/> - <parameter name="httpMethod" value="patch"/> - <parameter name='dirPath' value="/opt/onap/sdnc/restconfapi/yang" /> - <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"/> - <outcome value='failure'></outcome> - <outcome value='success'> - <block atomic="true"> - <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' - key='connectivity.connectivity-id = $tmp.aai.connectivity.connectivity-id'> - <parameter name='connectivity-id' value='`$tmp.aai.connectivity.connectivity-id`' /> - <parameter name='operational-status' value='Activated' /> - </update> - </block> - </outcome> - </execute> - </block> - </outcome> - <outcome value='Other'> - <block></block> - </outcome> - </switch> + </outcome> + </execute> + </block> </block> </outcome> </switch> diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1.xml index c0981140..a874168f 100644 --- a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1.xml +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-F1.xml @@ -208,6 +208,7 @@ <parameter name='connectivity-id' value='`$uuid.connectivity-otnidx-uuid`' /> <!--<parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' />--> <parameter name='operational-status' value='Created' /> + <parameter name='access-provider-id' value='`$tmp.access-provider-id`' /> <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />--> <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />--> <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />--> @@ -327,6 +328,338 @@ </switch> </block> </for> + <switch test="`$tmp.otninfoProtect_length > 0`"> + <outcome value='true'> + <block atomic='true'> + <set> + <parameter name='tmp.srcdstpnf-name' value='' /> + <parameter name='prop.vpn-binding-otnidx-uuid' value='' /> + <parameter name='tmp.access-provider-id' value='' /> + <parameter name='tmp.access-client-id' value='' /> + <parameter name='tmp.access-topology-id' value='' /> + <parameter name='tmp.srcdstpnf-id' value='' /> + <parameter name='tmp.aai.srcdst-pnf.' value='' /> + <parameter name='tmp.domainG.esr-thirdparty-id' value='' /> + <parameter name='tmp.aai.domainG.esr-thirdparty-sdnc.' value='' /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.url' value='' /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.user' value='' /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.password' value='' /> + <parameter name='tmp.srcTtpdstTtpPair' value='' /> + </set> + <for index='otnidx' start='0' end='`$tmp.otninfoProtect_length`' > + <block atomic='true'> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="prop.vpn-binding-otnidx-uuid"/> + </execute> + <switch test="`$tmp.otninfoProtect[$otnidx].dstPort.dst-access-provider-id == ''`"> + <outcome value='true'> + <set> + <parameter name='tmp.access-provider-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-access-provider-id`' /> + <parameter name='tmp.access-client-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-access-client-id`' /> + <parameter name='tmp.access-topology-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-access-topology-id`' /> + <parameter name='tmp.srcdstpnf-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-access-node-id`' /> + </set> + </outcome> + <outcome value='false'> + <set> + <parameter name='tmp.access-provider-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-access-provider-id`' /> + <parameter name='tmp.access-client-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-access-client-id`' /> + <parameter name='tmp.access-topology-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-access-topology-id`' /> + <parameter name='tmp.srcdstpnf-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-access-node-id`' /> + </set> + </outcome> + </switch> + <set> + <parameter name='tmp.srcdstpnf-name' value="`'networkId-providerId-' + + $tmp.access-provider-id + '-clientId-' + + $tmp.access-client-id + '-topologyId-' + + $tmp.access-topology-id + '-nodeId-' + + $tmp.srcdstpnf-id`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.srcdstpnf-name" + pfx='tmp.aai.srcdst-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='spvidx' start='0' end='`$tmp.aai.srcdst-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.srcdst-pnf.relationship-list.relationship[$spvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainG.esr-thirdparty-id' value="`$tmp.aai.srcdst-pnf.relationship-list.relationship[$spvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainG.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainG.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.url' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.user' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainG.password' value="`$tmp.aai.domainG.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + <switch test='`$otnidx == 0`'> + <outcome value='true'> + <block> + <set> + <parameter name='tmp.domainG-src-access-node-id' value='`$param-prefix-domainA[$param-prefix-domainA_length -3]`' /> + <parameter name='tmp.domainG-dst-access-node-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-access-node-id`' /> + </set> + </block> + </outcome> + <outcome value='false'> + <switch test='`$otnidx == $tmp.otninfoProtect_length - 1`'> + <outcome value='true'> + <block> + <set> + <parameter name='tmp.domainG-src-access-node-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-access-node-id`' /> + <parameter name='tmp.domainG-dst-access-node-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -3]`' /> + </set> + </block> + </outcome> + <outcome value='false'> + <set> + <parameter name='tmp.domainG-src-access-node-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-access-node-id`' /> + <parameter name='tmp.domainG-dst-access-node-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-access-node-id`' /> + </set> + </outcome> + </switch> + </outcome> + </switch> + <set> + <parameter name='tmp.srcTtpdstTtpPair' value="`$tmp.otninfoProtect[$otnidx].srcPort.src-tunnel-tp-id + ',' + + $tmp.otninfootninfoProtect.dstPort.dst-tunnel-tp-id`" /> + </set> + <set> + <parameter name='tmp.current-provider-id' value='`$tmp.access-provider-id`' /> + <parameter name='tmp.current-cvlan-id' value='`$tmp.aai.network-route-A.logical-interface-id`' /> + </set> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-connectivity' mode='sync' ></call> + <set> + <parameter name='prop.ethernet-service-name' value='`$middle-man-conn.etht-svc-name`' /> + </set> + <switch test="`$found-connectivity`"> + <outcome value='false'> + <block> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' > + <parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' /> + <parameter name='vpn-name' value="`$prop.otn-tunnel-name + '-protection'`" /> + <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />--> + <!--<parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />--> + <parameter name='customer-vpn-id' value='`$newToBeUsedMaxtpn`' /> + <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />--> + <parameter name='access-provider-id' value='`$tmp.access-provider-id`' /> + <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />--> + <parameter name='access-client-id' value='`$tmp.access-client-id`' /> + <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />--> + <parameter name='access-topology-id' value='`$tmp.access-topology-id`' /> + <!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />--> + <parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' /> + <parameter name='src-access-ltp-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-tunnel-tp-id`' /> + <!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />--> + <parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' /> + <parameter name='dst-access-ltp-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-tunnel-tp-id`' /> + <parameter name='route-distinguisher' value='`$gfp`' /> + <parameter name='operational-status' value='Created' /> + <parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' /> + <parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' /> + <parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' /> + <parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' /> + <parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' /> + <parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' /> + <!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) --> + <!--<parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' />--> + <parameter name='slice-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + <parameter name='ops-note' value='`$tmp.srcTtpOtnLayer`' /> + <outcome value='success'> + <block></block> + </outcome> + </save> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="uuid.connectivity-otnidx-uuid"/> + </execute> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $uuid.connectivity-otnidx-uuid'> + <parameter name='connectivity-id' value='`$uuid.connectivity-otnidx-uuid`' /> + <!--<parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' />--> + <parameter name='operational-status' value='Created' /> + <parameter name='access-provider-id' value='`$tmp.access-provider-id`' /> + <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />--> + <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />--> + <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />--> + <!--<parameter name='access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />--> + <!--<parameter name='access-ltp-id' value='``' />--> + <parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' /> + <parameter name='coupling-flag' value='`$srcTtpdstTtpPair`' /> + <!--<parameter name='bandwidth-profile-name' value='`$prop.sotn.etht-svc-name`' />--> + <parameter name='bandwidth-profile-name' value='`$gfp`' /> + <parameter name='vpn-type' value='dummy' /> + <parameter name='cir' value='`$gfp *1000000`' /> + <parameter name='eir' value='`$gfp *1000000`' /> + <!--<parameter name='cbs' value='`$prop.sotn.cbs`' />--> + <!--<parameter name='ebs' value='`$prop.sotn.ebs`' />--> + <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />--> + <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />--> + <parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' /> + <parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' /> + <parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' /> + <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.network-id + '/network-data/'` " /> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list' + key='connectivity.connectivity-id = $middle-man-conn.connectivity-id' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-otnidx-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-otnidx-uuid`" /> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' + key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id + AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id + AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-otnidx-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-otnidx-uuid`" /> + <!--<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="connectivity" />--> + <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />--> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $uuid.connectivity-otnidx-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$uuid.connectivity-otnidx-uuid`" /> + </save> + </block> + </outcome> + <outcome value='true'> + <block atomic='true'> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' > + <parameter name='vpn-id' value='`$prop.vpn-binding-otnidx-uuid`' /> + <parameter name='vpn-name' value="`$prop.otn-tunnel-name + '-protection'`" /> + <!--<parameter name='customer-vpn-id' value='`($idx + 1) * 10`' />--> + <!--<parameter name='customer-vpn-id' value='`($maxtpn + $gfp)`' />--> + <parameter name='customer-vpn-id' value='`$newToBeUsedMaxtpn`' /> + <!--<parameter name='access-provider-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-provider-id`' />--> + <parameter name='access-provider-id' value='`$tmp.access-provider-id`' /> + <!--<parameter name='access-client-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-client-id`' />--> + <parameter name='access-client-id' value='`$tmp.access-client-id`' /> + <!--<parameter name='access-topology-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-topology-id`' />--> + <parameter name='access-topology-id' value='`$tmp.access-topology-id`' /> + <!--<parameter name='src-access-node-id' value='`$tmp.otninfo[$otnidx].srcPort.src-access-node-id`' />--> + <parameter name='src-access-node-id' value='`$tmp.domainG-src-access-node-id`' /> + <parameter name='src-access-ltp-id' value='`$tmp.otninfoProtect[$otnidx].srcPort.src-tunnel-tp-id`' /> + <!--<parameter name='dst-access-node-id' value='`$tmp.otninfo[$otnidx].dstPort.dst-access-node-id`' />--> + <parameter name='dst-access-node-id' value='`$tmp.domainG-dst-access-node-id`' /> + <parameter name='dst-access-ltp-id' value='`$tmp.otninfoProtect[$otnidx].dstPort.dst-tunnel-tp-id`' /> + <parameter name='route-distinguisher' value='`$gfp`' /> + <parameter name='operational-status' value='Created' /> + <parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' /> + <parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' /> + <parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' /> + <parameter name='vpn-region' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.url`' /> + <parameter name='vpn-description' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.user`' /> + <parameter name='vpn-platform' value='`$prop.sdncRestApi.thirdpartySdnc.domainG.password`' /> + <!-- The following line is in lieu of vpn-binding.slice-id (new attribute in latest AAI) --> + <!--<parameter name='ops-note' value='`$tmp.aai.service-instance.service-instance-id`' />--> + <parameter name='slice-id' value='`$tmp.aai.service-instance.service-instance-id`' /> + <parameter name='ops-note' value='`$tmp.srcTtpOtnLayer`' /> + <outcome value='success'> + <block></block> + </outcome> + </save> + <set> + <parameter name='tmp.newFlag' value="`$tmp.the-connectivity.coupling-flag + '-' + + $tmp.srcTtpdstTtpPair`" /> + </set> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $tmp.the-connectivity.connectivity-id'> + <parameter name='connectivity-id' value='`$tmp.the-connectivity.connectivity-id`' /> + <parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' /> + <parameter name='operational-status' value='Modified' /> + <parameter name='coupling-flag' value='`$tmp.newFlag`' /> + </update> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' + key='vpn-binding.vpn-id = $prop.vpn-binding-otnidx-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $tmp.the-connectivity.connectivity-id`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.the-connectivity.connectivity-id`" /> + </save> + </block> + </outcome> + </switch> + </block> + </for> + </block> + </outcome> + </switch> <set> <parameter name='domain-A.tunnel-tp-id' value='' /> <parameter name='domain-A.node-id' value='' /> diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-create-clean.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-create-clean.xml index b928dba4..325b58bd 100644 --- a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-create-clean.xml +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-create-clean.xml @@ -191,6 +191,12 @@ </outcome>
<outcome value='success'>
<block>
+ <set>
+ <parameter name='hasSecondary' value="false" />
+ <parameter name='network-route-three' value="" />
+ <parameter name='tmp.aai.network-route-three.' value="" />
+ <parameter name='tmp.aai.network-route-C.' value="" />
+ </set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
<parameter name="ctx-destination" value="prop.otn-tunnel-name"/>
</execute>
@@ -204,6 +210,21 @@ <set>
<parameter name='network-route-two' value="`$tmp.aai.logical-link.link-name2`" />
</set>
+ <set>
+ <parameter name='network-route-three' value="`$tmp.aai.logical-link.segment-id`" />
+ </set>
+ <switch test='`length($network-route-three) == 0`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='hasSecondary' value="false" />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='hasSecondary' value="true" />
+ </set>
+ </outcome>
+ </switch>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="network-route"
key='network-route.route-id = $network-route-one'
@@ -245,6 +266,16 @@ </set>
</block>
</outcome>
+ <outcome value='SECONDARY-ROOT'>
+ <block>
+ <set>
+ <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-one.`" />
+ </set>
+ <set>
+ <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-one.`" />
+ </set>
+ </block>
+ </outcome>
</switch>
</block>
</outcome>
@@ -290,6 +321,60 @@ </set>
</block>
</outcome>
+ <outcome value='SECONDARY-ROOT'>
+ <block>
+ <set>
+ <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-two.`" />
+ </set>
+ <set>
+ <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-two.`" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-route"
+ key='network-route.route-id = $network-route-three'
+ local-only="false"
+ force="true" pfx="tmp.aai.network-route-three">
+ <outcome value='not-found'></outcome>
+ <outcome value='failure'></outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <switch test='`$tmp.aai.network-route-three.type`'>
+ <outcome value='ROOT'>
+ <block>
+ <set>
+ <parameter name='tmp.aai.network-route-ROOT.' value="`$tmp.aai.network-route-two.`" />
+ </set>
+ <set>
+ <parameter name='tmp.aai.network-route-B.' value="`$tmp.aai.network-route-two.`" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='LEAF'>
+ <block>
+ <set>
+ <parameter name='tmp.aai.network-route-LEAF.' value="`$tmp.aai.network-route-two.`" />
+ </set>
+ <set>
+ <parameter name='tmp.aai.network-route-A.' value="`$tmp.aai.network-route-two.`" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='SECONDARY-ROOT'>
+ <block>
+ <set>
+ <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-three.`" />
+ </set>
+ <set>
+ <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-three.`" />
+ </set>
+ </block>
+ </outcome>
</switch>
</block>
</outcome>
@@ -696,6 +781,191 @@ <parameter name='tmp.ROOT.uni-p-interface-long' value="`$tmp.aai.network-route-B.next-hop + '-' + $tmp.aai.network-route-B.logical-interface-id`" />
<parameter name='tmp.ROOT.uni-tp-id' value="`$tmp.dst.ltpId`" />
</set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.network-route-C.next-hop`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-domainC-pnfName"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.dst.domainC.pnf-name' value="`$param-prefix-domainC-pnfName[0] + '-' +
+ $param-prefix-domainC-pnfName[1] + '-' +
+ $param-prefix-domainC-pnfName[2] + '-' +
+ $param-prefix-domainC-pnfName[3] + '-' +
+ $param-prefix-domainC-pnfName[4] + '-' +
+ $param-prefix-domainC-pnfName[5] + '-' +
+ $param-prefix-domainC-pnfName[6] + '-' +
+ $param-prefix-domainC-pnfName[7] + '-' +
+ $param-prefix-domainC-pnfName[8]`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.dst.domainC.pnf-name"
+ pfx='tmp.aai.destination-secondary-pnf' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <for silentFailure='true' index='dpvidx' start='0' end='`$tmp.aai.destination-secondary-pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].related-to`'>
+ <outcome value='esr-thirdparty-sdnc'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainC.esr-thirdparty-id' value="`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="esr-thirdparty-sdnc"
+ key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainC.esr-thirdparty-id AND
+ depth = '1'"
+ pfx='tmp.aai.domainC.esr-thirdparty-sdnc' local-only='false' >
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.url' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.user' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
+ <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.password' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >-->
+ <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />-->
+ <!--<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="get"/>-->
+ <!--<parameter name="responsePrefix" value="topology"/>-->
+ <!--<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"/>-->
+ </set>
+ </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value='network-resource'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domainC.eth-network-id' value="`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ <outcome value='failure'></outcome>
+ </execute>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="pnf.pnf-name = $tmp.dst.domainC.pnf-name
+ AND p-interface.interface-name = $tmp.aai.network-route-C.next-hop"
+ local-only="false"
+ pfx="tmp.aai.network-route-C.p-interface-dst" >
+ <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
+ <!-- resource="p-interface"-->
+ <!-- key="pnf.pnf-name = $unique-src-node-Id-->
+ <!-- and p-interface.interface-name = $tmp.aai.endpointA.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"-->
+ <!-- local-only="false" -->
+ <!-- pfx="tmp.aai.endpointA.p-interface-src" >-->
+ <outcome value='success'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.network-route-C.p-interface-dst.interface-name`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-domainC"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.dst-secondary.ltpId' value='`$param-prefix-domainC[$param-prefix-domainC_length -1]`' />
+ </set>
+ <set>
+ <parameter name='tmp.dst-secondary.pnf-name' value='`$param-prefix-domainC[$param-prefix-domainC_length -3]`' />
+ </set>
+ </block>
+ </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>
+ <for silentFailure='true' index='dividx' start='0' end='`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship[$dividx].related-to`'>
+ <outcome value='tunnel-termination-point'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.destination-secondary.ttp-id' value="`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship[$dividx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tunnel-termination-point"
+ key="tunnel-termination-point.ttp-id = $tmp.destination-secondary.ttp-id
+ AND depth = '0'"
+ pfx='tmp.aai.destination-secondary-ttp' local-only='false' >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='destination-secondary.tunnel-tp-id' value="`$tmp.aai.destination-secondary-ttp.tunnel-tp-id`" />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='not-found'></outcome>
+ <outcome value='failure'></outcome>
+ </get-resource>
+ <set>
+ <parameter name='tmp.SECONDARY-ROOT.pnf-name-long' value="`$param-prefix-domainC-pnfName[0] + '-' +
+ $param-prefix-domainC-pnfName[1] + '-' +
+ $param-prefix-domainC-pnfName[2] + '-' +
+ $param-prefix-domainC-pnfName[3] + '-' +
+ $param-prefix-domainC-pnfName[4] + '-' +
+ $param-prefix-domainC-pnfName[5] + '-' +
+ $param-prefix-domainC-pnfName[6] + '-' +
+ $param-prefix-domainC-pnfName[7] + '-' +
+ $param-prefix-domainC-pnfName[8]`" />
+ <!--<parameter name='tmp.ROOT.pnf-name-short' value="`$param-prefix-domainB-pnfName[8]`" />-->
+ <parameter name='tmp.SECONDARY-ROOT.pnf-name-short' value="`$tmp.dst-secondary.pnf-name`" />
+ <parameter name='tmp.SECONDARY-ROOT.uni-p-interface-long' value="`$tmp.aai.network-route-C.next-hop + '-' + $tmp.aai.network-route-C.logical-interface-id`" />
+ <parameter name='tmp.SECONDARY-ROOT.uni-tp-id' value="`$tmp.dst-secondary.ltpId`" />
+ </set>
<call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-logic' mode='sync' ></call>
<switch test='`$found-middle-man`'>
<outcome value='false'>
@@ -752,6 +1022,7 @@ <parameter name='id' value='`$tmp.LEAF.uni-p-interface-long`' />
<parameter name='tp-id' value='`$tmp.LEAF.uni-tp-id`' />
<parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' />
+ <parameter name='type' value='leaf' />
<parameter name='data-source' value='`$gfp`' />
</save>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
@@ -818,6 +1089,7 @@ <parameter name='id' value='`$tmp.ROOT.uni-p-interface-long`' />
<parameter name='tp-id' value='`$tmp.ROOT.uni-tp-id`' />
<parameter name='cvlan' value='`$tmp.aai.network-route-B.logical-interface-id`' />
+ <parameter name='type' value='root' />
<parameter name='data-source' value='`$gfp`' />
</save>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
@@ -828,6 +1100,98 @@ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.ROOT.uni-p-interface-long`" />
</save>
+ <switch test='`$hasSecondary`'>
+ <outcome value='true'>
+ <block>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni'
+ key='uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long'>
+ <parameter name='id' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' />
+ <parameter name='tp-id' value='`$tmp.SECONDARY-ROOT.uni-tp-id`' />
+ <parameter name='cvlan' value='`$tmp.aai.network-route-C.logical-interface-id`' />
+ <parameter name='type' value='secondary-root' />
+ <parameter name='data-source' value='`$gfp`' />
+ </save>
+ <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT-->
+ <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'>
+ <outcome value='true'>
+ <block>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
+ key='connectivity.connectivity-id = $prop.connectivity-domainB-uuid'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="uni" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/unis/uni/' + $tmp.SECONDARY-ROOT.uni-p-interface-long`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.SECONDARY-ROOT.uni-p-interface-long`" />
+ </save>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
+ <parameter name="ctx-destination" value="prop.connectivity-domainC-uuid"/>
+ </execute>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainC-uuid`' />
+ <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' -->
+ <!-- key='connectivity.connectivity-id = $tmp.ROOT.uni-p-interface-long'>-->
+ <!--<parameter name='connectivity-id' value='`$tmp.ROOT.uni-p-interface-long`' />-->
+ <parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' />
+ <parameter name='operational-status' value='Created' />
+ <parameter name='access-provider-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -9]`' />
+ <parameter name='access-client-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -7]`' />
+ <parameter name='access-topology-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -5]`' />
+ <parameter name='access-node-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -3]`' />
+ <parameter name='access-ltp-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -1]`' />
+ <parameter name='cvlan' value='`$tmp.aai.network-route-C.logical-interface-id`' />
+ <parameter name='color-aware' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' />
+ <parameter name='vpn-type' value='secondary-root' />
+ <parameter name='bandwidth-profile-name' value='`$gfp`' />
+ <parameter name='cir' value='`$gfp *1000000`' />
+ <parameter name='eir' value='`$gfp *1000000`' />
+ <parameter name='cbs' value='`$prop.sotn.cbs`' />
+ <parameter name='ebs' value='`$prop.sotn.ebs`' />
+ <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />-->
+ <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />-->
+ <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />-->
+ <parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />
+ <parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />
+ <parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />
+ <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.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 = $vnf-topology-operation-input.service-information.service-instance-id
+ AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id
+ AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainC-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainC-uuid`" />
+ <!--<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="connectivity" />-->
+ <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />-->
+ </save>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
+ key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="uni" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/unis/uni/' + $tmp.SECONDARY-ROOT.uni-p-interface-long`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.SECONDARY-ROOT.uni-p-interface-long`" />
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
<parameter name="ctx-destination" value="prop.connectivity-middle-man-uuid"/>
</execute>
@@ -915,6 +1279,20 @@ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.ROOT.uni-p-interface-long`" />
</save>
+ <switch test='`$hasSecondary`'>
+ <outcome value='true'>
+ <block>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
+ key='connectivity.connectivity-id = $middle-man-conn.connectivity-id'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="uni" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/unis/uni/' + $tmp.SECONDARY-ROOT.uni-p-interface-long`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.SECONDARY-ROOT.uni-p-interface-long`" />
+ </save>
+ </block>
+ </outcome>
+ </switch>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
key='connectivity.connectivity-id = $middle-man-conn.connectivity-id'
force="true" pfx="tmp.AnAI-data">
@@ -931,6 +1309,27 @@ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainB-uuid`" />
</save>
+ <switch test='`$hasSecondary`'>
+ <outcome value='true'>
+ <block>
+ <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT-->
+ <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'>
+ <outcome value='false'>
+ <block>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
+ key='connectivity.connectivity-id = $middle-man-conn.connectivity-id'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainC-uuid`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainC-uuid`" />
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
<call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1' mode='sync' ></call>
</block>
</outcome>
@@ -967,6 +1366,43 @@ </block>
</outcome>
</get-resource>
+ <switch test='`$hasSecondary`'>
+ <outcome value='true'>
+ <block>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="uni"
+ key="uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long"
+ local-only="false"
+ pfx="tmp.aai.secondaryrootuni" >
+ <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='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='' />
+ <parameter name='error-message' value='' />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.newbw' value='`$tmp.aai.secondaryrootuni.data-source + $gfp`' />
+ </set>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni'
+ key='uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long'>
+ <parameter name='id' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' />
+ <parameter name='data-source' value='`$tmp.newbw`' />
+ </update>
+ </block>
+ </outcome>
+ </get-resource>
+ </block>
+ </outcome>
+ </switch>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id
AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id
@@ -1005,6 +1441,7 @@ <parameter name='id' value='`$tmp.LEAF.uni-p-interface-long`' />
<parameter name='tp-id' value='`$tmp.LEAF.uni-tp-id`' />
<parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' />
+ <parameter name='type' value='leaf' />
<parameter name='data-source' value='`$gfp`' />
</save>
<switch test="`$found-connectivity`">
@@ -1157,6 +1594,43 @@ </return>
</outcome>
</switch>
+ <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync' ></call>
+ <switch test="`$found-secondary-root-connectivity`">
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <!--<parameter name='prop.connectivity-domainB-uuid' value="`$tmp.ROOT.uni-p-interface-long`" />-->
+ <!--OR-->
+ <parameter name='prop.connectivity-domainC-uuid' value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id
+ AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id
+ AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" />
+ <!--<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="connectivity" />-->
+ <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />-->
+ </save>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainC-uuid`' />
+ <parameter name='operational-status' value='Modified' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
<call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1' mode='sync' ></call>
</block>
</outcome>
@@ -1167,6 +1641,7 @@ <parameter name='id' value='`$tmp.LEAF.uni-p-interface-long`' />
<parameter name='tp-id' value='`$tmp.LEAF.uni-tp-id`' />
<parameter name='cvlan' value='`$tmp.aai.network-route-A.logical-interface-id`' />
+ <parameter name='type' value='leaf' />
<parameter name='data-source' value='`$gfp`' />
</save>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
@@ -1240,6 +1715,43 @@ </return>
</outcome>
</switch>
+ <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync' ></call>
+ <switch test="`$found-secondary-root-connectivity`">
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <!--<parameter name='prop.connectivity-domainB-uuid' value="`$tmp.ROOT.uni-p-interface-long`" />-->
+ <!--OR-->
+ <parameter name='prop.connectivity-domainC-uuid' value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" />
+ </set>
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id
+ AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id
+ AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type'
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="connectivity" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" />
+ <!--<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="connectivity" />-->
+ <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />-->
+ <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />-->
+ </save>
+ <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity'
+ key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid'>
+ <parameter name='connectivity-id' value='`$prop.connectivity-domainC-uuid`' />
+ <parameter name='operational-status' value='Modified' />
+ </update>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
</block>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list'
key='connectivity.connectivity-id = $tmp.the-connectivity.connectivity-id'
@@ -1414,7 +1926,18 @@ </outcome>
</get-resource>
</for>
- <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1-activate' mode='sync' ></call>
+ <switch test='`$hasSecondary`'>
+ <outcome value='false'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1-activate' mode='sync' ></call>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1-activate-w-Protection' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
</block>
</outcome>
</switch>
diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml index de311094..1fee37b1 100644 --- a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-delete.xml @@ -191,6 +191,12 @@ </outcome> <outcome value='success'> <block> + <set> + <parameter name='hasSecondary' value="false" /> + <parameter name='network-route-three' value="" /> + <parameter name='tmp.aai.network-route-three.' value="" /> + <parameter name='tmp.aai.network-route-C.' value="" /> + </set> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > <parameter name="ctx-destination" value="prop.otn-tunnel-name"/> </execute> @@ -204,6 +210,21 @@ <set> <parameter name='network-route-two' value="`$tmp.aai.logical-link.link-name2`" /> </set> + <set> + <parameter name='network-route-three' value="`$tmp.aai.logical-link.segment-id`" /> + </set> + <switch test='`length($network-route-three) == 0`'> + <outcome value='true'> + <set> + <parameter name='hasSecondary' value="false" /> + </set> + </outcome> + <outcome value='false'> + <set> + <parameter name='hasSecondary' value="true" /> + </set> + </outcome> + </switch> <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="network-route" key='network-route.route-id = $network-route-one' @@ -245,6 +266,16 @@ </set> </block> </outcome> + <outcome value='SECONDARY-ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-one.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-one.`" /> + </set> + </block> + </outcome> </switch> </block> </outcome> @@ -290,6 +321,60 @@ </set> </block> </outcome> + <outcome value='SECONDARY-ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-two.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-two.`" /> + </set> + </block> + </outcome> + </switch> + </block> + </outcome> + </get-resource> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="network-route" + key='network-route.route-id = $network-route-three' + local-only="false" + force="true" pfx="tmp.aai.network-route-three"> + <outcome value='not-found'></outcome> + <outcome value='failure'></outcome> + <outcome value='success'> + <block atomic="true"> + <switch test='`$tmp.aai.network-route-three.type`'> + <outcome value='ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-ROOT.' value="`$tmp.aai.network-route-two.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-B.' value="`$tmp.aai.network-route-two.`" /> + </set> + </block> + </outcome> + <outcome value='LEAF'> + <block> + <set> + <parameter name='tmp.aai.network-route-LEAF.' value="`$tmp.aai.network-route-two.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-A.' value="`$tmp.aai.network-route-two.`" /> + </set> + </block> + </outcome> + <outcome value='SECONDARY-ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-three.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-three.`" /> + </set> + </block> + </outcome> </switch> </block> </outcome> @@ -696,6 +781,191 @@ <parameter name='tmp.ROOT.uni-p-interface-long' value="`$tmp.aai.network-route-B.next-hop + '-' + $tmp.aai.network-route-B.logical-interface-id`" /> <parameter name='tmp.ROOT.uni-tp-id' value="`$tmp.dst.ltpId`" /> </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-C.next-hop`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainC-pnfName"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.dst.domainC.pnf-name' value="`$param-prefix-domainC-pnfName[0] + '-' + + $param-prefix-domainC-pnfName[1] + '-' + + $param-prefix-domainC-pnfName[2] + '-' + + $param-prefix-domainC-pnfName[3] + '-' + + $param-prefix-domainC-pnfName[4] + '-' + + $param-prefix-domainC-pnfName[5] + '-' + + $param-prefix-domainC-pnfName[6] + '-' + + $param-prefix-domainC-pnfName[7] + '-' + + $param-prefix-domainC-pnfName[8]`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.dst.domainC.pnf-name" + pfx='tmp.aai.destination-secondary-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='dpvidx' start='0' end='`$tmp.aai.destination-secondary-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainC.esr-thirdparty-id' value="`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainC.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainC.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.url' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.user' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.password' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + <outcome value='network-resource'> + <block atomic="true"> + <set> + <parameter name='tmp.domainC.eth-network-id' value="`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" /> + </set> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + <outcome value='failure'></outcome> + </execute> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="p-interface" + key="pnf.pnf-name = $tmp.dst.domainC.pnf-name + AND p-interface.interface-name = $tmp.aai.network-route-C.next-hop" + local-only="false" + pfx="tmp.aai.network-route-C.p-interface-dst" > + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="p-interface"--> + <!-- key="pnf.pnf-name = $unique-src-node-Id--> + <!-- and p-interface.interface-name = $tmp.aai.endpointA.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"--> + <!-- local-only="false" --> + <!-- pfx="tmp.aai.endpointA.p-interface-src" >--> + <outcome value='success'> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-C.p-interface-dst.interface-name`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainC"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.dst-secondary.ltpId' value='`$param-prefix-domainC[$param-prefix-domainC_length -1]`' /> + </set> + <set> + <parameter name='tmp.dst-secondary.pnf-name' value='`$param-prefix-domainC[$param-prefix-domainC_length -3]`' /> + </set> + </block> + </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> + <for silentFailure='true' index='dividx' start='0' end='`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship[$dividx].related-to`'> + <outcome value='tunnel-termination-point'> + <block atomic="true"> + <set> + <parameter name='tmp.destination-secondary.ttp-id' value="`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship[$dividx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="tunnel-termination-point" + key="tunnel-termination-point.ttp-id = $tmp.destination-secondary.ttp-id + AND depth = '0'" + pfx='tmp.aai.destination-secondary-ttp' local-only='false' > + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='destination-secondary.tunnel-tp-id' value="`$tmp.aai.destination-secondary-ttp.tunnel-tp-id`" /> + </set> + </block> + </outcome> + </get-resource> + <break/> + </block> + </outcome> + </switch> + </for> + </block> + </outcome> + <outcome value='not-found'></outcome> + <outcome value='failure'></outcome> + </get-resource> + <set> + <parameter name='tmp.SECONDARY-ROOT.pnf-name-long' value="`$param-prefix-domainC-pnfName[0] + '-' + + $param-prefix-domainC-pnfName[1] + '-' + + $param-prefix-domainC-pnfName[2] + '-' + + $param-prefix-domainC-pnfName[3] + '-' + + $param-prefix-domainC-pnfName[4] + '-' + + $param-prefix-domainC-pnfName[5] + '-' + + $param-prefix-domainC-pnfName[6] + '-' + + $param-prefix-domainC-pnfName[7] + '-' + + $param-prefix-domainC-pnfName[8]`" /> + <!--<parameter name='tmp.ROOT.pnf-name-short' value="`$param-prefix-domainB-pnfName[8]`" />--> + <parameter name='tmp.SECONDARY-ROOT.pnf-name-short' value="`$tmp.dst-secondary.pnf-name`" /> + <parameter name='tmp.SECONDARY-ROOT.uni-p-interface-long' value="`$tmp.aai.network-route-C.next-hop + '-' + $tmp.aai.network-route-C.logical-interface-id`" /> + <parameter name='tmp.SECONDARY-ROOT.uni-tp-id' value="`$tmp.dst-secondary.ltpId`" /> + </set> <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="uni" key="uni.id = $tmp.LEAF.uni-p-interface-long" @@ -754,6 +1024,43 @@ </block> </outcome> </get-resource> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="uni" + key="uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long" + local-only="false" + pfx="tmp.aai.secondaryrootuni" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.newbw' value='`$tmp.aai.secondaryrootuni.data-source - $bwToBeDecreased`' /> + </set> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni' + key='uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long'> + <parameter name='id' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' /> + <parameter name='data-source' value='`$tmp.newbw`' /> + </update> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> </block> </outcome> </get-resource> @@ -788,15 +1095,19 @@ <block></block> </outcome> <outcome value='true'> - <block atomic="true"> - <set> - <parameter name='tmp.MMonlyHasROOT' value='false' /> - </set> - <set> - <parameter name='tmp.MMstillHasUni' value='true' /> - </set> - <break/> - </block> + <switch test="`$tmp.mmUNI-id-long != $tmp.SECONDARY-ROOT.uni-p-interface-long`"> + <outcome value='true'> + <block atomic="true"> + <set> + <parameter name='tmp.MMonlyHasROOT' value='false' /> + </set> + <set> + <parameter name='tmp.MMstillHasUni' value='true' /> + </set> + <break/> + </block> + </outcome> + </switch> </outcome> </switch> </block> @@ -1149,6 +1460,28 @@ </return> </outcome> </switch> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT--> + <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'> + <outcome value='true'> + <block></block> + </outcome> + <outcome value='false'> + <block> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync' ></call> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id'> + <parameter name='connectivity-id' value='`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`' /> + <parameter name='operational-status' value='Modified' /> + </update> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> </block> </outcome> <outcome value='false'> @@ -1313,6 +1646,28 @@ </return> </outcome> </switch> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT--> + <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'> + <outcome value='true'> + <block></block> + </outcome> + <outcome value='false'> + <block> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync' ></call> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id'> + <parameter name='connectivity-id' value='`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`' /> + <parameter name='operational-status' value='Modified' /> + </update> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> </block> </block> </outcome> @@ -1452,6 +1807,28 @@ </return> </outcome> </switch> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT--> + <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'> + <outcome value='true'> + <block></block> + </outcome> + <outcome value='false'> + <block> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync' ></call> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id'> + <parameter name='connectivity-id' value='`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`' /> + <parameter name='operational-status' value='Modified' /> + </update> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> </block> </outcome> <outcome value='false'> diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn.xml new file mode 100644 index 00000000..4edcd13c --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn.xml @@ -0,0 +1,88 @@ +<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='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync'> + <block atomic="true"> + <set> + <parameter name='found-secondary-root-connectivity' value="false" /> + </set> + <set> + <parameter name='tmp.aai.SECONDARY-ROOT.connectivity.' value="" /> + </set> + <set> + <parameter name='tmp.aai.helper-secondary-root-all-connectivities.' value="" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="connectivities" + key="selflink = 'https://aai.onap:8443/aai/v24/network/connectivities/'" + local-only="false" + pfx="tmp.aai.helper-secondary-root-all-connectivities" > + <outcome value='success'> + <block atomic="true"> + <for index='helprconnidx' start='0' end='`$tmp.aai.helper-secondary-root-all-connectivities.connectivity_length`' > + <block atomic='true'> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT--> + <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'> + <outcome value='true'> + <block> + <switch test="`$tmp.aai.helper-secondary-root-all-connectivities.connectivity[$helprconnidx].vpn-type`"> + <outcome value='root'> + <block> + <switch test="`$tmp.aai.helper-secondary-root-all-connectivities.connectivity[$helprconnidx].color-aware == $tmp.ROOT.uni-p-interface-long`"> + <outcome value='true'> + <block atomic='true'> + <set> + <parameter name='found-secondary-root-connectivity' value="true" /> + </set> + <set> + <parameter name='tmp.aai.SECONDARY-ROOT.connectivity.' value="`$tmp.aai.helper-secondary-root-all-connectivities.connectivity[$helprconnidx].`" /> + </set> + <break/> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </outcome> + <outcome value='false'> + <block> + <switch test="`$tmp.aai.helper-secondary-root-all-connectivities.connectivity[$helprconnidx].vpn-type`"> + <outcome value='secondary-root'> + <block> + <switch test="`$tmp.aai.helper-secondary-root-all-connectivities.connectivity[$helprconnidx].color-aware == $tmp.SECONDARY-ROOT.uni-p-interface-long`"> + <outcome value='true'> + <block atomic='true'> + <set> + <parameter name='found-secondary-root-connectivity' value="true" /> + </set> + <set> + <parameter name='tmp.aai.SECONDARY-ROOT.connectivity.' value="`$tmp.aai.helper-secondary-root-all-connectivities.connectivity[$helprconnidx].`" /> + </set> + <break/> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> + </block> + </for> + </block> + </outcome> + <outcome value='not-found'></outcome> + <outcome value='failure'></outcome> + </get-resource> + </block> + </method> +</service-logic>
\ No newline at end of file diff --git a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-modify.xml b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-modify.xml index d01140f6..7c1d8733 100644 --- a/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-modify.xml +++ b/platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-modify.xml @@ -191,6 +191,12 @@ </outcome> <outcome value='success'> <block> + <set> + <parameter name='hasSecondary' value="false" /> + <parameter name='network-route-three' value="" /> + <parameter name='tmp.aai.network-route-three.' value="" /> + <parameter name='tmp.aai.network-route-C.' value="" /> + </set> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > <parameter name="ctx-destination" value="prop.otn-tunnel-name"/> </execute> @@ -245,6 +251,16 @@ </set> </block> </outcome> + <outcome value='SECONDARY-ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-one.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-one.`" /> + </set> + </block> + </outcome> </switch> </block> </outcome> @@ -290,6 +306,60 @@ </set> </block> </outcome> + <outcome value='SECONDARY-ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-two.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-two.`" /> + </set> + </block> + </outcome> + </switch> + </block> + </outcome> + </get-resource> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="network-route" + key='network-route.route-id = $network-route-three' + local-only="false" + force="true" pfx="tmp.aai.network-route-three"> + <outcome value='not-found'></outcome> + <outcome value='failure'></outcome> + <outcome value='success'> + <block atomic="true"> + <switch test='`$tmp.aai.network-route-three.type`'> + <outcome value='ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-ROOT.' value="`$tmp.aai.network-route-two.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-B.' value="`$tmp.aai.network-route-two.`" /> + </set> + </block> + </outcome> + <outcome value='LEAF'> + <block> + <set> + <parameter name='tmp.aai.network-route-LEAF.' value="`$tmp.aai.network-route-two.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-A.' value="`$tmp.aai.network-route-two.`" /> + </set> + </block> + </outcome> + <outcome value='SECONDARY-ROOT'> + <block> + <set> + <parameter name='tmp.aai.network-route-SECONDARY-ROOT.' value="`$tmp.aai.network-route-three.`" /> + </set> + <set> + <parameter name='tmp.aai.network-route-C.' value="`$tmp.aai.network-route-three.`" /> + </set> + </block> + </outcome> </switch> </block> </outcome> @@ -696,6 +766,191 @@ <parameter name='tmp.ROOT.uni-p-interface-long' value="`$tmp.aai.network-route-B.next-hop + '-' + $tmp.aai.network-route-B.logical-interface-id`" /> <parameter name='tmp.ROOT.uni-tp-id' value="`$tmp.dst.ltpId`" /> </set> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-C.next-hop`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainC-pnfName"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.dst.domainC.pnf-name' value="`$param-prefix-domainC-pnfName[0] + '-' + + $param-prefix-domainC-pnfName[1] + '-' + + $param-prefix-domainC-pnfName[2] + '-' + + $param-prefix-domainC-pnfName[3] + '-' + + $param-prefix-domainC-pnfName[4] + '-' + + $param-prefix-domainC-pnfName[5] + '-' + + $param-prefix-domainC-pnfName[6] + '-' + + $param-prefix-domainC-pnfName[7] + '-' + + $param-prefix-domainC-pnfName[8]`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="pnf" + key="pnf.pnf-name = $tmp.dst.domainC.pnf-name" + pfx='tmp.aai.destination-secondary-pnf' local-only='false' > + <!--AND depth = '0'"--> + <outcome value='success'> + <block> + <for silentFailure='true' index='dpvidx' start='0' end='`$tmp.aai.destination-secondary-pnf.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].related-to`'> + <outcome value='esr-thirdparty-sdnc'> + <block atomic="true"> + <set> + <parameter name='tmp.domainC.esr-thirdparty-id' value="`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="esr-thirdparty-sdnc" + key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.domainC.esr-thirdparty-id AND + depth = '1'" + pfx='tmp.aai.domainC.esr-thirdparty-sdnc' local-only='false' > + <outcome value='success'> + <block> + <set> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.url' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.user' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" /> + <parameter name='prop.sdncRestApi.thirdpartySdnc.domainC.password' value="`$tmp.aai.domainB.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" /> + <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >--> + <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />--> + <!--<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="get"/>--> + <!--<parameter name="responsePrefix" value="topology"/>--> + <!--<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"/>--> + </set> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + <outcome value='network-resource'> + <block atomic="true"> + <set> + <parameter name='tmp.domainC.eth-network-id' value="`$tmp.aai.destination-secondary-pnf.relationship-list.relationship[$dpvidx].relationship-data[0].relationship-value`" /> + </set> + </block> + </outcome> + </switch> + </for> + </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + <outcome value='Other'> + <return status='failure'> + <parameter name='ack-final' value='Y'/> + <parameter name="error-code" value="500" /> + <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" /> + </return> + </outcome> + </get-resource> + </block> + </outcome> + <outcome value='failure'></outcome> + </execute> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="p-interface" + key="pnf.pnf-name = $tmp.dst.domainC.pnf-name + AND p-interface.interface-name = $tmp.aai.network-route-C.next-hop" + local-only="false" + pfx="tmp.aai.network-route-C.p-interface-dst" > + <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" --> + <!-- resource="p-interface"--> + <!-- key="pnf.pnf-name = $unique-src-node-Id--> + <!-- and p-interface.interface-name = $tmp.aai.endpointA.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"--> + <!-- local-only="false" --> + <!-- pfx="tmp.aai.endpointA.p-interface-src" >--> + <outcome value='success'> + <block atomic="true"> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' > + <parameter name="original_string" value='`$tmp.aai.network-route-C.p-interface-dst.interface-name`'/> + <!--<parameter name="regex" value="[^-]+$"/>--> + <parameter name="regex" value="[-]+"/> + <parameter name="ctx_memory_result_key" value="param-prefix-domainC"/> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.dst-secondary.ltpId' value='`$param-prefix-domainC[$param-prefix-domainC_length -1]`' /> + </set> + <set> + <parameter name='tmp.dst-secondary.pnf-name' value='`$param-prefix-domainC[$param-prefix-domainC_length -3]`' /> + </set> + </block> + </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> + <for silentFailure='true' index='dividx' start='0' end='`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship_length`' > + <switch test='`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship[$dividx].related-to`'> + <outcome value='tunnel-termination-point'> + <block atomic="true"> + <set> + <parameter name='tmp.destination-secondary.ttp-id' value="`$tmp.aai.network-route-C.p-interface-dst.relationship-list.relationship[$dividx].relationship-data[0].relationship-value`" /> + </set> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="tunnel-termination-point" + key="tunnel-termination-point.ttp-id = $tmp.destination-secondary.ttp-id + AND depth = '0'" + pfx='tmp.aai.destination-secondary-ttp' local-only='false' > + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='destination-secondary.tunnel-tp-id' value="`$tmp.aai.destination-secondary-ttp.tunnel-tp-id`" /> + </set> + </block> + </outcome> + </get-resource> + <break/> + </block> + </outcome> + </switch> + </for> + </block> + </outcome> + <outcome value='not-found'></outcome> + <outcome value='failure'></outcome> + </get-resource> + <set> + <parameter name='tmp.SECONDARY-ROOT.pnf-name-long' value="`$param-prefix-domainC-pnfName[0] + '-' + + $param-prefix-domainC-pnfName[1] + '-' + + $param-prefix-domainC-pnfName[2] + '-' + + $param-prefix-domainC-pnfName[3] + '-' + + $param-prefix-domainC-pnfName[4] + '-' + + $param-prefix-domainC-pnfName[5] + '-' + + $param-prefix-domainC-pnfName[6] + '-' + + $param-prefix-domainC-pnfName[7] + '-' + + $param-prefix-domainC-pnfName[8]`" /> + <!--<parameter name='tmp.ROOT.pnf-name-short' value="`$param-prefix-domainB-pnfName[8]`" />--> + <parameter name='tmp.SECONDARY-ROOT.pnf-name-short' value="`$tmp.dst-secondary.pnf-name`" /> + <parameter name='tmp.SECONDARY-ROOT.uni-p-interface-long' value="`$tmp.aai.network-route-C.next-hop + '-' + $tmp.aai.network-route-C.logical-interface-id`" /> + <parameter name='tmp.SECONDARY-ROOT.uni-tp-id' value="`$tmp.dst-secondary.ltpId`" /> + </set> <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-logic' mode='sync' ></call> <switch test='`$found-middle-man`'> <outcome value='false'> @@ -828,6 +1083,98 @@ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" /> <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.ROOT.uni-p-interface-long`" /> </save> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni' + key='uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long'> + <parameter name='id' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' /> + <parameter name='tp-id' value='`$tmp.SECONDARY-ROOT.uni-tp-id`' /> + <parameter name='cvlan' value='`$tmp.aai.network-route-C.logical-interface-id`' /> + <parameter name='type' value='secondary-root' /> + <parameter name='data-source' value='`$gfp`' /> + </save> + <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT--> + <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'> + <outcome value='true'> + <block> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list' + key='connectivity.connectivity-id = $prop.connectivity-domainB-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="uni" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/unis/uni/' + $tmp.SECONDARY-ROOT.uni-p-interface-long`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.SECONDARY-ROOT.uni-p-interface-long`" /> + </save> + </block> + </outcome> + <outcome value='false'> + <block> + <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > + <parameter name="ctx-destination" value="prop.connectivity-domainC-uuid"/> + </execute> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid'> + <parameter name='connectivity-id' value='`$prop.connectivity-domainC-uuid`' /> + <!--<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' --> + <!-- key='connectivity.connectivity-id = $tmp.ROOT.uni-p-interface-long'>--> + <!--<parameter name='connectivity-id' value='`$tmp.ROOT.uni-p-interface-long`' />--> + <parameter name='etht-svc-name' value='`$prop.ethernet-service-name`' /> + <parameter name='operational-status' value='Created' /> + <parameter name='access-provider-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -9]`' /> + <parameter name='access-client-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -7]`' /> + <parameter name='access-topology-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -5]`' /> + <parameter name='access-node-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -3]`' /> + <parameter name='access-ltp-id' value='`$param-prefix-domainC[$param-prefix-domainC_length -1]`' /> + <parameter name='cvlan' value='`$tmp.aai.network-route-C.logical-interface-id`' /> + <parameter name='color-aware' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' /> + <parameter name='vpn-type' value='secondary-root' /> + <parameter name='bandwidth-profile-name' value='`$gfp`' /> + <parameter name='cir' value='`$gfp *1000000`' /> + <parameter name='eir' value='`$gfp *1000000`' /> + <parameter name='cbs' value='`$prop.sotn.cbs`' /> + <parameter name='ebs' value='`$prop.sotn.ebs`' /> + <!--<parameter name='color-aware' value='`$prop.sotn.colorAware`' />--> + <!--<parameter name='coupling-flag' value='`$prop.sotn.couplingFlag`' />--> + <!--<parameter name='etht-svc-name' value='`$prop.sotn.etht-svc-name`' />--> + <parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' /> + <parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' /> + <parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' /> + <parameter name='connectivity-selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.sotn.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 = $vnf-topology-operation-input.service-information.service-instance-id + AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id + AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainC-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainC-uuid`" /> + <!--<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="connectivity" />--> + <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />--> + </save> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list' + key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="uni" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/unis/uni/' + $tmp.SECONDARY-ROOT.uni-p-interface-long`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.SECONDARY-ROOT.uni-p-interface-long`" /> + </save> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' > <parameter name="ctx-destination" value="prop.connectivity-middle-man-uuid"/> </execute> @@ -915,6 +1262,20 @@ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" /> <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.ROOT.uni-p-interface-long`" /> </save> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list' + key='connectivity.connectivity-id = $middle-man-conn.connectivity-id' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="uni" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/unis/uni/' + $tmp.SECONDARY-ROOT.uni-p-interface-long`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="uni.id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.SECONDARY-ROOT.uni-p-interface-long`" /> + </save> + </block> + </outcome> + </switch> <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list' key='connectivity.connectivity-id = $middle-man-conn.connectivity-id' force="true" pfx="tmp.AnAI-data"> @@ -931,6 +1292,27 @@ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainB-uuid`" /> </save> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT--> + <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'> + <outcome value='false'> + <block> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list' + key='connectivity.connectivity-id = $middle-man-conn.connectivity-id' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.connectivity-domainC-uuid`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.connectivity-domainC-uuid`" /> + </save> + </block> + </outcome> + </switch> + </block> + </outcome> + </switch> <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1' mode='sync' ></call> </block> </outcome> @@ -1010,6 +1392,43 @@ </block> </outcome> </get-resource> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="uni" + key="uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long" + local-only="false" + pfx="tmp.aai.secondaryrootuni" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.newbw' value='`$tmp.aai.secondaryrootuni.data-source + $gfp`' /> + </set> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni' + key='uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long'> + <parameter name='id' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' /> + <parameter name='data-source' value='`$tmp.newbw`' /> + </update> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> </block> </outcome> <outcome value='true'> @@ -1050,6 +1469,43 @@ </block> </outcome> </get-resource> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="uni" + key="uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long" + local-only="false" + pfx="tmp.aai.secondaryrootuni" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.newbw' value='`$tmp.aai.secondaryrootuni.data-source + $gfp`' /> + </set> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni' + key='uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long'> + <parameter name='id' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' /> + <parameter name='data-source' value='`$tmp.newbw`' /> + </update> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> </block> </outcome> </switch> @@ -1260,6 +1716,43 @@ </block> </outcome> </get-resource> + <switch test='`$hasSecondary`'> + <outcome value='true'> + <block> + <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" + resource="uni" + key="uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long" + local-only="false" + pfx="tmp.aai.secondaryrootuni" > + <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='failure'> + <return status='failure'> + <parameter name='error-code' value='' /> + <parameter name='error-message' value='' /> + </return> + </outcome> + <outcome value='success'> + <block atomic="true"> + <set> + <parameter name='tmp.newbw' value='`$tmp.aai.secondaryrootuni.data-source + $gfp`' /> + </set> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='uni' + key='uni.id = $tmp.SECONDARY-ROOT.uni-p-interface-long'> + <parameter name='id' value='`$tmp.SECONDARY-ROOT.uni-p-interface-long`' /> + <parameter name='data-source' value='`$tmp.newbw`' /> + </update> + </block> + </outcome> + </get-resource> + </block> + </outcome> + </switch> <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id @@ -1450,6 +1943,43 @@ </return> </outcome> </switch> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync' ></call> + <switch test="`$found-secondary-root-connectivity`"> + <outcome value='true'> + <block atomic='true'> + <set> + <!--<parameter name='prop.connectivity-domainB-uuid' value="`$tmp.ROOT.uni-p-interface-long`" />--> + <!--OR--> + <parameter name='prop.connectivity-domainC-uuid' value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" /> + </set> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' + key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id + AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id + AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" /> + <!--<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="connectivity" />--> + <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />--> + </save> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid'> + <parameter name='connectivity-id' value='`$prop.connectivity-domainC-uuid`' /> + <parameter name='operational-status' value='Modified' /> + </update> + </block> + </outcome> + <outcome value='false'></outcome> + </switch> <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1' mode='sync' ></call> </block> </outcome> @@ -1533,6 +2063,43 @@ </return> </outcome> </switch> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-helper-find-SECONDARY-ROOT-conn' mode='sync' ></call> + <switch test="`$found-secondary-root-connectivity`"> + <outcome value='true'> + <block atomic='true'> + <set> + <!--<parameter name='prop.connectivity-domainB-uuid' value="`$tmp.ROOT.uni-p-interface-long`" />--> + <!--OR--> + <parameter name='prop.connectivity-domainC-uuid' value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" /> + </set> + <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' + key='service-instance.service-instance-id = $vnf-topology-operation-input.service-information.service-instance-id + AND customer.global-customer-id = $vnf-topology-operation-input.service-information.global-customer-id + AND service-subscription.service-type = $vnf-topology-operation-input.service-information.subscription-service-type' + force="true" pfx="tmp.AnAI-data"> + <parameter name="relationship-list.relationship[0].related-to" value="connectivity" /> + <parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" /> + <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.aai.SECONDARY-ROOT.connectivity.connectivity-id`" /> + <!--<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="connectivity" />--> + <!--<parameter name="relationship-list.relationship[0].related-link" value="`'/network/connectivities/connectivity/' + $prop.sotn.network-id`" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="connectivity.connectivity-id" />--> + <!--<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.sotn.network-id`" />--> + </save> + <update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity' + key='connectivity.connectivity-id = $prop.connectivity-domainC-uuid'> + <parameter name='connectivity-id' value='`$prop.connectivity-domainC-uuid`' /> + <parameter name='operational-status' value='Modified' /> + </update> + </block> + </outcome> + <outcome value='false'></outcome> + </switch> </block> <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='connectivity:relationship-list' key='connectivity.connectivity-id = $tmp.the-connectivity.connectivity-id' @@ -1713,7 +2280,18 @@ </outcome> </get-resource> </for> - <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1-activate' mode='sync' ></call> + <switch test='`$hasSecondary`'> + <outcome value='false'> + <block> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1-activate' mode='sync' ></call> + </block> + </outcome> + <outcome value='true'> + <block> + <call module='GENERIC-RESOURCE-API' rpc='cll-vnf-topology-operation-cll-F1-activate-w-Protection' mode='sync' ></call> + </block> + </outcome> + </switch> </block> </outcome> </switch> diff --git a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof.xml b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof.xml index 3120201e..35853b85 100644 --- a/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof.xml +++ b/platform-logic/generic-resource-api/src/main/xml/trans_slicing/GENERIC-RESOURCE-API_tsli-vnf-topology-operation-get-otn-tunnel-path-from-oof.xml @@ -29,9 +29,52 @@ <outcome value='true'>
<switch test='`$allNetworksList.network-resource[$netwidx].te-topo-id != $param-prefix-domainB-pnfName[6]`'>
<outcome value='true'>
- <set>
- <parameter name='otnTopoIdDst' value='`$allNetworksList.network-resource[$netwidx].te-topo-id`' />
- </set>
+ <block>
+ <switch test='`$hasSecondary`'>
+ <outcome value='false'>
+ <set>
+ <parameter name='otnTopoIdDst' value='`$allNetworksList.network-resource[$netwidx].te-topo-id`' />
+ </set>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <!-- This is to check the provider-id of ROOt and SECONDARY-ROOT-->
+ <switch test='`$param-prefix-domainB[$param-prefix-domainB_length -9] == $param-prefix-domainC[$param-prefix-domainC_length -9]`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='otnTopoIdDst' value='`$allNetworksList.network-resource[$netwidx].te-topo-id`' />
+ </set>
+ <set>
+ <parameter name='otnTopoIdDstBackup' value='`$allNetworksList.network-resource[$netwidx].te-topo-id`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='otnTopoIdDst' value='`$allNetworksList.network-resource[$netwidx].te-topo-id`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='false'>
+ <switch test='`$allNetworksList.network-resource[$netwidx].provider-id == $param-prefix-domainC-pnfName[2]`'>
+ <outcome value='true'>
+ <block>
+ <switch test='`$hasSecondary`'>
+ <outcome value='true'>
+ <block></block>
+ </outcome>
+ </switch>
+ </block>
</outcome>
</switch>
</outcome>
@@ -46,6 +89,9 @@ <parameter name='tmp.pce-dst-node.' value='' />
</set>
<set>
+ <parameter name='tmp.pce-dst-node-backup.' value='' />
+ </set>
+ <set>
<!--<parameter name='`otn-oof`' value='' />-->
<parameter name='otn-oof.' value='' />
<!--<parameter name='`otn-oof.solutions`' value='' />-->
@@ -92,6 +138,26 @@ $param-prefix-domainB-pnfName[7] + '-' +
$param-prefix-domainB-pnfName[8]`" />
</set>
+ <set>
+ <!--<parameter name='$tmp.pce-dst-node' value="`$param-prefix-domainB-pnfName[0] + '-' +-->
+ <!-- $param-prefix-domainB-pnfName[1] + '-' +-->
+ <!-- $param-prefix-domainB-pnfName[2] + '-' +-->
+ <!-- $param-prefix-domainB-pnfName[3] + '-' +-->
+ <!-- $param-prefix-domainB-pnfName[4] + '-' +-->
+ <!-- $param-prefix-domainB-pnfName[5] + '-' +-->
+ <!-- 1 + '-' +-->
+ <!-- $param-prefix-domainB-pnfName[7] + '-' +-->
+ <!-- $param-prefix-domainB-pnfName[8]`" />-->
+ <parameter name='tmp.pce-dst-node-backup' value="`$param-prefix-domainC-pnfName[0] + '-' +
+ $param-prefix-domainC-pnfName[1] + '-' +
+ $param-prefix-domainC-pnfName[2] + '-' +
+ $param-prefix-domainC-pnfName[3] + '-' +
+ $param-prefix-domainC-pnfName[4] + '-' +
+ $param-prefix-domainC-pnfName[5] + '-' +
+ $otnTopoIdDstBackup + '-' +
+ $param-prefix-domainC-pnfName[7] + '-' +
+ $param-prefix-domainC-pnfName[8]`" />
+ </set>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log" />
<parameter name="level" value="info" />
@@ -101,6 +167,7 @@ <!--<parameter name="field2" value="`$tmp.dst.domainB.pnf-name`"/>-->
<parameter name="field1" value="`$tmp.pce-src-node`"/>
<parameter name="field2" value="`$tmp.pce-dst-node`"/>
+ <parameter name="field3" value="`$tmp.pce-dst-node-backup`"/>
</record>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log" />
@@ -117,25 +184,49 @@ <!-- 1 + '-' +-->
<!-- $param-prefix-domainA-pnfName[7] + '-' +-->
<!-- $param-prefix-domainA-pnfName[8]`" />-->
- <parameter name='filenamemm' value="`$tmp.pce-src-node + $tmp.pce-dst-node`" />
+ <parameter name='filenamemm' value="`$tmp.pce-src-node + $tmp.pce-dst-node + $tmp.pce-dst-node-backup`" />
</set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliTopologyUtils' method='computePath' >
- <parameter name="pnfs-pfx" value='ccsdkTopopnfs'/>
- <parameter name="links-pfx" value="ccsdkTopologicalLinks"/>
- <parameter name="response-pfx" value="otn-oof"/>
- <parameter name="output-end-to-end-path" value="false"/>
- <!--<parameter name="src-node" value="`$tmp.src.domainA.pnf-name`"/>-->
- <!--<parameter name="dst-node" value="`$tmp.dst.domainB.pnf-name`"/>-->
- <parameter name="src-node" value="`$tmp.pce-src-node`"/>
- <parameter name="dst-node" value="`$tmp.pce-dst-node`"/>
- <outcome value='success'></outcome>
- <outcome value='Other'></outcome>
- <outcome value='not-found'></outcome>
- </execute>
+ <switch test='`$hasSecondary`'>
+ <outcome value='false'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliTopologyUtils' method='computePath' >
+ <parameter name="pnfs-pfx" value='ccsdkTopopnfs'/>
+ <parameter name="links-pfx" value="ccsdkTopologicalLinks"/>
+ <parameter name="response-pfx" value="otn-oof"/>
+ <parameter name="output-end-to-end-path" value="false"/>
+ <!--<parameter name="src-node" value="`$tmp.src.domainA.pnf-name`"/>-->
+ <!--<parameter name="dst-node" value="`$tmp.dst.domainB.pnf-name`"/>-->
+ <parameter name="src-node" value="`$tmp.pce-src-node`"/>
+ <parameter name="dst-node" value="`$tmp.pce-dst-node`"/>
+ <outcome value='success'></outcome>
+ <outcome value='Other'></outcome>
+ <outcome value='not-found'></outcome>
+ </execute>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliTopologyUtils' method='computePaths' >
+ <parameter name="pnfs-pfx" value='ccsdkTopopnfs'/>
+ <parameter name="links-pfx" value="ccsdkTopologicalLinks"/>
+ <parameter name="response-pfx" value="otn-oof"/>
+ <parameter name="output-end-to-end-path" value="false"/>
+ <!--<parameter name="src-node" value="`$tmp.src.domainA.pnf-name`"/>-->
+ <!--<parameter name="dst-node" value="`$tmp.dst.domainB.pnf-name`"/>-->
+ <parameter name="src-node" value="`$tmp.pce-src-node`"/>
+ <parameter name="dst-node" value="`$tmp.pce-dst-node`"/>
+ <parameter name="dst-node-backup" value="`$tmp.pce-dst-node-backup`"/>
+ <parameter name="require-backuppath" value="`$hasSecondary`"/>
+ <outcome value='success'></outcome>
+ <outcome value='Other'></outcome>
+ <outcome value='not-found'></outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
</block>
<set>
<parameter name='`tmp.otninfo.`' value='' />
<!--<parameter name='`tmp.otninfo_length`' value='0' />-->
+ <parameter name='`tmp.otninfoProtect.`' value='' />
</set>
<for index='vidx' start='0' end='`$otn-oof.solutions_length`' >
<block atomic="true">
@@ -435,6 +526,327 @@ </block>
</block>
</for>
+ <switch test='`$hasSecondary`'>
+ <outcome value='true'>
+ <block>
+ <for index='vidx' start='0' end='`$otn-oof.secondarySolutions_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='otn-oof.link-name' value='' />
+ <!--<parameter name='tmp.aai.cross-link' value='' />-->
+ <parameter name='tmp.aai.cross-link.' value='' />
+ <!--<parameter name='tmp.aai.cross-link.link-role' value='' />-->
+ <parameter name='tmp.src-pnf-name' value='' />
+ <parameter name='tmp.cross-link.' value='' />
+ <parameter name='tmp.dst-pnf-name' value='' />
+ <parameter name='tmp.aai.src-tp.' value='' />
+ <parameter name='param-prefix-src-tp.' value='' />
+ <parameter name='tmp.aai.src-pnf.' value='' />
+ <parameter name='tmp.domain-A.network-id' value='' />
+ <parameter name='tmp.aai.src-network-resource.' value='' />
+ <parameter name='tmp.domain-A.ttp-id' value='' />
+ <parameter name='tmp.aai.src-ttp.' value='' />
+ <parameter name='tmp.aai.dst-tp.' value='' />
+ <parameter name='param-prefix-dst-tp.' value='' />
+ <parameter name='tmp.aai.dst-pnf.' value='' />
+ <parameter name='tmp.domain-C.network-id' value='' />
+ <parameter name='tmp.aai.dst-network-resource.' value='' />
+ <parameter name='tmp.domain-C.ttp-id' value='' />
+ <parameter name='tmp.aai.dst-ttp.' value='' />
+ </set>
+ <set>
+ <parameter name='otn-oof.link-name' value='`$otn-oof.secondarySolutions[$vidx].original_link`' />
+ <parameter name='otn-oof.start-node' value='`$otn-oof.secondarySolutions[$vidx].src_node`' />
+ <parameter name='otn-oof.end-node' value='`$otn-oof.secondarySolutions[$vidx].dst_node`' />
+ </set>
+ <set>
+ <parameter name='tmp.cross-link.src-ltpId' value="`$otn-oof.secondarySolutions[$vidx].src_pinterface`" />
+ <parameter name='tmp.src-pnf-name' value="`$otn-oof.secondarySolutions[$vidx].src_node`" />
+ </set>
+ <set>
+ <parameter name='tmp.cross-link.dst-ltpId' value="`$otn-oof.secondarySolutions[$vidx].dst_pinterface`" />
+ <parameter name='tmp.dst-pnf-name' value="`$otn-oof.secondarySolutions[$vidx].dst_node`" />
+ </set>
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="pnf.pnf-name = $tmp.src-pnf-name
+ AND p-interface.interface-name = $tmp.cross-link.src-ltpId"
+ pfx='tmp.aai.src-tp' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <for silentFailure='true' index='pintsidx' start='0' end='`$tmp.aai.src-tp.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.src-tp.relationship-list.relationship[$pintsidx].related-to`'>
+ <outcome value='tunnel-termination-point'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <!--<parameter name="original_string" value='`$tmp.aai.src-tp`'/>-->
+ <parameter name="original_string" value='`$tmp.aai.src-tp.interface-name`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-src-tp"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='domain-A.ltpId' value='`$param-prefix-src-tp[$param-prefix-src-tp_length -1]`' />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-ltp-id`' value="`$param-prefix-src-tp[$param-prefix-src-tp_length -1]`" />
+ <parameter name='`tmp.otninfoProtect_length`' value='`$vidx + 1`' />
+ </set>
+ </block>
+ </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>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.src-pnf-name"
+ pfx='tmp.aai.src-pnf' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='domain-A.node-id' value="`$tmp.aai.src-pnf.pnf-id`" />
+ <parameter name='domain-A.tpn' value='1' />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-access-node-id`' value="`$tmp.aai.src-pnf.pnf-id`" />
+ <parameter name='`tmp.otninfoProtect_length`' value='`$vidx + 1`' />
+ </set>
+ <for silentFailure='true' index='pvidx' start='0' end='`$tmp.aai.src-pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.src-pnf.relationship-list.relationship[$pvidx].related-to`'>
+ <outcome value='network-resource'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domain-A.network-id' value="`$tmp.aai.src-pnf.relationship-list.relationship[$pvidx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-resource"
+ key="network-resource.network-id = $tmp.domain-A.network-id
+ AND depth = '0'"
+ pfx='tmp.aai.src-network-resource' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='domain-A.network-id' value="`$tmp.aai.src-network-resource.network-id`" />
+ <parameter name='domain-A.provider-id' value="`$tmp.aai.src-network-resource.provider-id`" />
+ <parameter name='domain-A.client-id' value="`$tmp.aai.src-network-resource.client-id`" />
+ <parameter name='domain-A.te-topo-id' value="`$tmp.aai.src-network-resource.te-topo-id`" />
+ <parameter name='domain-A.network-type' value="`$tmp.aai.src-network-resource.network-type`" />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-access-network-id`' value="`$tmp.aai.src-network-resource.network-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-access-provider-id`' value="`$tmp.aai.src-network-resource.provider-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-access-client-id`' value="`$tmp.aai.src-network-resource.client-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-access-topology-id`' value="`$tmp.aai.src-network-resource.te-topo-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-access-network-type`' value="`$tmp.aai.src-network-resource.network-type`" />
+ <parameter name='`tmp.otninfoProtect`' value='`$vidx + 1`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='tmp.domain-A.ttp-id' value="`$tmp.aai.src-tp.relationship-list.relationship[$pintsidx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tunnel-termination-point"
+ key="tunnel-termination-point.ttp-id = $tmp.domain-A.ttp-id
+ AND depth = '0'"
+ pfx='tmp.aai.src-ttp' local-only='false' >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='domain-A.tunnel-tp-id' value="`$tmp.aai.src-ttp.tunnel-tp-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx].dstPort.dst-tunnel-tp-id`' value="`$tmp.aai.src-ttp.tunnel-tp-id`" />
+ <parameter name='`tmp.otninfoProtect_length`' value='`$vidx + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="p-interface"
+ key="pnf.pnf-name = $tmp.dst-pnf-name
+ AND p-interface.interface-name = $tmp.cross-link.dst-ltpId"
+ pfx='tmp.aai.dst-tp' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <for silentFailure='true' index='pintdidx' start='0' end='`$tmp.aai.dst-tp.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.dst-tp.relationship-list.relationship[$pintdidx].related-to`'>
+ <outcome value='tunnel-termination-point'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$tmp.aai.dst-tp`'/>
+ <!--<parameter name="regex" value="[^-]+$"/>-->
+ <parameter name="regex" value="[-]+"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix-dst-tp"/>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='domain-C.ltpId' value='`$param-prefix-dst-tp[$param-prefix-dst-tp_length -1]`' />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-ltp-id`' value="`$param-prefix-dst-tp[$param-prefix-dst-tp_length -1]`" />
+ <parameter name='`tmp.otninfoProtect_length`' value='`$vidx + 2`' />
+ </set>
+ </block>
+ </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>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $tmp.dst-pnf-name"
+ pfx='tmp.aai.dst-pnf' local-only='false' >
+ <!--AND depth = '0'"-->
+ <outcome value='success'>
+ <block>
+ <set>
+ <parameter name='domain-C.node-id' value="`$tmp.aai.dst-pnf.pnf-id`" />
+ <parameter name='domain-C.tpn' value='1' />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-access-node-id`' value="`$tmp.aai.dst-pnf.pnf-id`" />
+ <parameter name='`tmp.otninfoProtect_length`' value='`$vidx + 2`' />
+ </set>
+ <for silentFailure='true' index='mvidx' start='0' end='`$tmp.aai.dst-pnf.relationship-list.relationship_length`' >
+ <switch test='`$tmp.aai.dst-pnf.relationship-list.relationship[$mvidx].related-to`'>
+ <outcome value='network-resource'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.domain-C.network-id' value="`$tmp.aai.dst-pnf.relationship-list.relationship[$mvidx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="network-resource"
+ key="network-resource.network-id = $tmp.domain-C.network-id
+ AND depth = '0'"
+ pfx='tmp.aai.dst-network-resource' local-only='false' >
+ <outcome value='success'>
+ <set>
+ <parameter name='domain-C.network-id' value="`$tmp.aai.dst-network-resource.network-id`" />
+ <parameter name='domain-C.provider-id' value="`$tmp.aai.dst-network-resource.provider-id`" />
+ <parameter name='domain-C.client-id' value="`$tmp.aai.dst-network-resource.client-id`" />
+ <parameter name='domain-C.te-topo-id' value="`$tmp.aai.dst-network-resource.te-topo-id`" />
+ <parameter name='domain-C.network-type' value="`$tmp.aai.dst-network-resource.network-type`" />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-access-network-id`' value="`$tmp.aai.dst-network-resource.network-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-access-provider-id`' value="`$tmp.aai.dst-network-resource.provider-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-access-client-id`' value="`$tmp.aai.dst-network-resource.client-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-access-topology-id`' value="`$tmp.aai.dst-network-resource.te-topo-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-access-network-type`' value="`$tmp.aai.dst-network-resource.network-type`" />
+ <parameter name='`tmp.otninfoProtect`' value='`$vidx + 2`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='tmp.domain-C.ttp-id' value="`$tmp.aai.dst-tp.relationship-list.relationship[$pintdidx].relationship-data[0].relationship-value`" />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="tunnel-termination-point"
+ key="tunnel-termination-point.ttp-id = $tmp.domain-C.ttp-id
+ AND depth = '0'"
+ pfx='tmp.aai.dst-ttp' local-only='false' >
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='domain-C.tunnel-tp-id' value="`$tmp.aai.dst-ttp.tunnel-tp-id`" />
+ <parameter name='`tmp.otninfoProtect[$vidx + 1].srcPort.src-tunnel-tp-id`' value="`$tmp.aai.dst-ttp.tunnel-tp-id`" />
+ <parameter name='`tmp.otninfoProtect_length`' value='`$vidx + 2`' />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
+ </return>
+ </outcome>
+ </get-resource>
+ </block>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </switch>
</block>
</method>
</service-logic>
\ No newline at end of file |