diff options
author | 2021-12-14 21:24:28 -0500 | |
---|---|---|
committer | 2021-12-14 21:24:28 -0500 | |
commit | 65388f15b90ed88de1102db09a7fa17168e7d236 (patch) | |
tree | 96e78be706c7c8bc12ef5759285d4370b3ece673 /platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-modify.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/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-modify.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/cloud_leased_line/GENERIC-RESOURCE-API_cll-vnf-topology-operation-cll-modify.xml | 580 |
1 files changed, 579 insertions, 1 deletions
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> |