summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorDan Timoney <dt5972@att.com>2018-09-10 21:09:29 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-10 21:09:29 +0000
commita3db1ad8a98342cc1beef1e326d5ee787ef06568 (patch)
tree36730d26910a2f1d390a481cc4acba612d3c893a /platform-logic/generic-resource-api/src/main/xml
parent55b429cfc73802e3e52fa2f3864ecc4cdd552728 (diff)
parent69f82ea41d1c21f15be97cc99babf5754fb5fe68 (diff)
Merge "self-serve DG for Casablanca"
Former-commit-id: fa490c28436152596245480283dede4c5cf7f75e
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vf-module-put.xml5022
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vnf-put.xml343
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-FQPN.xml20
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml218
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml199
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml625
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-vlan-tag-assign.xml533
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml202
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml116
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml61
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml19
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml160
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml61
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml24
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml65
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml3790
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml81
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml343
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml267
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml79
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml93
21 files changed, 10027 insertions, 2294 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vf-module-put.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vf-module-put.xml
new file mode 100644
index 00000000..acbda514
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vf-module-put.xml
@@ -0,0 +1,5022 @@
+<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='self-serve-aai-vf-module-put' mode='sync'>
+ <block atomic="true">
+ <switch test='`$ss.capability-action`'>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="ss.capability-action is null" />
+ </return>
+ </outcome>
+ <outcome value='assign'>
+ <block atomic='true'>
+ <block>
+ <set>
+ <parameter name='nidx' value='0' />
+ </set>
+ <for silentFailure='true' index="bidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`" >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='startsWith' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].name`" />
+ <parameter name="target" value="sriov"/>
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='endsWith' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].name`" />
+ <parameter name="target" value="_net_id"/>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='ss.network[$nidx].netid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ <set>
+ <parameter name='nidx' value='`$nidx + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='false'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].name`'>
+ <outcome value='vf_module_id'>
+ <set>
+ <parameter name='ss.param.vf-module-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vf_module_name'>
+ <set>
+ <parameter name='ss.param.vf-module-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='volume_group_id'>
+ <set>
+ <parameter name='ss.param.volume-group-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='volume-group-name'>
+ <set>
+ <parameter name='ss.param.volume-group-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='aic-cloud-region'>
+ <set>
+ <parameter name='ss.param.aic-cloud-region' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-name'>
+ <set>
+ <parameter name='ss.param.vnfc-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-name-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='oam-interface-name'>
+ <set>
+ <parameter name='ss.param.oam-interface-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.oam-interface-name-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='=”lo0-interface-name'>
+ <set>
+ <parameter name='ss.param.lo0-interface-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.lo0-interface-name-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv4-oam-address'>
+ <set>
+ <parameter name='ss.param.ipv4-oam-address' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.ipv4-oam-address-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv4-oam-address-prefix'>
+ <set>
+ <parameter name='ss.param.ipv4-oam-address-prefix' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.ipv4-oam-address-prefix-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='loopback0_ipv4_address'>
+ <set>
+ <parameter name='ss.param.loopback0-ipv4-address' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.loopback0-ipv4-address-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='aai-vf-module-put'>
+ <set>
+ <parameter name='ss.param.aai-vf-module-put-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='nfc-naming-code'>
+ <set>
+ <parameter name='ss.param.nfc-naming-code' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.nfc-naming-code-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='nfc-function'>
+ <set>
+ <parameter name='ss.param.nfc-function' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.nfc-function-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-customization-uuid'>
+ <set>
+ <parameter name='ss.param.vnfc-model-customization-uuid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-model-customization-uuid-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-invariant-uuid'>
+ <set>
+ <parameter name='ss.param.vnfc-model-invariant-uuid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-model-invariant-uuid-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-version'>
+ <set>
+ <parameter name='ss.param.vnfc-model-version' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-model-version-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv4-loopback0-address'>
+ <set>
+ <parameter name='ss.param.ipv4-loopback0-address' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.ipv4-loopback0-address-index' value='`bidx`' />
+ </set>
+ </outcome>
+ <outcome value='as-number'>
+ <set>
+ <parameter name='ss.param.as-number' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.as-number-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vlan-id-outer'>
+ <set>
+ <parameter name='ss.param.vlan-id-outer' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vlan-id-outer-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </for>
+ <set>
+ <parameter name='ss.param.vnf-id' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-id`' />
+ </set>
+ </block>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id "
+ pfx="tmp.aai.vnf" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error to get generic-vnf with vnf-id=' + $ss.param.vnf-id + ' from AnAI'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'generic-vnf.vnf-name with vnf-id=' + $ss.param.vnf-id + ' not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </get-resource>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$ss.param.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$ss.param.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$ss.param.as-number`' />
+ <parameter name="vlan-id-outer" value='`$ss.param.vlan-id-outer`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf.vnf-name in AnAI with vnf-name=' + $ss.param.vnf-name`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf.vnf-name because generic-vnf with vnf-id =' + $ss.param.vnf-id + ' is not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id "
+ pfx="tmp.aai.vfmdoule" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to get vf-module in AnAI with vf-module-id = ' + $ss.param.vf-module-id + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'vf-module not found in AnAI with vf-module-id=' + $ss.param.vf-module-id + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </get-resource>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$ss.param.vf-module-name`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update vf-module-name with vf-module-id = ' + $ss.param.vf-module-id + ' in AnAI; ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update vf-module-name with vf-module-id =' + $ss.param.vf-module-id + ' because vf-module is not found in AAI' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id"
+ pfx="tmp.aai.volume-group" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to get volume-group in AnAI with volume-group-id = ' + $ss.param.volume-group-id + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'volume-group not found in AnAI with volume-group-id=' + $ss.param.volume-group-id + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </get-resource>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$ss.param.volume-group-name`' />
+ <parameter name="volume-group-id" value='`$ss.param.volume-group-id`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to update volume-group with volume-group-id =' + $ss.param.volume-group-id + ' and volume-group-name = ' + $ss.param.volume-group-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to update volume-group with volume-group-id =' + $ss.param.volume-group-id + ' and volume-group-name = ' + $ss.param.volume-group-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <parameter name="nfc-naming-code" value='`$ss.param.nfc-naming-code`' />
+ <parameter name="nfc-function" value='`$ss.param.nfc-function`' />
+ <parameter name="model-customization-id" value='`$ss.param.vnfc-model-customization-uuid`' />
+ <parameter name="model-invariant-id" value='`$ss.param.vnfc-model-invariant-uuid`' />
+ <parameter name="model-version-id" value='`$ss.param.vnfc-model-version`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create vnfc with vnfc-name =' + $ss.param.vnfc-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create vnfc with vnfc-name =' + $ss.param.vnfc-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp"
+ key="cp.cp-instance-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.connection-point-id
+ AND vnfc.vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <parameter name="cp-instance-id"
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.connection-point-id`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create connection-point with cp-instance-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.connection-point-id + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create connection-point with cp-instance-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.connection-point-id + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <for silentFailure='true' index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <parameter name="vlan-tag-id"
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid`' />
+ <parameter name="vlan-tag-role"
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-tag-description`' />
+ <parameter name="vlan-id-outer"
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-tag-id`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag:relationship-list"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <parameter name="relationship-list.relationship[0].related-to" value="cp" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cp.cp-instance-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.connection-point-id`" />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create cp relationship for vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create cp relationship for vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </save>
+ </for>
+ </outcome>
+ </save>
+ </for>
+ <block atomic='true'>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <block atomic='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <parameter name="interface-name" value='`$ss.param.oam-interface-name`' />
+ <parameter name="interface-role" value='OAM' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l-interface with interface-name = ' + $ss.param.oam-interface-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l-interface with interface-name = ' + $ss.param.oam-interface-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-interface-ipv4-address-list"
+ key="l3-interface-ipv4-address-list.l3-interface-ipv4-address = $ss.param.ipv4-oam-address
+ AND generic-vnf.vnf-id = $ss.param.vnf-id
+ AND l-interface.interface-name = $ss.param.oam-interface-name" >
+ <parameter name="l3-interface-ipv4-address" value='`$ss.param.ipv4-oam-address`' />
+ <parameter name="l3-interface-ipv4-prefix-length" value='`$ss.param.ipv4-oam-address-prefix`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l3-interface-ipv4-address-list.l3-interface-ipv4-address = $ss.param.ipv4-oam-address + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l3-interface-ipv4-address-list.l3-interface-ipv4-address = $ss.param.ipv4-oam-address + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$ss.param.lo0-interface-name != ''`">
+ <outcome value='true'>
+ <block atomic='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.lo0-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <parameter name="interface-name" value='`$ss.param.lo0-interface-name`' />
+ <parameter name="interface-role" value='loopback' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-interface-ipv4-address-list"
+ key="l3-interface-ipv4-address-list.l3-interface-ipv4-address = $ss.param.loopback0-ipv4-address
+ AND generic-vnf.vnf-id = $ss.param.vnf-id
+ AND l-interface.interface-name = $ss.param.lo0-interface-name" >
+ <parameter name="l3-interface-ipv4-address" value='`$ss.param.loopback0-ipv4-address`' />
+ <parameter name="l3-interface-ipv4-prefix-length" value='32' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.lo0-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.lo0-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l3-interface-ipv4-address-list with l3-interface-ipv4-address = $ss.param.loopback0-ipv4-address + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.lo0-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.lo0-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create l3-interface-ipv4-address-list with l3-interface-ipv4-address = $ss.param.loopback0-ipv4-address + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <for silentFailure='true' index='n' start='0' end='`$nidx`' >
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$ss.network[$n].netid`" />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.lo0-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.lo0-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK VNF l3-network relationship"/>
+ </record>
+ <for silentFailure='true' index='n' start='0' end='`$nidx`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND related-to = l3-network
+ AND l3-network.network-id = $ss.network[$n].netid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete VNF l3-network relationship for generic-vnf.vnfid = ' + $ss.param.vnf-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' generic-vnf.vnfid = ' + $ss.param.vnf-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of generic-vnf l3-network relationships completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create generic-vnf releationship for l3-network with network-id =' + $ss.network[$n].netid + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <parameter name="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id=' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vf-module update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' in AnAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback vf-module update with vf-module-id=' + $ss.param.vf-module-id + ' because vf-module not found in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK volume-group update"/>
+ </record>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="volume-group"
+ key="cloud-region.cloud-owner = $prop.cloud-owner
+ AND cloud-region.cloud-region-id = $ss.param.aic-cloud-region
+ AND cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND volume-group-id = $ss.param.volume-group-id" >
+ <parameter name="volume-group-name" value='`$tmp.aai.volume-group.volume-group-name`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to UPDATE volume-group with volume-group-id=' + $ss.param.volume-group-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback of volume_group completed.'`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.lo0-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.lo0-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK VNF l3-network relationship"/>
+ </record>
+ <for silentFailure='true' index='n' start='0' end='`$nidx`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND related-to = l3-network
+ AND l3-network.network-id = $ss.network[$n].netid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete VNF l3-network relationship for generic-vnf.vnfid = ' + $ss.param.vnf-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' generic-vnf.vnfid = ' + $ss.param.vnf-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of generic-vnf l3-network relationships completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`' Failed to create generic-vnf releationship for l3-network with network-id =' + $ss.network[$n].netid + ' in AnAI.' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='unassign'>
+ <block atomic='true'>
+ <block>
+ <set>
+ <parameter name='nidx' value='0' />
+ </set>
+ <for silentFailure='true' index="bidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`" >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='startsWith' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].name`" />
+ <parameter name="target" value="sriov"/>
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='endsWith' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].name`" />
+ <parameter name="target" value="_net_id"/>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='ss.network[$nidx].netid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ <set>
+ <parameter name='nidx' value='`$nidx + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='false'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].name`'>
+ <outcome value='vf_module_id'>
+ <set>
+ <parameter name='ss.param.vf-module-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vf_module_name'>
+ <set>
+ <parameter name='ss.param.vf-module-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='volume_group_id'>
+ <set>
+ <parameter name='ss.param.volume-group-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='volume-group-name'>
+ <set>
+ <parameter name='ss.param.volume-group-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='aic-cloud-region'>
+ <set>
+ <parameter name='ss.param.aic-cloud-region' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-name'>
+ <set>
+ <parameter name='ss.param.vnfc-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-name-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='oam-interface-name'>
+ <set>
+ <parameter name='ss.param.oam-interface-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.oam-interface-name-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='=”lo0-interface-name'>
+ <set>
+ <parameter name='ss.param.lo0-interface-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.lo0-interface-name-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv4-oam-address'>
+ <set>
+ <parameter name='ss.param.ipv4-oam-address' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.ipv4-oam-address-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv4-oam-address-prefix'>
+ <set>
+ <parameter name='ss.param.ipv4-oam-address-prefix' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.ipv4-oam-address-prefix-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='loopback0_ipv4_address'>
+ <set>
+ <parameter name='ss.param.loopback0-ipv4-address' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.loopback0-ipv4-address-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='aai-vf-module-put'>
+ <set>
+ <parameter name='ss.param.aai-vf-module-put-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='nfc-naming-code'>
+ <set>
+ <parameter name='ss.param.nfc-naming-code' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.nfc-naming-code-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='nfc-function'>
+ <set>
+ <parameter name='ss.param.nfc-function' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.nfc-function-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-customization-uuid'>
+ <set>
+ <parameter name='ss.param.vnfc-model-customization-uuid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-model-customization-uuid-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-invariant-uuid'>
+ <set>
+ <parameter name='ss.param.vnfc-model-invariant-uuid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-model-invariant-uuid-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-version'>
+ <set>
+ <parameter name='ss.param.vnfc-model-version' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vnfc-model-version-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv4-loopback0-address'>
+ <set>
+ <parameter name='ss.param.ipv4-loopback0-address' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.ipv4-loopback0-address-index' value='`bidx`' />
+ </set>
+ </outcome>
+ <outcome value='as-number'>
+ <set>
+ <parameter name='ss.param.as-number' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.as-number-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='vlan-id-outer'>
+ <set>
+ <parameter name='ss.param.vlan-id-outer' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$bidx].value`' />
+ <parameter name='ss.param.vlan-id-outer-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </for>
+ <set>
+ <parameter name='ss.param.vnf-id' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-id`' />
+ </set>
+ </block>
+ <set>
+ <parameter name='tmp.return-failure' value ='true' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='DELETED' />
+ </set>
+ <block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-name" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vnfc with vnfc-name=' + $ss.param.vnfc-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vnfc with vnfc-name=' + $ss.param.vnfc-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
+ </record>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vlan-tag with vlan-tag-id =' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$i].connection-point.vlan-data[$j].vlan-uuid + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </for>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.oam-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.oam-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.oam-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
+ </record>
+ <switch test="`$ss.param.lo0-interface-name != ''`">
+ <outcome value='true'>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l-interface"
+ key="l-interface.interface-name = $ss.param.lo0-interface-name
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' l-interface.interface-name = ' + $ss.param.lo0-interface-name + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </outcome>
+ </switch>
+ </block>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK VNF l3-network relationship"/>
+ </record>
+ <for silentFailure='true' index='n' start='0' end='`$nidx`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf:relationship-list"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND related-to = l3-network
+ AND l3-network.network-id = $ss.network[$n].netid" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to delete VNF l3-network relationship for generic-vnf.vnfid = ' + $ss.param.vnf-id + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ <switch test='`$tmp.return-failure`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='`$error-message`' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' generic-vnf.vnfid = ' + $ss.param.vnf-id + ' not found in AAI. Consider silent success!'`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of generic-vnf l3-network relationships completed.'`" />
+ </set>
+ </outcome>
+ </delete>
+ </for>
+ </block>
+ </block>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss.aai.vfmoduleput.log' />
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vnf-put.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vnf-put.xml
new file mode 100644
index 00000000..e7910881
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vnf-put.xml
@@ -0,0 +1,343 @@
+<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='self-serve-aai-vnf-put' mode='sync'>
+ <block atomic="true">
+ <switch test='`$ss.capability-action`'>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="ss.capability-action is null" />
+ </return>
+ </outcome>
+ <outcome value='assign'>
+ <block atomic='true'>
+ <for silentFailure='true' index="aidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].name`'>
+ <outcome value='vnf_name'>
+ <set>
+ <parameter name='ss.param.vnf-name' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.vnf-name-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnf_id'>
+ <set>
+ <parameter name='ss.param.vnf-id' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.vnf-id-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='license-assignment-group-uuid'>
+ <set>
+ <parameter name='ss.param.license-assignment-group-uuid' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.license-assignment-group-uuid-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='entitlement-assignment-group-uuid'>
+ <set>
+ <parameter name='ss.param.entitlement-assignment-group-uuid' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.entitlement-assignment-group-uuid-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='aai-vnf-put'>
+ <set>
+ <parameter name='ss.param.aai-vnf-put-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id "
+ pfx="tmp.aai.vnf" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error to get generic-vnf with vnf-id=' + $ss.param.vnf-id + ' from AnAI'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'generic-vnf.vnf-name with vnf-id=' + $ss.param.vnf-id + ' not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </get-resource>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="vnf-name" value='`$ss.param.vnf-name`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf.vnf-name in AnAI with vnf-name=' + $ss.param.vnf-name`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'generic-vnf with vnf-id =' + $ss.param.vnf-id + ' is not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="license"
+ key="license.group-uuid = $ss.param.license-assignment-group-uuid
+ AND license.resource-uuid = $ss.param.license-key
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <parameter name="group-uuid" value='`$ss.param.license-assignment-group-uuid`' />
+ <parameter name="resource-uuid" value='`$ss.param.license-key`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id = ' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to save license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id = ' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' is not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="entitlement"
+ key="entitlement.group-uuid = $ss.param.entitlement-assignment-group-uuid
+ AND entitlement.resource-uuid = $ss.param.entitlement-key
+ AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ <parameter name="group-uuid" value='`$ss.param.entitlement-assignment-group-uuid`' />
+ <parameter name="resource-uuid" value='`$ss.param.entitlement-key`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id = ' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK license"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="license"
+ key="license.group-uuid = $ss.param.license-assignment-group-uuid
+ AND license.resource-uuid = $ss.param.license-key" >
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback license because license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' NOT FOUND in AAI. SILENT SUCCESS! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of license completed. " />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to save entitlement with group-uuid = ' + $ss.param.entitlement-assignment-group-uuid + ' AND entitlement.resource-uuid = ' + $ss.param.entitlement-key + ' in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK generic-vnf update"/>
+ </record>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.param.aai-vf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback generic-vnf update because generic-vnf with vnf-id = ' + $ss.param.vnf-id + ' is not found in AAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="ROLLBACK license"/>
+ </record>
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="license"
+ key="license.group-uuid = $ss.param.license-assignment-group-uuid
+ AND license.resource-uuid = $ss.param.license-key" >
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' in AAI. MANUAL ROLLBACK IS REQUIRED!'`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`' Failed to rollback license because license with group-uuid = ' + $ss.param.license-assignment-group-uuid + ' AND license.resource-uuid = ' + $ss.param.license-key + ' NOT FOUND in AAI. SILENT SUCCESS! '`" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='error-message' value=" Rollback of license completed. " />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'entitlement with group-uuid = ' + $ss.param.entitlement-assignment-group-uuid + ' AND entitlement.resource-uuid = ' + $ss.param.entitlement-key + ' is not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].resource-resolution-data.status'
+ value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss.aai.vfmoduleput.log' />
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-FQPN.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-FQPN.xml
index 989163f1..1c4903ee 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-FQPN.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-FQPN.xml
@@ -18,36 +18,36 @@
</return>
</outcome>
</execute>
- <switch test='`$eipam-ip-block.getPlanTopologyResponse.TopologyDetails_length`'>
+ <switch test='`$eipam-ip-block.getPlanTopologyResponse.topologyDetails_length`'>
<outcome value=''>
<return status="failure">
<parameter name="ack-final" value="Y" />
<parameter name="error-code" value="500"/>
- <parameter name="error-message" value="eipam-ip-block.getPlanTopologyResponse.TopologyDetails is null" />
+ <parameter name="error-message" value="eipam-ip-block.getPlanTopologyResponse.topologyDetails is null" />
</return>
</outcome>
</switch>
- <for index="resp-index" start="0" end="`$eipam-ip-block.getPlanTopologyResponse.TopologyDetails_length`">
- <switch test='`$eipam-ip-block.plan-name == $eipam-ip-block.getPlanTopologyResponse.PlanName`'>
+ <for index="resp-index" start="0" end="`$eipam-ip-block.getPlanTopologyResponse.topologyDetails_length`">
+ <switch test='`$eipam-ip-block.plan-name == $eipam-ip-block.getPlanTopologyResponse.planName`'>
<outcome value='false'>
<return status="failure">
<parameter name="ack-final" value="Y" />
<parameter name="error-code" value="500"/>
- <parameter name="error-message" value="`'eipam response plan-name ['+ $eipam-ip-block.getPlanTopologyResponse.PlanName + ' is not the same as input '+$eipam-ip-block.planName`" />
+ <parameter name="error-message" value="`'eipam response plan-name ['+ $eipam-ip-block.getPlanTopologyResponse.planName + ' is not the same as input '+$eipam-ip-block.planName`" />
</return>
</outcome>
</switch>
<set>
<parameter name='pool-index'
- value='`$eipam-ip-block.getPlanTopologyResponse.TopologyDetails[$resp-index].Level - 1`' />
+ value='`$eipam-ip-block.getPlanTopologyResponse.topologyDetails[$resp-index].level - 1`' />
</set>
<set>
<parameter name='tmp.getPlanTopologyResponse.key-name'
- value='`$eipam-ip-block.getPlanTopologyResponse.TopologyDetails[$resp-index].KeyName`' />
+ value='`$eipam-ip-block.getPlanTopologyResponse.topologyDetails[$resp-index].keyName`' />
</set>
<set>
<parameter name='tmp.getPlanTopologyResponse.key-value-format'
- value='`$eipam-ip-block.getPlanTopologyResponse.TopologyDetails[$resp-index].KeyValueFormat`' />
+ value='`$eipam-ip-block.getPlanTopologyResponse.topologyDetails[$resp-index].keyValueFormat`' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
<parameter name="original_string" value="`$tmp.getPlanTopologyResponse.key-value-format`" />
@@ -122,8 +122,8 @@
</for>
<set>
<parameter name='self-serve-generate-FQPN-output.pools_length'
- value='`$eipam-ip-block.getPlanTopologyResponse.TopologyDetails_length`' />
+ value='`$eipam-ip-block.getPlanTopologyResponse.topologyDetails_length`' />
</set>
</block>
</method>
-</service-logic> \ No newline at end of file
+</service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml
new file mode 100644
index 00000000..ba153ffe
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml
@@ -0,0 +1,218 @@
+<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='self-serve-generate-name-changeassign' mode='sync'>
+ <block atomic="true">
+ <switch test='`$ss.input.param.index`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="ss.input.param.index is null" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$ss.service-data.param.index`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="ss.service-data.param.index is null" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$ss.capability-type`'>
+ <outcome value='vnf'>
+ <block atomic='true'>
+ <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.resource-key_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.resource-key[$i].name`'>
+ <outcome value='external-key'>
+ <set>
+ <parameter name='tmp.external-key.value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.resource-key[$i].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$tmp.external-key.value`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="self-service-generate-name-changeassign error : external-key is null for vnf" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="tmp.vnf.changeassign.naming-data-payload" value="`'{&quot;elements&quot;:[{' + '&quot;resource-name&quot;:&quot;' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].name + '&quot;,&quot;resource-value&quot;:&quot;' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].value + '&quot;,&quot;external-key&quot;:&quot;' + $tmp.external-key.value + '&quot;}]'`"/>
+ </set>
+ <execute plugin='org.openecomp.sdnc.prov.namegeneration.node.AssignNameNode' method='process'>
+ <parameter name='payload' value='`$tmp.vnf.changeassign.naming-data-payload`' />
+ <parameter name="prifix" value="vnf.changeassign.nameGenResponse" />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error from NameGenerationNode ChangeAssign vnf ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error from NameGenerationNode ChangeAssign vnf ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-loopback0-address" value='`$ss.param.ipv4-loopback0-address`' />
+ <parameter name="ipv4-oam-address" value='`$ss.param.ipv4-oam-address`' />
+ <parameter name="as-number" value='`$ss.param.as-number`' />
+ <parameter name="vlan-id-outer" value='`$ss.param.vlan-id-outer`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to update generic-vnf.vnf-name to ' + $ss.changeassign.vnf-name + ' in AnAI'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to update generic-vnf.vnf-name to ' + $ss.changeassign.vnf-name + ' in AnAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].value`' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].value`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.status`' value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='vf-module'>
+ <block atomic='true'>
+ <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.resource-key_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.resource-key[$i].name`'>
+ <outcome value='external-key'>
+ <set>
+ <parameter name='tmp.external-key.value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.service-data.param.index].resource-resolution-data.resource-key[$i].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$tmp.external-key.value`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="self-service-generate-name-changeassign error : external-key is null for vf-module" />
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="tmp.vf-module.changeassign.naming-data-payload" value="`'{&quot;elements&quot;:[{' + '&quot;resource-name&quot;:&quot;' + $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].name + '&quot;,&quot;resource-value&quot;:&quot;' + $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].value + '&quot;,&quot;external-key&quot;:&quot;' + $tmp.external-key.value + '&quot;}]'`"/>
+ </set>
+ <execute plugin='org.openecomp.sdnc.prov.namegeneration.node.AssignNameNode' method='process'>
+ <parameter name='payload' value='`$tmp.vf-module.changeassign.naming-data-payload`' />
+ <parameter name="prifix" value="vf-module.changeassign.nameGenResponse" />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error from NameGenerationNode ChangeAssign vf-module ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Error from NameGenerationNode ChangeAssign vf-module ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id
+ AND vf-module.vf-module-id = $ss.param.vf-module-id " >
+ <parameter name="vf-module-name" value='`$ss.param.vf-module-name`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to update vf-module.vf-module-name to ' + $ss.changeassign.vf-module-name + ' in AnAI'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.service-data.param.index].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to update vf-module.vf-module-name to ' + $ss.changeassign.vf-module-name + ' in AnAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.service-data.param.index].value`' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].value`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$ss.service-data.param.index].resource-resolution-data.status`' value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="capability-type is not vnf or vf-module" />
+ </return>
+ </outcome>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="capability-type is not vnf or vf-module" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml
index b5538fbd..1d074f4a 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml
@@ -24,11 +24,11 @@
</call>
<switch test="`$ss.capability-type == 'vnf'`">
<outcome value='true'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
+ <block>
+ <switch test="`$ss.capability-action == 'unassign'`">
<outcome value='true'>
- <block>
- <switch test="`$ss.capability-action == 'unassign'`">
+ <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
<outcome value='true'>
<block atomic='true'>
<set>
@@ -129,20 +129,37 @@
</block>
</outcome>
</switch>
- <switch test="`$ss.capability-action == 'assign'`">
- <outcome value='true'>
- <block atomic='true'>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
- </set>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
+ </for>
+ </outcome>
+ </switch>
+ <switch test="`$ss.capability-action == 'assign'`">
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.naming-data-payload' value='' />
+ </set>
+ <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
+ <outcome value='true'>
+ <block atomic='true'>
<set>
- <parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
</set>
- </for>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
- </set>
+ <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
+ <set>
+ <parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
+ </set>
+ </for>
+ <set>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.naming-data-payload == ''`">
+ <outcome value='false'>
+ <block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
</set>
@@ -223,22 +240,38 @@
</execute>
</for>
</for>
+ <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].value`" />
+ <parameter name="target" value="$"/>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].resource-resolution-data.capability-name`' value='INPUT' />
+ </set>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].resource-resolution-data.status`' value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </for>
</block>
</outcome>
</switch>
</block>
</outcome>
</switch>
- </for>
+ </block>
</outcome>
</switch>
<switch test="`$ss.capability-type == 'vf-module'`">
<outcome value='true'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
+ <block>
+ <switch test="`$ss.capability-action == 'unassign'`">
<outcome value='true'>
- <block>
- <switch test="`$ss.capability-action == 'unassign'`">
+ <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
<outcome value='true'>
<block atomic='true'>
<set>
@@ -339,26 +372,37 @@
</block>
</outcome>
</switch>
- <switch test="`$ss.capability-action == 'assign'`">
- <outcome value='true'>
- <block atomic='true'>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
- </set>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length`' >
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log" />
- <parameter name="level" value="info" />
- <parameter name="field1" value="`'AJJJ13' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name`" />
- <parameter name="field2" value="`'AJJJ14' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`" />
- </record>
+ </for>
+ </outcome>
+ </switch>
+ <switch test="`$ss.capability-action == 'assign'`">
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.naming-data-payload' value='' />
+ </set>
+ <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
+ <outcome value='true'>
+ <block atomic='true'>
<set>
- <parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
</set>
- </for>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
- </set>
+ <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length`' >
+ <set>
+ <parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
+ </set>
+ </for>
+ <set>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.naming-data-payload == ''`">
+ <outcome value='false'>
+ <block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
</set>
@@ -410,6 +454,65 @@
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.status`' value='SUCCESS' />
</set>
+ <for index='cn' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].name == 'vnfc-name'`">
+ <outcome value='true'>
+ <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key_length`' >
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'vm-type'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-type`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-invariant-uuid'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-invariant-uuid`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-customization-uuid'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-customization-uuid`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-uuid'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-uuid`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-version'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-version`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[j].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-name`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'vnfc-name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-name`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </outcome>
+ </switch>
+ </for>
<for index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
<for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
@@ -439,13 +542,29 @@
</execute>
</for>
</for>
+ <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].value`" />
+ <parameter name="target" value="$"/>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].resource-resolution-data.capability-name`' value='INPUT' />
+ </set>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].resource-resolution-data.status`' value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </for>
</block>
</outcome>
</switch>
</block>
</outcome>
</switch>
- </for>
+ </block>
</outcome>
</switch>
</block>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml
new file mode 100644
index 00000000..7d9c358f
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml
@@ -0,0 +1,625 @@
+<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='self-serve-mS-mac-address-assign' mode='sync'>
+ <block atomic='true'>
+ <switch test="`$ss.capability-name`">
+ <outcome value='Other'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is not mS-mac-address-assign or it is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-name is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is not mS-mac-address-assign or it is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-name is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='null'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is not mS-mac-address-assign or it is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-name is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='mS-mac-address-assign'>
+ <record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-name is mS-mac-address-assign"/>
+ </record>
+ </outcome>
+ </switch>
+ <switch test="`$ss.capability-action`">
+ <outcome value='Other'></outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-action is not set"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='ss.capability-action is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='null'></outcome>
+ <outcome value='assign'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-action is assign"/>
+ </record>
+ </outcome>
+ <outcome value='unassign'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: ss.capability-action is unassign"/>
+ </record>
+ </outcome>
+ </switch>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: call self-service-capability-param-resolution DG"/>
+ </record>
+ <set>
+ <!--<parameter name='name' value='value' />-->
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-capability-param-resolution' mode='sync' >
+ <outcome value='failure'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Failure calling self-service-capability-param-resolution"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='402' />
+ <parameter name='error-message' value='Failure calling self-service-capability-param-resolution' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'></outcome>
+ </call>
+ </block>
+ <block atomic='true'>
+ <set>
+ <parameter name='ma.elements.element_length' value='0' />
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-parameters-length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' />
+ </set>
+ <for index='vf-module-param-index' start='0' end='`$tmp.vf-module-parameters-length`' >
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vf-module-param-index"/>
+ <parameter name="field3" value='`$vf-module-param-index`'/>
+ </record>
+ <block>
+ <set>
+ <parameter name='vfModuleParamsCapabilityName' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.capability-name`' />
+ <parameter name='tmp.vnfHostName' value='' />
+ <parameter name='tmp.policyInstanceName' value='' />
+ <parameter name='tmp.cloudParamName' value='' />
+ <parameter name='tmp.swName' value='' />
+ <parameter name='tmp.resourceValue' value='' />
+ </set>
+ <switch test="`$ss.capability-name == $vfModuleParamsCapabilityName`">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found ss.capability-name MATCH"/>
+ </record>
+ <block atomic='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`" />
+ <parameter name="target" value="$"/>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='tmp.resourceValue' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='tmp.cloudParamName' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].name`' />
+ </set>
+ <set>
+ <parameter name='tmp.resource-resolution-data.' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.`' />
+ </set>
+ <switch test="`$tmp.resource-resolution-data.status == 'PENDING'`">
+ <outcome value='false'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: reseouce-resolution-data.status is not PENDING"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='401' />
+ <parameter name='error-message' value='reseouce-resolution-data.status is not PENDING' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.resource-key-length' value='`$tmp.resource-resolution-data.resource-key_length`' />
+ </set>
+ <for index='key-index' start='0' end='`$tmp.resource-resolution-data.resource-key_length`' >
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: key-index"/>
+ <parameter name="field3" value='`$key-index`'/>
+ </record>
+ <block>
+ <switch test="`$tmp.resource-resolution-data.resource-key[$key-index].name`">
+ <outcome value='key'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found resource-resolution-data.name = vnf-name"/>
+ </record>
+ <set>
+ <parameter name='tmp.vnfHostName' value='`$tmp.resource-resolution-data.resource-key[$key-index].value`' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: resolved vnfHostName: "/>
+ <parameter name="field3" value='`$tmp.vnfHostName`'/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='policy-instance-name'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found resource-resolution-data.name = policy-instance-name-name"/>
+ </record>
+ <set>
+ <parameter name='tmp.policyInstanceName' value='`$tmp.resource-resolution-data.resource-key[$key-index].value`' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: resolved policyInstanceName: "/>
+ <parameter name="field3" value='`$tmp.policyInstanceName`'/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='sw-name'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Found resource-resolution-data.name = sw-name"/>
+ </record>
+ <set>
+ <parameter name='tmp.swName' value='`$tmp.resource-resolution-data.resource-key[$key-index].value`' />
+ </set>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: resolved swName: "/>
+ <parameter name="field3" value='`$tmp.swName`'/>
+ </record>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test="`$tmp.vnfHostName`">
+ <outcome value='null'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vnfHostName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='vnfHostName is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vnfHostName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='vnfHostName is not set' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.cloudParamName`">
+ <outcome value='null'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: cloudParamName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='cloudParamName is not set' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value=''>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: cloudParamName is not set"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='cloudParamName is not set' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.policyInstanceName`">
+ <outcome value='null'>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: policyInstanceName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='policyInstanceName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value=''>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: policyInstanceName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='policyInstanceName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <switch test="`$tmp.swName`">
+ <outcome value='null'>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: swName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='swName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value=''>
+ <switch test="`$ss.capability-action` == 'assign'">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: swName is not set and action is assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='403' />
+ <parameter name='error-message' value='swName is not set and action is assign' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='ma.elements.element[$ma.elements.element_length].policy-instance-name' value='`$tmp.policyInstanceName`' />
+ <parameter name='ma.elements.element[$ma.elements.element_length].vnf-host-name' value='`$tmp.vnfHostName`' />
+ <parameter name='ma.elements.element[$ma.elements.element_length].cloud-param-name' value='`$tmp.cloudParamName`' />
+ <parameter name='ma.elements.element[$ma.elements.element_length].sw-name' value='`$tmp.swName`' />
+ </set>
+ <switch test="`$tmp.resourceValue`">
+ <outcome value='Other'>
+ <set>
+ <parameter name='ma.elements.element[$ma.elements.element_length].resource-value' value='`$tmp.resourceValue`' />
+ </set>
+ </outcome>
+ <outcome value='null'></outcome>
+ <outcome value=''></outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Adding this vf-module-parameters.param to ma.elements "/>
+ <parameter name="field3" value='`$ma.elements.element_length`'/>
+ <parameter name="field4" value='`$ma.elements.element[$ma.elements.element_length].policy-instance-name`'/>
+ <parameter name="field5" value='`$ma.elements.element[$ma.elements.element_length].vnf-host-name`'/>
+ <parameter name="field6" value='`$ma.elements.element[$ma.elements.element_length].cloud-param-name`'/>
+ <parameter name="field7" value='`$ma.elements.element[$ma.elements.element_length].sw-name`'/>
+ <parameter name="field8" value='`$ma.elements.element[$ma.elements.element_length].resource-value`'/>
+ </record>
+ <set>
+ <parameter name='ma.elements.element_length' value='`$ma.elements.element_length + 1`' />
+ </set>
+ </block>
+ </block>
+ </outcome>
+ <outcome value='false'></outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ <switch test='`$ss.capability-action`'>
+ <outcome value='assign'>
+ <block atomic='true'>
+ <set>
+ <parameter name='prop.restapi.templateDir' value="/opt/lsc/restapi/templates" />
+ <parameter name='prop.mac-address-microserivice.url' value="http://mtanjv9sdlg51-eth1-0.aic.cip.att.com:8989" />
+ </set>
+ <record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: restapi-call-node Call MAC Address microService assign"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/mac-address-assign.json'`" />
+ <parameter name='restapiUrl' value="`$prop.mac-address-microserivice.url + '/macaddress/service/assign'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='customHttpHeaders'
+ value="Authorization=Basic YWRtaW46YWRtaW4=" />
+ <parameter name="responsePrefix" value="tmp.mac-address-resp.prefix" />
+ <outcome value='failure'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service assign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='502' />
+ <parameter name='error-message' value='self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service assign' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: assign SUCCESS"/>
+ </record>
+ </block>
+ </outcome>
+ </execute>
+ <for index='mac-address-list-index' start='0' end='`$tmp.mac-address-resp.prefix.mac-address-list_length`' >
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: mac-address-list-index|name|value "/>
+ <parameter name="field3" value='`$mac-address-list-index`'/>
+ <parameter name="field4" value='`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].name`'/>
+ <parameter name="field5" value='`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].value`'/>
+ </record>
+ <for index='vf-module-param-index' start='0' end='`$tmp.vf-module-parameters-length`' >
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: vf-module-param-index"/>
+ <parameter name="field3" value='`$vf-module-param-index`'/>
+ </record>
+ <block>
+ <switch test="`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].name == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].name`">
+ <outcome value='true'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: mac-address-list MATCH with param.value: "/>
+ <parameter name="field3" value="`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].name`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`" />
+ <parameter name="target" value="$"/>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.capability-name' value='INPUT' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name="`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].value`" value="`$tmp.mac-address-resp.prefix.mac-address-list[$mac-address-list-index].value`" />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name="`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status`" value='SUCCESS' />
+ </set>
+ </block>
+ </for>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='unassign'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.restapi.templateDir' value="/opt/lsc/restapi/templates" />
+ <parameter name='prop.mac-address-microserivice.url' value="http://mtanjv9sdlg51-eth1-0.aic.cip.att.com:8989" />
+ </set>
+ <record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: restapi-call-node Call MAC Address microService unassign"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/mac-address-unassign.json'`" />
+ <parameter name='restapiUrl' value="`$prop.mac-address-microserivice.url + '/macaddress/service/unassign'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='customHttpHeaders'
+ value="Authorization=Basic YWRtaW46YWRtaW4=" />
+ <parameter name="responsePrefix" value="tmp.mac-address-resp.prefix" />
+ <outcome value='failure'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service unassign"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='502' />
+ <parameter name='error-message' value='self-serve-mS-mac-address-assign: Error calling MAC Address Micro Service unassign' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: unassign SUCCESS: response: "/>
+ <parameter name='field3' value='`$tmp.mac-address-resp.prefix.status`' />
+ </record>
+ <switch test="`$tmp.mac-address-resp.prefix.status == 'deleted successfully'`">
+ <outcome value='false'>
+ <block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Address Micro Service unassign did not return: deleted successfully"/>
+ </record>
+ <set>
+ <parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='502' />
+ <parameter name='error-message' value='self-serve-mS-mac-address-assign: Address Micro Service unassign did not return: deleted successfully' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <block>
+ <for index='vf-module-param-index' start='0' end='`$tmp.vf-module-parameters-length`' >
+ <set>
+ <parameter name="`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-param-index].resource-resolution-data.status`" value="DELETED" />
+ </set>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/self-serve-mS-mac-address-assign.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vf-module-parameters-index].resource-resolution-data.status`" value='SUCCESS' />
+ </return>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-vlan-tag-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-vlan-tag-assign.xml
new file mode 100644
index 00000000..15b4e625
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-vlan-tag-assign.xml
@@ -0,0 +1,533 @@
+<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='self-serve-mS-vlan-tag-assign' mode='sync'>
+ <block atomic="true">
+ <switch test='`$ss.capability-name`'>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="ss.capability-name is null" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$ss.capability-action`'>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="ss.capability-action is null" />
+ </return>
+ </outcome>
+ <outcome value='assign'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-capability-param-resolution' mode='sync' >
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="`'Not all assignments are resolved' + $error-message`" />
+ </return>
+ </outcome>
+ </call>
+ <set>
+ <parameter name='qidx' value='0' />
+ <parameter name='ss.vt.' value='' />
+ </set>
+ <for silentFailure='true' index="pidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
+ <set>
+ <parameter name='tmp.ss.param.capability-name'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />
+ </set>
+ <switch test='`$tmp.ss.param.capability-name == $ss.capability-name`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='ss.vt.param[$qidx].index' value='`$pidx`' />
+ </set>
+ <for silentFailure='true' index="kidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].name`'>
+ <outcome value='policy-instance-name'>
+ <set>
+ <parameter name='vt.request[$qidx].policy-instance-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='resource-name'>
+ <set>
+ <parameter name='vt.request[$qidx].resource-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='scope-id'>
+ <set>
+ <parameter name='vt.request[$qidx].scope-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vlan-tag-key'>
+ <set>
+ <parameter name='vt.request[$qidx].vlan-tag-key' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vlan-type'>
+ <set>
+ <parameter name='vt.request[$qidx].vlan-type' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='resource-value'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ <parameter name='target' value='$' />
+ <outcome value='false'>
+ <set>
+ <parameter name='vt.request[$qidx].resource-value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='true'>
+ <set>
+ <parameter name='vt.request[$qidx].resource-value' value='' />
+ </set>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </for>
+ <set>
+ <parameter name='qidx' value='`$qidx + 1`' />
+ </set>
+ <set>
+ <parameter name='vt.request_length' value='`$qidx`' />
+ </set>
+ <set>
+ <parameter name='ss.vt.param_length' value='`$qidx`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-mS-vlan-tag-assign`"/>
+ <parameter name="outputPath" value="tmp.ss-vlan-tag-url"/>
+ <parameter name="target" value="{action}"/>
+ <parameter name="replacement" value="`$ss.capability-action`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.mS.vlan.tag.assign.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.vt.mS.url + $tmp.ss-vlan-tag-url`' />
+ <parameter name='restapiUser' value='`$prop.vt.mS.user`' />
+ <parameter name='restapiPassword' value='`$prop.vt.mS.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name="responsePrefix" value="vtResp" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <for index="i" start="0" end="`$ss.vt.param_length`">
+ <set>
+ <parameter name='vt-index' value='`$ss.vt.param[$i].index`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ </for>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="Failed to get vlan-tag assisgnment from mS" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <for index="i" start="0" end="`$ss.vt.param_length`">
+ <set>
+ <parameter name='vt-index' value='`$ss.vt.param[$i].index`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ </for>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="Failed to get vlan-tag assisgnment from mS" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <switch test='`$vtResp.error-code`'>
+ <outcome value='500'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error from mS-vlan-tag-assign with error-code = ' + $vtResp.error-code + ' and error-message = ' + $vtResp.error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='200'>
+ <block atomic='true'>
+ <for silentFailure='true' index="pidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].name`'>
+ <outcome value='nfc-function'>
+ <set>
+ <parameter name='ss.param.nfc-function' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].value`' />
+ <parameter name='ss.param.nfc-function-index' value='`$pidx`' />
+ </set>
+ </outcome>
+ <outcome value='nfc-naming-code'>
+ <set>
+ <parameter name='ss.param.nfc-naming-code' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].value`' />
+ <parameter name='ss.param.nfc-naming-code-index' value='`$pidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-customization-uuid'>
+ <set>
+ <parameter name='ss.param.vnfc-model-customization-uuid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].value`' />
+ <parameter name='ss.param.vnfc-model-customization-uuid-index' value='`$pidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-invariant-uuid'>
+ <set>
+ <parameter name='ss.param.vnfc-model-invariant-uuid' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].value`' />
+ <parameter name='ss.param.vnfc-model-invariant-uuid-index' value='`$pidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-model-version'>
+ <set>
+ <parameter name='ss.param.vnfc-model-version' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].value`' />
+ <parameter name='ss.param.vnfc-model-version-index' value='`$pidx`' />
+ </set>
+ </outcome>
+ <outcome value='vm-type'>
+ <set>
+ <parameter name='ss.param.vm-type' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].value`' />
+ <parameter name='ss.param.vm-type-index' value='`$pidx`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc-name'>
+ <block atomic='true'>
+ <set>
+ <parameter name='ss.param.vnfc-name-unresolved-value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].value`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$ss.param.vnfc-name-unresolved-value`" />
+ <parameter name="target" value="${"/>
+ <parameter name="replacement" value=""/>
+ <parameter name="outputPath" value="ss.param.vnfc-name-unresolved-value"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$ss.param.vnfc-name-unresolved-value`" />
+ <parameter name="target" value="}"/>
+ <parameter name="replacement" value=""/>
+ <parameter name="outputPath" value="ss.param.vnfc-name-unresolved-value"/>
+ </execute>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="`'ss.param.vnfc-name-unresolved-value = ' + $ss.param.vnfc-name-unresolved-value`"/>
+ </record>
+ <block>
+ <for silentFailure='true' index="x" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$x].name == $ss.param.vnfc-name-unresolved-value`'>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='ss.param.vnfc-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$x].value`' />
+ <parameter name='ss.param.vnfc-name-index' value='`$x`' />
+ </set>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <return status='success'></return>
+ </block>
+ <switch test='`$ss.param.vnfc-name`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='Unable to resolve vnf-name' />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <set>
+ <parameter name = 'service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-type' value = '`$ss.param.vm-type`' />
+ <parameter name = 'service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-invariant-uuid' value = '`$ss.param.vnfc-model-invariant-uuid`' />
+ <parameter name = 'service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-customization-uuid' value = '`$ss.param.vnfc-model-customization-uuid`' />
+ <parameter name = 'service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-version' value = '`$ss.param.vnfc-model-version`' />
+ <parameter name = 'service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-name' value = '`$ss.param.vnfc-name`' />
+ </set>
+ <set>
+ <parameter name = 'service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length' value = '1' />
+ <parameter name = 'service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names_length' value = '1' />
+ </set>
+ <for silentFailure='true' index="oidx" start="0" end="`$vtResp.output_length`">
+ <for silentFailure='true' index="vtidx" start="0" end="`$ss.vt.param_length`">
+ <set>
+ <parameter name='vt-index' value='`$ss.vt.param[$vtidx].index`' />
+ </set>
+ <switch test='`$vtResp.output[$oidx].resource-name == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].name`'>
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].value`' />
+ <parameter name='target' value='$' />
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].value'
+ value='`$vtResp.output[$oidx].resource-value`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='SUCCESS' />
+ </set>
+ <for silentFailure='true' index="kidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.resource-key_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.resource-key[$kidx].name`'>
+ <outcome value='vnfc-network-role'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].vnfc-network-role'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ <call module="GENERIC-RESOURCE-API" rpc="generate-cp-instance-id" mode="sync" >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error in generating cp-instance-id in SDNC; ' + $error-message.generate-cp-instance-id`" />
+ </return>
+ </outcome>
+ </call>
+ <for silentFailure='true' index="sidx" start="0" end="`$vtResp.output[$oidx].stored-elements_length`">
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.connection-point-id'
+ value='`$tmp.return.generate-cp-instance-id.id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-uuid'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].vlan-uuid`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-tag-id'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].vlantag-value`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-tag-description'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].vlantag-name`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-role'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].element-vlan-role`' />
+ </set>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block atomic='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].value'
+ value='`$vtResp.output[$oidx].resource-value`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='SUCCESS' />
+ </set>
+ <for silentFailure='true' index="kidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.resource-key_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.resource-key[$kidx].name`'>
+ <outcome value='vnfc-network-role'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].vnfc-network-role'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ <call module="GENERIC-RESOURCE-API" rpc="generate-cp-instance-id" mode="sync" >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Error in generating cp-instance-id in SDNC; ' + $error-message.generate-cp-instance-id`" />
+ </return>
+ </outcome>
+ </call>
+ <for silentFailure='true' index="sidx" start="0" end="`$vtResp.output[$oidx].stored-elements_length`">
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.connection-point-id'
+ value='`$tmp.return.generate-cp-instance-id.id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-uuid'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].vlan-uuid`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-tag-id'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].vlantag-value`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-tag-description'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].vlantag-name`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data[$sidx].vlan-role'
+ value='`$vtResp.output[$oidx].stored-elements[$sidx].element-vlan-role`' />
+ </set>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.capability-name'
+ value='INPUT' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </for>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data_length'
+ value='`$ss.vt.param_length`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-networks.vnfc-network-data[$vtidx].connection-point.vlan-data_length'
+ value='`$vtResp.output[$oidx].stored-elements_length`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ <outcome value='unassign'>
+ <block atomic="true">
+ <set>
+ <parameter name='qidx' value='0' />
+ <parameter name='ss.vt.' value='' />
+ </set>
+ <for silentFailure='true' index="pidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
+ <set>
+ <parameter name='tmp.ss.param.capability-name'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />
+ </set>
+ <switch test='`$tmp.ss.param.capability-name == $ss.capability-name`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='ss.vt.param[$qidx].index' value='`$pidx`' />
+ </set>
+ <for silentFailure='true' index="kidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].name`'>
+ <outcome value='policy-instance-name'>
+ <set>
+ <parameter name='vt.request[$qidx].policy-instance-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vlan-type'>
+ <set>
+ <parameter name='vt.request[$qidx].vlan-type' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vlan-tag-key'>
+ <set>
+ <parameter name='vt.request[$qidx].vlan-tag-key' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <set>
+ <parameter name='qidx' value='`$qidx + 1`' />
+ </set>
+ <set>
+ <parameter name='vt.request_length' value='`$qidx`' />
+ </set>
+ <set>
+ <parameter name='ss.vt.param_length' value='`$qidx`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-mS-vlan-tag-assign`"/>
+ <parameter name="outputPath" value="tmp.ss-vlan-tag-url"/>
+ <parameter name="target" value="{action}"/>
+ <parameter name="replacement" value="`$ss.capability-action`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.mS.vlan.tag.unassign.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $prop.restapi.ss-mS-vlan-tag-assign`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name="responsePrefix" value="vtResp" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <for index="i" start="0" end="`$ss.vt.param_length`">
+ <set>
+ <parameter name='vt-index' value='`$ss.vt.param[$i].index`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ </for>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="Failed to get vlan-tag assisgnment from mS" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <for index="i" start="0" end="`$ss.vt.param_length`">
+ <set>
+ <parameter name='vt-index' value='`$ss.vt.param[$i].index`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ </for>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="Failed to get vlan-tag assisgnment from mS" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <switch test='`$vtResp.error-code`'>
+ <outcome value='500'>
+ <block atomic="true">
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500'/>
+ <parameter name='error-message' value="`'Encountered error from mS-vlan-tag-assign with error-code = ' + $vtResp.error-code + ' and error-message = ' + $vtResp.error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='200'>
+ <for silentFailure='true' index="oidx" start="0" end="`$vtResp.output_length`">
+ <for silentFailure='true' index="i" start="0" end="`$ss.vt.param_length`">
+ <set>
+ <parameter name='vt-index' value='`$ss.vt.param[$i]-index`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$vt-index].resource-resolution-data.status'
+ value='DELETED' />
+ </set>
+ </for>
+ </for>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss.ms-vlan-tag.log' />
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
index 6abe8274..33f6f35c 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
@@ -178,12 +178,15 @@
<parameter name='ss.capability.execution-order[1]' value='alts-entitlement-assign' />
<parameter name='ss.capability.execution-order[2]' value='alts-license-assign' />
<parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[4]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[5]' value='eipam-create-pool"' />
- <parameter name='ss.capability.execution-order[6]' value='mac-address-assign' />
- <parameter name='ss.capability.execution-order[7]' value='create-vpe-pool' />
- <parameter name='ss.capability.execution-order[8]' value='unresolved-composite-data' />
- <parameter name='ss.capability.execution-order_length' value='9' />
+ <parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='eipam-ip-assign' />
+ <parameter name='ss.capability.execution-order[6]' value='eipam-create-pool"' />
+ <parameter name='ss.capability.execution-order[7]' value='mac-address-assign' />
+ <parameter name='ss.capability.execution-order[8]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[9]' value='create-vpe-pool' />
+ <parameter name='ss.capability.execution-order[10]' value='unresolved-composite-data' />
+ <parameter name='ss.capability.execution-order[11]' value='aai-vf-module-put' />
+ <parameter name='ss.capability.execution-order_length' value='12' />
</set>
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`'>
<outcome value=''>
@@ -213,23 +216,9 @@ ss.capability.execution-order
<set>
<parameter name='ss.capability-action' value='assign' />
</set>
- <switch test='`$ss.capability-name`'>
- <outcome value='alts-entitlement-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='alts-license-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
- </set>
- </outcome>
- </switch>
+ <set>
+ <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
+ </set>
<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<set>
<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />
@@ -237,18 +226,8 @@ ss.capability.execution-order
<switch test='`$ss.capability-name == $tmp.param.capability-name`'>
<outcome value='true'>
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`'>
- <outcome value='SUCCESS'>
- <set>
- <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
- </set>
- </outcome>
<outcome value='PENDING'>
<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
- <outcome value='success'>
- <set>
- <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
- </set>
- </outcome>
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -307,22 +286,15 @@ ss.capability.execution-order
<parameter name='format' value='json' />
<parameter name='httpMethod' value='PUT' />
<parameter name="responsePrefix" value="mdsal-ss-vfmodule" />
- <outcome value='success'>
- <block></block>
- </outcome>
<outcome value='failure'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
</outcome>
<outcome value='not-found'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
</outcome>
</execute>
<return status='failure'>
@@ -335,11 +307,6 @@ ss.capability.execution-order
</outcome>
<outcome value='FAILED'>
<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
- <outcome value='success'>
- <set>
- <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
- </set>
- </outcome>
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -398,22 +365,15 @@ ss.capability.execution-order
<parameter name='format' value='json' />
<parameter name='httpMethod' value='PUT' />
<parameter name="responsePrefix" value="mdsal-ss-vfmodule" />
- <outcome value='success'>
- <block></block>
- </outcome>
<outcome value='failure'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
</outcome>
<outcome value='not-found'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
</outcome>
</execute>
<return status='failure'>
@@ -429,120 +389,6 @@ ss.capability.execution-order
</switch>
</for>
</for>
- <switch test="`$self-serve-generate-name == 'ASSIGNED'`">
- <outcome value='false'>
- <block atomic='true'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="`'SS: self-serve-generate-name status: ' + $self-serve-generate-name`"/>
- </record>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'AAI Put is being skipped because NOT all capability components have SUCCESS status; '+ $error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='true'>
- <switch test="`$self-serve-unresolved-composite-data == 'ASSIGNED' or $self-serve-unresolved-composite-data == ''`">
- <outcome value='false'>
- <block atomic='true'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="`'SS: self-serve-unresolved-composite-data: ' + $self-serve-unresolved-composite-data`"/>
- </record>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'AAI Put is being skipped because NOT all capability components have SUCCESS status; '+ $error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='true'>
- <block atomic='true'>
- <set>
- <parameter name='tmp.ss.nfc-naming-code' value='' />
- <parameter name='tmp.ss.nfc-function' value='' />
- <parameter name='tmp.ss.vnfc-name' value='' />
- </set>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].name`'>
- <outcome value='vnfc-name'>
- <!--
-<outcome value='vmxvre_name_0'>
--->
- <block>
- <set>
- <parameter name='tmp.ss.vnfc-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].value`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test="`$tmp.ss.vnfc-name != ''`">
- <outcome value='true'>
- <block atomic='true'>
- <for index="kidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length`">
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$kidx].name`'>
- <outcome value='nfc-naming-code'>
- <!--
-<outcome value='NFC_NAMING_CODE'>
--->
- <set>
- <parameter name='tmp.ss.nfc-naming-code' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$kidx].value`' />
- </set>
- </outcome>
- <outcome value='nfc-function'>
- <set>
- <parameter name='tmp.ss.nfc-function' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$kidx].value`' />
- </set>
- </outcome>
- </switch>
- </for>
- <switch test="`$tmp.ss.nfc-naming-code != '' and $tmp.ss.nfc-function != ''`">
- <outcome value='true'>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc"
- key="vnfc.vnfc-name = $tmp.ss.vnfc-name" >
- <parameter name="nfc-function" value="`$tmp.ss.nfc-function`" />
- <parameter name="nfc-naming-code" value="`$tmp.ss.nfc-naming-code`" />
- <parameter name="orchestration-status" value="pending-create" />
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="Failed to save vnfc object in AAI" />
- </return>
- </outcome>
- </save>
- </outcome>
- <outcome value='false'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'vnfc object not updated because param.value of vnfc-name is null; '+ $error-message`" />
- </return>
- </outcome>
- </switch>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-aai-vfmodule-put' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'generic-vnf and vf-module not updated; '+ $error-message`" />
- </return>
- </outcome>
- </call>
- </block>
- </outcome>
- <outcome value='false'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="`'SS: vnfc-name: ' + $tmp.ss.vnfc-name`"/>
- </record>
- </outcome>
- </switch>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name='filename' value='/var/tmp/ss-vf-assign.log' />
</execute>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml
index 5cece27e..4ca47e63 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml
@@ -5,12 +5,14 @@
<block atomic='true'>
<set>
<parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />
- <parameter name='ss.capability.execution-order[1]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[2]' value='vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[3]' value='alts-license-assign' />
- <parameter name='ss.capability.execution-order[4]' value='alts-entitlement-assign' />
- <parameter name='ss.capability.execution-order[5]' value='generate-name' />
- <parameter name='ss.capability.execution-order_length' value='6' />
+ <parameter name='ss.capability.execution-order[1]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[2]' value='eipam-ip-assign' />
+ <parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='alts-license-assign' />
+ <parameter name='ss.capability.execution-order[6]' value='alts-entitlement-assign' />
+ <parameter name='ss.capability.execution-order[7]' value='generate-name' />
+ <parameter name='ss.capability.execution-order_length' value='8' />
</set>
<set>
<parameter name='ss.capability-type' value='vf-module' />
@@ -25,23 +27,9 @@ ss.capability.execution-order
<set>
<parameter name='ss.capability-action' value='unassign' />
</set>
- <switch test='`$ss.capability-name`'>
- <outcome value='alts-entitlement-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='alts-license-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
- </set>
- </outcome>
- </switch>
+ <set>
+ <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
+ </set>
<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<set>
<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />
@@ -51,11 +39,6 @@ ss.capability.execution-order
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`'>
<outcome value='SUCCESS'>
<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
- <outcome value='success'>
- <set>
- <parameter name='`$ss.capability-dg`' value='UNASSIGNED' />
- </set>
- </outcome>
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -114,9 +97,6 @@ ss.capability.execution-order
<parameter name='format' value='json' />
<parameter name='httpMethod' value='PUT' />
<parameter name="responsePrefix" value="mdsal-ss-vfmodule" />
- <outcome value='success'>
- <block></block>
- </outcome>
<outcome value='failure'>
<block atomic="true">
<set>
@@ -141,16 +121,7 @@ ss.capability.execution-order
</call>
</outcome>
<outcome value='DELETED'>
- <block>
- <set>
- <parameter name='`$ss.capability-dg`' value='UNASSIGNED' />
- </set>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`"/>
- <parameter name="field2" value="`'SS: ss.capability-name: ' + $ss.capability-name`"/>
- </record>
- </block>
+ <block></block>
</outcome>
<outcome value='Other'>
<block atomic='true'>
@@ -170,49 +141,30 @@ ss.capability.execution-order
</switch>
</for>
</for>
- <switch test="`$self-serve-generate-name == 'UNASSIGNED'`">
- <outcome value='false'>
- <block atomic='true'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="`'SS: self-serve-generate-name status: ' + $self-serve-generate-name`"/>
- <parameter name="field2" value="`'SS: self-serve-unresolved-composite-data: ' + $self-serve-unresolved-composite-data`"/>
- </record>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'AAI Put is being skipped because NOT all capability components have SUCCESS status; '+ $error-message`" />
- </return>
- </block>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
+ </set>
</outcome>
- <outcome value='true'>
- <block atomic='true'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].name`'>
- <outcome value='vnfc-name'>
- <!--
-<outcome value='vmxvre_name_0'>
--->
- <block>
- <set>
- <parameter name='tmp.ss.vnfc-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].value`' />
- </set>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc"
- key="vnfc.vnfc-name = $tmp.ss.vnfc-name" >
- <outcome value='failure'>
- <set>
- <parameter name='error-message' value='Failed to delete vnfc object in AnAI' />
- </set>
- </outcome>
- <outcome value='not-found'>
- <block></block>
- </outcome>
- </delete>
- <break/>
- </block>
- </outcome>
- </switch>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <set>
+ <parameter name="tmpidx" value="`$idx - 1`"/>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
+ </set>
</for>
+ <!--EIPAM plug-in needs this attribute set with this name-->
+ <set>
+ <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
+ </set>
</block>
</outcome>
</switch>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml
new file mode 100644
index 00000000..5b98ce48
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml
@@ -0,0 +1,61 @@
+<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='self-serve-vfmodule-changeassign' mode='sync'>
+ <block atomic="true">
+ <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="no param name/value provided in vf-module-request-input" />
+ </return>
+ </outcome>
+ </switch>
+ <for index='i' start='0' end='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`' >
+ <block atomic='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`'>
+ <outcome value='Other'>
+ <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$j].name == $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$i].name`'>
+ <outcome value='false'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No param with param[].name = ' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name + ' found in service-data.'`" />
+ </return>
+ </outcome>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$j].resource-resolution-data.status`' value='PENDING'/>
+ <parameter name='ss.input.param.index' value='`$i`' />
+ <parameter name='ss.service-data.param.index' value='`$j`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-generate-name-changeassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from self-service-generate-name-changeassign" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from self-service-generate-name-changeassign" />
+ </return>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml
index 1d8f6fc4..66243dd4 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml
@@ -71,6 +71,13 @@
<parameter name="error-message" value="Error reading VF_MODEL table" />
</return>
</outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No VF_MODEL found with customization_uuid = ' + $vf-module-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`" />
+ </return>
+ </outcome>
<outcome value='success'>
<set>
<parameter name='tmp.sdnc-model-name' value='`$db1.vf-model.sdnc-model-name`' />
@@ -79,7 +86,8 @@
</outcome>
</get-resource>
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='SELECT vf_module_label from VF_MODULE_MODEL WHERE vf_customization_uuid = $vf-module-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'
+ key='SELECT vf_module_label from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid
+ AND vf_module_label is not null'
pfx='db1.vf-module-model'>
<outcome value='failure'>
<return status='failure'>
@@ -88,6 +96,13 @@
<parameter name="error-message" value="Error reading VF_MODULE_MODEL table" />
</return>
</outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'vf_module_label not found in VF_MODULE_MODEL WHERE customization_uuid = ' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`" />
+ </return>
+ </outcome>
<outcome value='success'>
<set>
<parameter name='tmp.vf-module-label' value='`$db1.vf-module-model.vf-module-label`' />
@@ -106,7 +121,7 @@
<parameter name="tmp.config-name-value-payload9" value="`$tmp.config-name-value-payload8 + '&quot;aic-cloud-region&quot;:&quot;' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region + '&quot;'`"/>
<parameter name="tmp.config-name-value-payload91" value="`'{' + $tmp.config-name-value-payload9 + '}'`" />
</set>
- <execute plugin='org.openecomp.sdnc.config.assignment.service.ConfigAssignmentNode' method='process'>
+ <execute plugin='org.onap.ccsdk.config.assignment.service.ConfigAssignmentNode' method='process'>
<parameter name="request-id" value='`$request-id`' />
<parameter name="resource-id" value='`$resource-id`' />
<parameter name="resource-type" value='`$resource-type`' />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml
index efc55ab8..393c7bcb 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml
@@ -169,12 +169,15 @@
<parameter name='ss.capability.execution-order[1]' value='alts-entitlement-assign' />
<parameter name='ss.capability.execution-order[2]' value='alts-license-assign' />
<parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[4]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[5]' value='eipam-create-pool"' />
- <parameter name='ss.capability.execution-order[6]' value='mac-address-assign' />
- <parameter name='ss.capability.execution-order[7]' value='create-vpe-pool' />
- <parameter name='ss.capability.execution-order[8]' value='unresolved-composite-data' />
- <parameter name='ss.capability.execution-order_length' value='9' />
+ <parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='eipam-ip-assign' />
+ <parameter name='ss.capability.execution-order[6]' value='eipam-create-pool"' />
+ <parameter name='ss.capability.execution-order[7]' value='mac-address-assign' />
+ <parameter name='ss.capability.execution-order[8]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[9]' value='create-vpe-pool' />
+ <parameter name='ss.capability.execution-order[10]' value='unresolved-composite-data' />
+ <parameter name='ss.capability.execution-order[11]' value='aai-vnf-put' />
+ <parameter name='ss.capability.execution-order_length' value='12' />
</set>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources' value='true' />
@@ -210,23 +213,9 @@ ss.capability.execution-order[]
<set>
<parameter name='ss.capability-action' value='assign' />
</set>
- <switch test='`$ss.capability-name`'>
- <outcome value='alts-entitlement-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='alts-license-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
- </set>
- </outcome>
- </switch>
+ <set>
+ <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
+ </set>
<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<set>
<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />
@@ -234,11 +223,6 @@ ss.capability.execution-order[]
<switch test='`$ss.capability-name == $tmp.param.capability-name`'>
<outcome value='true'>
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`'>
- <outcome value='SUCCESS'>
- <set>
- <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
- </set>
- </outcome>
<outcome value='PENDING'>
<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
<outcome value='failure'>
@@ -291,22 +275,15 @@ ss.capability.execution-order[]
<parameter name='format' value='json' />
<parameter name='httpMethod' value='PUT' />
<parameter name="responsePrefix" value="mdsal-ss-vnf" />
- <outcome value='success'>
- <block></block>
- </outcome>
<outcome value='failure'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
+ </set>
</outcome>
<outcome value='not-found'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
+ </set>
</outcome>
</execute>
<return status='failure'>
@@ -315,11 +292,6 @@ ss.capability.execution-order[]
</return>
</block>
</outcome>
- <outcome value='success'>
- <set>
- <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
- </set>
- </outcome>
</call>
</outcome>
<outcome value='FAILED'>
@@ -374,22 +346,15 @@ ss.capability.execution-order[]
<parameter name='format' value='json' />
<parameter name='httpMethod' value='PUT' />
<parameter name="responsePrefix" value="mdsal-ss-vnf" />
- <outcome value='success'>
- <block></block>
- </outcome>
<outcome value='failure'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
+ </set>
</outcome>
<outcome value='not-found'>
- <block atomic="true">
- <set>
- <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
- </set>
- </block>
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vnf assignments during assign in MD-SAL" />
+ </set>
</outcome>
</execute>
<return status='failure'>
@@ -398,11 +363,6 @@ ss.capability.execution-order[]
</return>
</block>
</outcome>
- <outcome value='success'>
- <set>
- <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
- </set>
- </outcome>
</call>
</outcome>
</switch>
@@ -410,78 +370,6 @@ ss.capability.execution-order[]
</switch>
</for>
</for>
- <switch test="`$self-serve-generate-name == 'ASSIGNED'`">
- <outcome value='false'>
- <block atomic='true'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="`'SS: self-serve-generate-name status: ' + $self-serve-generate-name`"/>
- </record>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'AAI Put is being skipped because NOT all capability components have SUCCESS status; '+ $error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='true'>
- <switch test="`$self-serve-unresolved-composite-data == 'ASSIGNED' or $self-serve-unresolved-composite-data == ''`">
- <outcome value='false'>
- <block atomic='true'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="`'SS: self-serve-unresolved-composite-data: ' + $self-serve-unresolved-composite-data`"/>
- </record>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'AAI Put is being skipped because NOT all capability components have SUCCESS status; '+ $error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='true'>
- <block atomic='true'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].name`'>
- <outcome value='vnf_name'>
- <block atomic='true'>
- <set>
- <parameter name='tmp.ss.vnf-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].value`' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="generic-vnf"
- key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id "
- pfx="tmp.aai.update.vnf" >
- <parameter name="vnf-name" value='`$tmp.ss.vnf-name`' />
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Failed to update generic-vnf.vnf-name in AnAI with vnf-name=' + $tmp.ss.vnf-name`" />
- </return>
- </outcome>
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Failed to update generic-vnf.vnf-name because generic-vnf with vnf-name=' + $tmp.ss.vnf-name + ' is not found in AAI'`" />
- </return>
- </outcome>
- </update>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$tmp.ss.vnf-name`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'generic-vnf not updated because vnf-name param.value is null; '+ $error-message`" />
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name='filename' value='/var/tmp/ss-vnf-assign.log' />
</execute>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml
new file mode 100644
index 00000000..dc7b1609
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml
@@ -0,0 +1,61 @@
+<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='self-serve-vnf-changeassign' mode='sync'>
+ <block atomic="true">
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="no param name/value provided in vnf-request-input" />
+ </return>
+ </outcome>
+ </switch>
+ <for index='i' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <block atomic='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`'>
+ <outcome value='Other'>
+ <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$j].name == $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name`'>
+ <outcome value='false'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No param with param[].name = ' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name + ' found in service-data.'`" />
+ </return>
+ </outcome>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$j].resource-resolution-data.status`' value='PENDING'/>
+ <parameter name='ss.input.param.index' value='`$i`' />
+ <parameter name='ss.service-data.param.index' value='`$j`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-generate-name-changeassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from self-service-generate-name-changeassign" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from self-service-generate-name-changeassign" />
+ </return>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml
index ac31f90d..004d249a 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml
@@ -96,7 +96,7 @@
<parameter name="tmp.config-name-value-payload7" value="`$tmp.config-name-value-payload6 + '&quot;aic-cloud-region&quot;:&quot;' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + '&quot;'`"/>
<parameter name="tmp.json-payload" value="`'{' + $tmp.config-name-value-payload7 + '}'`" />
</set>
- <execute plugin='org.openecomp.sdnc.config.assignment.service.ConfigAssignmentNode' method='process'>
+ <execute plugin='org.onap.ccsdk.config.assignment.service.ConfigAssignmentNode' method='process'>
<parameter name="request-id" value='`$request-id`' />
<parameter name="resource-id" value='`$resource-id`' />
<parameter name="resource-type" value='`$resource-type`' />
@@ -147,11 +147,15 @@
</switch>
<switch test='`$tmp.mso.param.found`'>
<outcome value='false'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>
- <parameter name='highnum' value='`$highnum + 1`' />
- </set>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>
+ </set>
+ <set>
+ <parameter name='highnum' value='`$highnum + 1`' />
+ </set>
+ </block>
</outcome>
</switch>
</block>
@@ -181,11 +185,19 @@
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
<parameter name='num' value='`$num + 1`' />
</set>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
+ </set>
+ <set>
+ <parameter name='num' value='`$num + 1`' />
+ </set>
</for>
</outcome>
</switch>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' value='`$highnum + 1`'/>
+ </set>
+ <set>
<parameter name='highnum' value='`$highnum + 1`' />
</set>
</block>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml
index 968a4595..517948ee 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-unassign.xml
@@ -5,12 +5,14 @@
<block atomic='true'>
<set>
<parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />
- <parameter name='ss.capability.execution-order[1]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[2]' value='vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[3]' value='alts-license-assign' />
- <parameter name='ss.capability.execution-order[4]' value='alts-entitlement-assign' />
- <parameter name='ss.capability.execution-order[5]' value='generate-name' />
- <parameter name='ss.capability.execution-order_length' value='6' />
+ <parameter name='ss.capability.execution-order[1]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[2]' value='eipam-ip-assign' />
+ <parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='alts-license-assign' />
+ <parameter name='ss.capability.execution-order[6]' value='alts-entitlement-assign' />
+ <parameter name='ss.capability.execution-order[7]' value='generate-name' />
+ <parameter name='ss.capability.execution-order_length' value='8' />
</set>
<set>
<parameter name='ss.capability-type' value='vnf' />
@@ -25,23 +27,9 @@ ss.capability.execution-order[]
<set>
<parameter name='ss.capability-action' value='unassign' />
</set>
- <switch test='`$ss.capability-name`'>
- <outcome value='alts-entitlement-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='alts-license-assign'>
- <set>
- <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
- </set>
- </outcome>
- </switch>
+ <set>
+ <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
+ </set>
<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<set>
<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />
@@ -51,11 +39,6 @@ ss.capability.execution-order[]
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`'>
<outcome value='SUCCESS'>
<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
- <outcome value='success'>
- <set>
- <parameter name='`$ss.capability-dg`' value='UNASSIGNED' />
- </set>
- </outcome>
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -98,9 +81,6 @@ ss.capability.execution-order[]
<parameter name='format' value='json' />
<parameter name='httpMethod' value='PUT' />
<parameter name="responsePrefix" value="mdsal-ss-vnf" />
- <outcome value='success'>
- <block></block>
- </outcome>
<outcome value='failure'>
<block atomic="true">
<set>
@@ -145,6 +125,29 @@ ss.capability.execution-order[]
</switch>
</for>
</for>
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs." value=""/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
+ <set>
+ <parameter name="$tmpidx" value="`$idx - 1`"/>
+ <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
+ </set>
+ </for>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
<parameter name='filename' value='/var/tmp/ss-vnf-assign.log' />
</execute>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
index c68737e4..07ae1e64 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
@@ -98,631 +98,2044 @@
</outcome>
</switch>
</for>
- </block>
- <switch test="`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.vf_module_label == 'true'`">
- <outcome value='true'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-assign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Failed to create self-serve assignment for vf-module with vf-module-id=' + $vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
- </return>
- </outcome>
- </call>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ <switch test="`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.vf_module_label == 'true'`">
+ <outcome value='true'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-assign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to create self-serve assignment for vf-module with vf-module-id=' + $vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
+ </return>
+ </outcome>
+ </call>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='false'>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT sdnc_model_name from VF_MODEL
WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid
AND sdnc_model_name is not null'
pfx='db.vf-model-name'>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VF_MODEL table" />
- </return>
- </outcome>
- <outcome value='success'>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODEL table" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT vf_module_label from VF_MODULE_MODEL
WHERE vf_customization_uuid = $vf-module-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid
AND vf_module_label is not null '
pfx='db.vf-module-label'>
- <outcome value='success'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-assign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Failed to create self-serve assignment for vf-module with vf-module-id=' + $vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
- </return>
- </outcome>
- </call>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
- value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VF_MODULE_MODEL table" />
- </return>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
+ <outcome value='success'>
<block atomic="true">
- <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
- <outcome value=''>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-assign' mode='sync' >
+ <outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="vf-module-information.vf-module-request-input.vf-module-name is a required input" />
+ <parameter name="error-message" value="`'Failed to create self-serve assignment for vf-module with vf-module-id=' + $vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
</return>
</outcome>
- </switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value=''>
- <set>
- <parameter name='vf-module-index' value='0' />
- </set>
- </outcome>
- <outcome value='Other'>
- <block>
+ </call>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ value='PendingCreate' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODULE_MODEL table" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value=''>
<set>
- <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ <parameter name='vf-module-index' value='0' />
</set>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
- <outcome value='true'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ </set>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
+ <outcome value='true'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
+ ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`" />
- </return>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
+ </return>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
- <parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
- <parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
+ <parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
+ <parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cloud-region"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner AND
cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region"
pfx='aai.cloud-region' local-only='false' >
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Cloud region not found in AAI" />
- </return>
- </outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving cloud region from AAI" />
- </return>
- </outcome>
- </get-resource>
- <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
- <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
- <outcome value='complex'>
- <block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='aai-uid-split' />
- <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
- <parameter name='regex' value='/' />
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region not found in AAI" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving cloud region from AAI" />
+ </return>
+ </outcome>
+ </get-resource>
+ <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
+ <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
+ <outcome value='complex'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='aai-uid-split' />
+ <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
+ <parameter name='regex' value='/' />
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
- </set>
- <break/>
- </block>
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
+ </return>
</outcome>
</switch>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
- </return>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
value='`$db.vf-module-model.invariant-uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
value='`$db.vf-module-model.uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
value='`$db.vf-module-model.version`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
value='`$db.vf-module-model.name`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-parameters.'
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-parameters.'
value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='restapiUrl' value="`$prop.controller.url + $prop.restapi.preloadinformation + $vf-module-topology-operation-input.vf-module-request-input.vf-module-name + '/vf-module'`" />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='GET' />
- <parameter name="responsePrefix" value="mdsal-preload" />
- <outcome value='failure'>
- <block>
- <switch test='`$mdsal-preload.response-code`'>
- <outcome value='404'>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
- <outcome value='failure'>
- <return status='failure'></return>
- </outcome>
- </call>
- </outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving preload-information" />
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
- <outcome value='success'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-preload' mode='sync' >
+ </set>
+ <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
+ <outcome value=''>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
<outcome value='failure'>
- <return status='failure'></return>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
</outcome>
</call>
- </block>
- </outcome>
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <block atomic="true">
+ </outcome>
+ <outcome value='Other'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value="`$prop.controller.url + $prop.restapi.preloadinformation + $vf-module-topology-operation-input.vf-module-request-input.vf-module-name + '/vf-module'`" />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="mdsal-preload" />
+ <outcome value='failure'>
+ <block>
+ <switch test='`$mdsal-preload.response-code`'>
+ <outcome value='404'>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving preload-information" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmoduleb.log' />
+ </execute>
+ <switch test='`$from-preload`'>
+ <outcome value='false'>
+ <set>
+ <parameter name='automated-assignment' value='true' />
+ </set>
+ </outcome>
+ <outcome value='true'>
+ <set>
+ <parameter name='automated-assignment' value='false' />
+ </set>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
<for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <block>
- <set>
- <parameter name='tmp.network-role' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-network-role`' />
- </set>
+ <for silentFailure='true' index='vnfc-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <block atomic="true">
<set>
- <parameter name='found-network-role' value='false' />
+ <parameter name='vnf-network-index' value='-1' />
</set>
- <for index='vnf-network-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-role`'>
<outcome value='true'>
- <block>
+ <block atomic="true">
+ <set>
+ <parameter name='vnf-network-index' value='`$idx`' />
+ </set>
<set>
- <parameter name='found-network-role' value='true' />
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].network-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-id`' />
</set>
<break/>
</block>
</outcome>
</switch>
</for>
- <switch test='`$found-network-role`'>
- <outcome value='false'>
+ <switch test='`$vnf-network-index`'>
+ <outcome value='-1'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message"
- value="`'Cannot find VNF network role ' + $tmp.network-role`" />
+ <parameter name="error-message" value="`'VNFC network role '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
+ + ' is not found in VNF network list'
+ `" />
</return>
</block>
</outcome>
</switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-id`' />
- </set>
<for index='subnet-role-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
+ end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet_length`' >
<for index='address-family-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
- <parameter name='tmp.subnet-role'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-subnet-role`' />
- </set>
- <set>
- <parameter name='found-subnet' value='false' />
- </set>
- <for silentFailure='true' index='vnf-address-family-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].ip-version`'>
- <outcome value='true'>
- <switch test='`$tmp.subnet-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].subnet-role`'>
- <outcome value='true'>
- <block>
+ end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.address-family'
+ value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
+ </set>
+ <block atomic="true">
+ <set>
+ <parameter name='af-count' value='0' />
+ </set>
+ <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
+ <switch test='`$tmp.address-family
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
+ </set>
+ <set>
+ <parameter name='af-count' value='`$af-count + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$af-count`'>
+ <outcome value='1'>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id'
+ value='`$subnet-id`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='-1' />
+ </set>
+ <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
+ <switch test='`$tmp.address-family
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
+ <outcome value='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <switch test='`$tmp.address-family`'>
+ <outcome value='ipv4'>
+ <set>
+ <parameter name='ip-type' value='IPv4' />
+ </set>
+ </outcome>
+ <outcome value='ipv6'>
+ <set>
+ <parameter name='ip-type' value='IPv6' />
+ </set>
+ </outcome>
+ </switch>
+ <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="isInSameSubnet">
+ <parameter name="firstIPAddr" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`" />
+ <parameter name="secondIPAddr" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address`" />
+ <parameter name="subnet" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`" />
+ <parameter name="ipType" value="`$ip-type`" />
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$subnet-id`'>
+ <outcome value='-1'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Not able to find VNF network subnet that contains address '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address
+ `" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
<set>
- <parameter name='found-subnet' value='true' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id' value='`$subnet-id`' />
</set>
- <break/>
</block>
</outcome>
</switch>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-subnet`'>
- <outcome value='false'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find VNF address family '
- + $tmp.address-family
- + ' for subnet role '
- + $tmp.subnet-role`" />
- </return>
</block>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].sdnc-subnet-id`' />
- </set>
- </block>
+ </block>
+ </outcome>
+ </switch>
</for>
</for>
</block>
</for>
</for>
- <for silentFailure='true' index='vm-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block>
- <set>
- <parameter name='tmp.network-role' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-role`' />
- </set>
- <for index='vnf-network-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
- <outcome value='true'>
- <break/>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmodulec.log' />
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block atomic="true">
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VFC_RELATED_NETWORK_ROLE where vfc_customization_uuid = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid
+ and network_role = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'
+ pfx='db.vnf-related-network-role[]'>
+ <outcome value='failure'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VFC_RELATED_NETWORK_ROLE table" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <for index='db-related-network-index' start='0' end='`$db.vnf-related-network-role_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='found-related-network' value='false' />
+ </set>
+ <for silentFailure='true' index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='related-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network[$related-network-index].network-role
+ == $db.vnf-related-network-role[$db-related-network-index].related-network-role`'>
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='found-related-network' value='true' />
+ </set>
+ <set>
+ <parameter name='saved-vnf-network-index' value='`$vnf-network-index`' />
+ <parameter name='saved-related-network-index' value='`$related-network-index`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$found-related-network`'>
+ <outcome value='true'>
+ <break/>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test='`$found-related-network`'>
+ <outcome value='false'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find related network '
+ + $db.vnf-related-network-role[$db-related-network-index].related-network-role + ' in vnf-networks'`" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].is-trunked'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].is-trunked`' />
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].segmentation-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].segmentation-id`' />
+ </set>
+ <set>
+ <parameter name='rn-index' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' />
+ </set>
+ <switch test='`$rn-index`'>
+ <outcome value=''>
+ <set>
+ <parameter name='rn-index' value='0' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-role'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-role`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.vlan-interface`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.lower-tag-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.upper-tag-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.is-private`' />
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length'
+ value='`$rn-index + 1`' />
+ </set>
+ </block>
+ </for>
+ </outcome>
+ </get-resource>
+ </block>
+ </for>
+ </block>
+ </for>
+ <set>
+ <parameter name='vf-module-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vf-module-topology-operation-input.service-information.service-instance-id
+ + '/service-data/vnfs/vnf/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-id
+ + '/vnf-data/vf-modules/vf-module/'
+ + $vf-module-topology-operation-input.vf-module-information.vf-module-id
+ + '/vf-module-data/vf-module-topology/'`"/>
+ <parameter name='vnf-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vf-module-topology-operation-input.service-information.service-instance-id
+ + '/service-data/vnfs/vnf/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-id
+ + '/vnf-data/vnf-topology/'`"/>
+ <parameter name='service-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vf-module-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'`"/>
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module"
+ key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
+ <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`" />
+ <parameter name="model-version-id" value="`$tmp.vf-module-topology.onap-model-information.model-uuid`" />
+ <parameter name="model-customization-id" value="`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`" />
+ <parameter name="selflink" value="`$vf-module-object-path`" />
+ <parameter name="automated-assignment" value="`$automated-assignment`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.nfc-naming-code' value='DEFAULT' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.nfc-naming-code' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`' />
+ </set>
</outcome>
</switch>
- </for>
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length &gt; 0`'>
- <outcome value='true'>
- <block atomic="true">
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.nfc-function' value='DEFAULT' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
<set>
- <parameter name='tmp.address-family' value='ipv4' />
+ <parameter name='tmp.nfc-function' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`' />
</set>
+ </outcome>
+ </switch>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name" >
+ <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
+ <parameter name="nfc-naming-code" value="`$tmp.nfc-naming-code`" />
+ <parameter name="nfc-function" value="`$tmp.nfc-function`" />
+ <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`" />
+ <parameter name="model-version-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].uuid`" />
+ <parameter name="model-customization-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid`" />
+ <parameter name="orchestration-status" value="`PendingCreate`" />
+ <parameter name="in-maint" value="true" />
+ <parameter name="prov-status" value="`PREPROV`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].created_flag' value='true' />
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
+ $vf-module-topology-operation-input.vnf-information.vnf-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="vf-module" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
+ $vf-module-topology-operation-input.vnf-information.vnf-id +
+ '/vf-modules/vf-module/' +
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vnfc relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vnfc relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="cp-instance-id" />
+ </execute>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id" >
+ <parameter name="cp-instance-id" value="`$cp-instance-id`" />
+ <parameter name="port-id" value="0" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating cp object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating cp object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
<set>
- <parameter name='found-address-family' value='false' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.connection-point-id'
+ value='`$cp-instance-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.port-id'
+ value='0' />
</set>
- <for silentFailure='true' index='vnf-address-family-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].ip-version`'>
+ <for silentFailure='true' index='subnet-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
+ <for silentFailure='true' index='address-family-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.address-family'
+ value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
+ </set>
+ <for silentFailure='true' index='address-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`' >
+ <switch test='`$tmp.address-family`'>
+ <outcome value='ipv4'>
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-interface-ipv4-address-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
+ AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
+ <parameter name="l3-interface-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
+ <parameter name="l3-interface-ipv4-prefix-length" value="32" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating l3-interface-ipv4-address-list object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-interface-ipv4-address-list:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
+ AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
+ '/subnets/subnet/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating l3-interface-ipv4-address-list relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating l3-interface-ipv4-address-list relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </outcome>
+ <outcome value='ipv6'>
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-interface-ipv6-address-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
+ AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
+ <parameter name="l3-interface-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
+ <parameter name="l3-interface-ipv6-prefix-length" value="128" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating l3-interface-ipv6-address-list object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-interface-ipv6-address-list:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
+ AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
+ '/subnets/subnet/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating l3-interface-ipv6-address-list relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating l3-interface-ipv6-address-list relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </for>
+ <for index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
<outcome value='true'>
- <block>
- <set>
- <parameter name='found-address-family' value='true' />
- </set>
- <break/>
- </block>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating cp relationship to l3-network in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating cp relationship to l3-network" />
+ </return>
+ </block>
+ </outcome>
+ </save>
</outcome>
</switch>
</for>
- <switch test='`$found-address-family`'>
- <outcome value='false'>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
+ <outcome value='true'>
+ <for silentFailure='true' index='related-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' >
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].network-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="vlan-tag" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/vlan-tags/vlan-tag/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].vlan-tags.vlan-interface`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating cp relationship to l3-network and vlan-tag in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating cp relationship to l3-network and vlan-tag" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </for>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No l3-network found in AAI for network ID '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].created-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='ipv4-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv4-address-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" >
+ <parameter name="vip-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]`" />
+ <parameter name="vip-ipv4-prefix-length" value="32" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find VNF address family '
- + $tmp.address-family
- + ' for network role '
- + $tmp.network-role`" />
+ <parameter name="error-message" value="Error saving vip-ipv4-address-list in AAI" />
</return>
</block>
</outcome>
- </switch>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error saving vip-ipv4-address-list" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv4-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv4-address-list:relationship-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
+ + '/subnets/subnet/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv4-subnet-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/vnfcs/vnfc/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ == $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv4-address-list:relationship-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="cp" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/vnfcs/vnfc/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ + '/cps/cp/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ <for silentFailure='true' index='ipv6-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv6-address-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]" >
+ <parameter name="vip-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]`" />
+ <parameter name="vip-ipv6-prefix-length" value="128" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vip-ipv6-address-list in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error saving vip-ipv6-address-list" />
+ </return>
+ </block>
+ </outcome>
+ </save>
<set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv4-subnet-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].sdnc-subnet-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv6-flag' value='true' />
</set>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv6-address-list:relationship-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
+ + '/subnets/subnet/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv6-subnet-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/vnfcs/vnfc/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv6-address-list relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv6-address-list relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ == $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv6-address-list:relationship-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="cp" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/vnfcs/vnfc/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ + '/cps/cp/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-assign' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vlantaggingfailure.log' />
+ </execute>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-generate-heat-parameters' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmoduleheat.log' />
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+ <block atomic="true">
+ <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
+ AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
+ AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
+ </outcome>
+ </delete>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
+key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , $prop.cloud-region.cloud-owner )" >
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
+ </outcome>
+ </save>
+ </block>
+ </for>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
+ value='$vf-module-topology-operation-input.sdnc-request-header.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
+ value='$vf-module-topology-operation-input.request-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
+ value='$vf-module-topology-operation-input.service-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
+ value='$vf-module-topology-operation-input.vnf-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
+ value='$vf-module-topology-operation-input.vf-module-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
+ value='$vf-module-topology-operation-input.vf-module-request-input.' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ value='PendingCreate' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </block>
+ </outcome>
+ </get-resource>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vf-module-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ </set>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
+ <outcome value='true'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
+ + ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`" />
+ </return>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
+ value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
+ <parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
+ <parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cloud-region"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner AND
+ cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region"
+ pfx='aai.cloud-region' local-only='false' >
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region not found in AAI" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving cloud region from AAI" />
+ </return>
+ </outcome>
+ </get-resource>
+ <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
+ <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
+ <outcome value='complex'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='aai-uid-split' />
+ <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
+ <parameter name='regex' value='/' />
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
+ value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
+ value='`$db.vf-module-model.invariant-uuid`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
+ value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
+ value='`$db.vf-module-model.uuid`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
+ value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
+ value='`$db.vf-module-model.version`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
+ value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
+ value='`$db.vf-module-model.name`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
+ value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'
+ value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-parameters.'
+ value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />
+ </set>
+ <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
+ <outcome value=''>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value="`$prop.controller.url + $prop.restapi.preloadinformation + $vf-module-topology-operation-input.vf-module-request-input.vf-module-name + '/vf-module'`" />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="mdsal-preload" />
+ <outcome value='failure'>
+ <block>
+ <switch test='`$mdsal-preload.response-code`'>
+ <outcome value='404'>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving preload-information" />
+ </return>
</block>
</outcome>
</switch>
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length &gt; 0`'>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmoduleb.log' />
+ </execute>
+ <switch test='`$from-preload`'>
+ <outcome value='false'>
+ <set>
+ <parameter name='automated-assignment' value='true' />
+ </set>
+ </outcome>
+ <outcome value='true'>
+ <set>
+ <parameter name='automated-assignment' value='false' />
+ </set>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <for silentFailure='true' index='vnfc-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='vnf-network-index' value='-1' />
+ </set>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-role`'>
<outcome value='true'>
<block atomic="true">
<set>
- <parameter name='tmp.address-family' value='ipv6' />
+ <parameter name='vnf-network-index' value='`$idx`' />
</set>
<set>
- <parameter name='found-address-family' value='false' />
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].network-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-id`' />
</set>
- <for silentFailure='true' index='vnf-address-family-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].ip-version`'>
- <outcome value='true'>
- <block>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$vnf-network-index`'>
+ <outcome value='-1'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNFC network role '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
+ + ' is not found in VNF network list'
+ `" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <for index='subnet-role-index' start='0'
+ end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet_length`' >
+ <for index='address-family-index' start='0'
+ end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.address-family'
+ value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
+ </set>
+ <block atomic="true">
+ <set>
+ <parameter name='af-count' value='0' />
+ </set>
+ <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
+ <switch test='`$tmp.address-family
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
+ </set>
+ <set>
+ <parameter name='af-count' value='`$af-count + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$af-count`'>
+ <outcome value='1'>
<set>
- <parameter name='found-address-family' value='true' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id'
+ value='`$subnet-id`' />
</set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='-1' />
+ </set>
+ <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
+ <switch test='`$tmp.address-family
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
+ <outcome value='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <switch test='`$tmp.address-family`'>
+ <outcome value='ipv4'>
+ <set>
+ <parameter name='ip-type' value='IPv4' />
+ </set>
+ </outcome>
+ <outcome value='ipv6'>
+ <set>
+ <parameter name='ip-type' value='IPv6' />
+ </set>
+ </outcome>
+ </switch>
+ <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="isInSameSubnet">
+ <parameter name="firstIPAddr" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`" />
+ <parameter name="secondIPAddr" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address`" />
+ <parameter name="subnet" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`" />
+ <parameter name="ipType" value="`$ip-type`" />
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$subnet-id`'>
+ <outcome value='-1'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Not able to find VNF network subnet that contains address '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address
+ `" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id' value='`$subnet-id`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </for>
+ </block>
+ </for>
+ </for>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmodulec.log' />
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block atomic="true">
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VFC_RELATED_NETWORK_ROLE where vfc_customization_uuid = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid
+ and network_role = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'
+ pfx='db.vnf-related-network-role[]'>
+ <outcome value='failure'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VFC_RELATED_NETWORK_ROLE table" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <for index='db-related-network-index' start='0' end='`$db.vnf-related-network-role_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='found-related-network' value='false' />
+ </set>
+ <for silentFailure='true' index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='related-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network[$related-network-index].network-role
+ == $db.vnf-related-network-role[$db-related-network-index].related-network-role`'>
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='found-related-network' value='true' />
+ </set>
+ <set>
+ <parameter name='saved-vnf-network-index' value='`$vnf-network-index`' />
+ <parameter name='saved-related-network-index' value='`$related-network-index`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$found-related-network`'>
+ <outcome value='true'>
<break/>
- </block>
- </outcome>
- </switch>
+ </outcome>
+ </switch>
+ </block>
</for>
- <switch test='`$found-address-family`'>
+ <switch test='`$found-related-network`'>
<outcome value='false'>
- <block atomic="true">
+ <block>
<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find VNF address family '
- + $tmp.address-family
- + ' for network role '
- + $tmp.network-role`" />
+ <parameter name="error-message" value="`'Unable to find related network '
+ + $db.vnf-related-network-role[$db-related-network-index].related-network-role + ' in vnf-networks'`" />
</return>
</block>
</outcome>
</switch>
<set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv6-subnet-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].sdnc-subnet-id`' />
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].is-trunked'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].is-trunked`' />
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].segmentation-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].segmentation-id`' />
+ </set>
+ <set>
+ <parameter name='rn-index' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' />
+ </set>
+ <switch test='`$rn-index`'>
+ <outcome value=''>
+ <set>
+ <parameter name='rn-index' value='0' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-role'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-role`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.vlan-interface`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.lower-tag-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.upper-tag-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.is-private`' />
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length'
+ value='`$rn-index + 1`' />
</set>
</block>
- </outcome>
- </switch>
- </block>
- </for>
- </block>
- </for>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmoduleb.log' />
- </execute>
- <set>
- <parameter name='vf-module-object-path'
+ </for>
+ </outcome>
+ </get-resource>
+ </block>
+ </for>
+ </block>
+ </for>
+ <set>
+ <parameter name='vf-module-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
- + $service-data.service-topology.service-topology-identifier.service-instance-id
+ + $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/vnfs/vnf/'
+ $service-data.vnfs.vnf[$vnf-index].vnf-id
+ '/vnf-data/vf-modules/vf-module/'
- + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ + $vf-module-topology-operation-input.vf-module-information.vf-module-id
+ '/vf-module-data/vf-module-topology/'`"/>
- </set>
- <switch test='`$from-preload`'>
- <outcome value='false'>
- <set>
- <parameter name='automated-assignment' value='true' />
- </set>
- </outcome>
- <outcome value='true'>
- <set>
- <parameter name='automated-assignment' value='false' />
- </set>
- </outcome>
- </switch>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <parameter name='vnf-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vf-module-topology-operation-input.service-information.service-instance-id
+ + '/service-data/vnfs/vnf/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-id
+ + '/vnf-data/vnf-topology/'`"/>
+ <parameter name='service-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vf-module-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'`"/>
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vf-module"
key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.onap-model-information.model-uuid`" />
- <parameter name="model-customization-id" value="`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`" />
- <parameter name="selflink" value="`$vf-module-object-path`" />
- <parameter name="automated-assignment" value="`$automated-assignment`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
- </return>
- </block>
- </outcome>
- </update>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
+ <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`" />
+ <parameter name="model-version-id" value="`$tmp.vf-module-topology.onap-model-information.model-uuid`" />
+ <parameter name="model-customization-id" value="`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`" />
+ <parameter name="selflink" value="`$vf-module-object-path`" />
+ <parameter name="automated-assignment" value="`$automated-assignment`" />
+ <outcome value='failure'>
<block atomic="true">
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.nfc-naming-code' value='DEFAULT' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.nfc-naming-code' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.nfc-function' value='DEFAULT' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.nfc-function' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`' />
+ </set>
+ </outcome>
+ </switch>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vnfc"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name" >
- <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <parameter name="nfc-naming-code" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`" />
- <parameter name="nfc-function" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].uuid`" />
- <parameter name="orchestration-status" value="`PendingCreate`" />
- <parameter name="prov-status" value="`PREPROV`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].created_flag' value='true' />
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
+ <parameter name="nfc-naming-code" value="`$tmp.nfc-naming-code`" />
+ <parameter name="nfc-function" value="`$tmp.nfc-function`" />
+ <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`" />
+ <parameter name="model-version-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].uuid`" />
+ <parameter name="model-customization-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid`" />
+ <parameter name="orchestration-status" value="`PendingCreate`" />
+ <parameter name="in-maint" value="true" />
+ <parameter name="prov-status" value="`PREPROV`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].created_flag' value='true' />
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vnfc:relationship-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
$vf-module-topology-operation-input.vnf-information.vnf-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vf-module" />
- <parameter name="relationship-list.relationship[1].related-link"
+ <parameter name="relationship-list.relationship[1].related-to" value="vf-module" />
+ <parameter name="relationship-list.relationship[1].related-link"
value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
$vf-module-topology-operation-input.vnf-information.vnf-id +
'/vf-modules/vf-module/' +
$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vnfc relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vnfc relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vnfc relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vnfc relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <block atomic="true">
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="cp-instance-id" />
+ </execute>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id" >
+ <parameter name="cp-instance-id" value="`$cp-instance-id`" />
+ <parameter name="port-id" value="0" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating cp object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating cp object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.connection-point-id'
+ value='`$cp-instance-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.port-id'
+ value='0' />
+ </set>
<for silentFailure='true' index='subnet-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
<for silentFailure='true' index='address-family-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
<block atomic="true">
@@ -737,6 +2150,7 @@
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv4-address-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
<parameter name="l3-interface-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
<parameter name="l3-interface-ipv4-prefix-length" value="32" />
@@ -755,6 +2169,7 @@
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv4-address-list:relationship-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
force="true" pfx="tmp.AnAI-data">
<parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
@@ -795,6 +2210,7 @@
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv6-address-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
<parameter name="l3-interface-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
<parameter name="l3-interface-ipv6-prefix-length" value="128" />
@@ -813,6 +2229,7 @@
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv6-address-list:relationship-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
force="true" pfx="tmp.AnAI-data">
<parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
@@ -853,80 +2270,162 @@
</block>
</for>
</for>
- </for>
- </block>
- </for>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <for index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating cp relationship to l3-network in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating cp relationship to l3-network" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ </for>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
+ <outcome value='true'>
+ <for silentFailure='true' index='related-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' >
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].network-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="vlan-tag" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/vlan-tags/vlan-tag/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].vlan-tags.vlan-interface`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating cp relationship to l3-network and vlan-tag in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating cp relationship to l3-network and vlan-tag" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </for>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vf-module:relationship-list"
key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/' +
$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No l3-network found in AAI for network ID '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].created-flag' value='true' />
- </set>
- <for silentFailure='true' index='ipv4-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
+ <outcome value='failure'>
<block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No l3-network found in AAI for network ID '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].created-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='ipv4-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv4-address-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" >
- <parameter name="vip-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]`" />
- <parameter name="vip-ipv4-prefix-length" value="32" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv4-address-list in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv4-address-list" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv4-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <parameter name="vip-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]`" />
+ <parameter name="vip-ipv4-prefix-length" value="32" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vip-ipv4-address-list in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error saving vip-ipv4-address-list" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv4-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv4-address-list:relationship-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
@@ -964,44 +2463,86 @@
</block>
</outcome>
</save>
- </for>
- </block>
- </for>
- <for silentFailure='true' index='ipv6-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ == $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv4-address-list:relationship-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="cp" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/vnfcs/vnfc/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ + '/cps/cp/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ <for silentFailure='true' index='ipv6-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv6-address-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]" >
- <parameter name="vip-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]`" />
- <parameter name="vip-ipv6-prefix-length" value="128" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv6-address-list in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv6-address-list" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv6-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <parameter name="vip-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]`" />
+ <parameter name="vip-ipv6-prefix-length" value="128" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vip-ipv6-address-list in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error saving vip-ipv6-address-list" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv6-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv6-address-list:relationship-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
@@ -1039,1038 +2580,139 @@
</block>
</outcome>
</save>
- </for>
- </block>
- </for>
- </block>
- </for>
- </block>
- </for>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-assign' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vlantaggingfailure.log' />
- </execute>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
- <block atomic="true">
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
- AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
- AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </delete>
- <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
-key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , $prop.cloud-region.cloud-owner )" >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </save>
- </block>
- </for>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
- value='$vf-module-topology-operation-input.sdnc-request-header.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
- value='$vf-module-topology-operation-input.request-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
- value='$vf-module-topology-operation-input.service-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
- value='$vf-module-topology-operation-input.vnf-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
- value='$vf-module-topology-operation-input.vf-module-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
- value='$vf-module-topology-operation-input.vf-module-request-input.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
- value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </block>
- </outcome>
- </get-resource>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <block atomic="true">
- <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vf-module-information.vf-module-request-input.vf-module-name is a required input" />
- </return>
- </outcome>
- </switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value=''>
- <set>
- <parameter name='vf-module-index' value='0' />
- </set>
- </outcome>
- <outcome value='Other'>
- <block>
- <set>
- <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
- </set>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
- <outcome value='true'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
- + ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`" />
- </return>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
- value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
- <parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
- <parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="cloud-region"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner AND
- cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region"
- pfx='aai.cloud-region' local-only='false' >
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Cloud region not found in AAI" />
- </return>
- </outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving cloud region from AAI" />
- </return>
- </outcome>
- </get-resource>
- <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
- <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
- <outcome value='complex'>
- <block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='aai-uid-split' />
- <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
- <parameter name='regex' value='/' />
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
- value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
- </return>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
- value='`$db.vf-module-model.invariant-uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
- value='`$db.vf-module-model.uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
- value='`$db.vf-module-model.version`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
- value='`$db.vf-module-model.name`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-parameters.'
- value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='restapiUrl' value="`$prop.controller.url + $prop.restapi.preloadinformation + $vf-module-topology-operation-input.vf-module-request-input.vf-module-name + '/vf-module'`" />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='GET' />
- <parameter name="responsePrefix" value="mdsal-preload" />
- <outcome value='failure'>
- <block>
- <switch test='`$mdsal-preload.response-code`'>
- <outcome value='404'>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
- <outcome value='failure'>
- <return status='failure'></return>
- </outcome>
- </call>
- </outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving preload-information" />
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
- <outcome value='success'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-preload' mode='sync' >
- <outcome value='failure'>
- <return status='failure'></return>
- </outcome>
- </call>
- </block>
- </outcome>
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <block atomic="true">
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <block>
- <set>
- <parameter name='tmp.network-role' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-network-role`' />
- </set>
- <set>
- <parameter name='found-network-role' value='false' />
- </set>
- <for index='vnf-network-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
- <outcome value='true'>
- <block>
- <set>
- <parameter name='found-network-role' value='true' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-network-role`'>
- <outcome value='false'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message"
- value="`'Cannot find VNF network role ' + $tmp.network-role`" />
- </return>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-id`' />
- </set>
- <for index='subnet-role-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
- <for index='address-family-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
- <parameter name='tmp.subnet-role'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-subnet-role`' />
- </set>
- <set>
- <parameter name='found-subnet' value='false' />
- </set>
- <for silentFailure='true' index='vnf-address-family-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].ip-version`'>
- <outcome value='true'>
- <switch test='`$tmp.subnet-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].subnet-role`'>
- <outcome value='true'>
- <block>
- <set>
- <parameter name='found-subnet' value='true' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-subnet`'>
- <outcome value='false'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find VNF address family '
- + $tmp.address-family
- + ' for subnet role '
- + $tmp.subnet-role`" />
- </return>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].sdnc-subnet-id`' />
- </set>
- </block>
- </for>
- </for>
- </block>
- </for>
- </for>
- <for silentFailure='true' index='vm-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block>
- <set>
- <parameter name='tmp.network-role' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-role`' />
- </set>
- <for index='vnf-network-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
- <outcome value='true'>
- <break/>
- </outcome>
- </switch>
- </for>
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length &gt; 0`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family' value='ipv4' />
- </set>
- <set>
- <parameter name='found-address-family' value='false' />
- </set>
- <for silentFailure='true' index='vnf-address-family-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].ip-version`'>
- <outcome value='true'>
- <block>
- <set>
- <parameter name='found-address-family' value='true' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-address-family`'>
- <outcome value='false'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find VNF address family '
- + $tmp.address-family
- + ' for network role '
- + $tmp.network-role`" />
- </return>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv4-subnet-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].sdnc-subnet-id`' />
- </set>
- </block>
- </outcome>
- </switch>
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length &gt; 0`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family' value='ipv6' />
- </set>
- <set>
- <parameter name='found-address-family' value='false' />
- </set>
- <for silentFailure='true' index='vnf-address-family-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].ip-version`'>
- <outcome value='true'>
- <block>
- <set>
- <parameter name='found-address-family' value='true' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-address-family`'>
- <outcome value='false'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find VNF address family '
- + $tmp.address-family
- + ' for network role '
- + $tmp.network-role`" />
- </return>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv6-subnet-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$vnf-address-family-index].sdnc-subnet-id`' />
- </set>
- </block>
- </outcome>
- </switch>
- </block>
- </for>
- </block>
- </for>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmoduleb.log' />
- </execute>
- <set>
- <parameter name='vf-module-object-path'
- value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
- + $service-data.service-topology.service-topology-identifier.service-instance-id
- + '/service-data/vnfs/vnf/'
- + $service-data.vnfs.vnf[$vnf-index].vnf-id
- + '/vnf-data/vf-modules/vf-module/'
- + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
- + '/vf-module-data/vf-module-topology/'`"/>
- </set>
- <switch test='`$from-preload`'>
- <outcome value='false'>
- <set>
- <parameter name='automated-assignment' value='true' />
- </set>
- </outcome>
- <outcome value='true'>
- <set>
- <parameter name='automated-assignment' value='false' />
- </set>
- </outcome>
- </switch>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vf-module"
- key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
- AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.onap-model-information.model-uuid`" />
- <parameter name="model-customization-id" value="`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`" />
- <parameter name="selflink" value="`$vf-module-object-path`" />
- <parameter name="automated-assignment" value="`$automated-assignment`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
- </return>
- </block>
- </outcome>
- </update>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <block atomic="true">
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name" >
- <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <parameter name="nfc-naming-code" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`" />
- <parameter name="nfc-function" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].uuid`" />
- <parameter name="orchestration-status" value="`PendingCreate`" />
- <parameter name="prov-status" value="`PREPROV`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].created_flag' value='true' />
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
- $vf-module-topology-operation-input.vnf-information.vnf-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vf-module" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
- $vf-module-topology-operation-input.vnf-information.vnf-id +
- '/vf-modules/vf-module/' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vnfc relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vnfc relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <for silentFailure='true' index='subnet-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
- <for silentFailure='true' index='address-family-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
- </set>
- <for silentFailure='true' index='address-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`' >
- <switch test='`$tmp.address-family`'>
- <outcome value='ipv4'>
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv4-address-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
- <parameter name="l3-interface-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
- <parameter name="l3-interface-ipv4-prefix-length" value="32" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating l3-interface-ipv4-address-list object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv4-address-list:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
- '/subnets/subnet/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating l3-interface-ipv4-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating l3-interface-ipv4-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- </block>
- </outcome>
- <outcome value='ipv6'>
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv6-address-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
- <parameter name="l3-interface-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
- <parameter name="l3-interface-ipv6-prefix-length" value="128" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating l3-interface-ipv6-address-list object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
+ <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ == $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
+ <outcome value='true'>
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv6-address-list:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
+ resource="vip-ipv6-address-list:relationship-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-to" value="cp" />
<parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
- '/subnets/subnet/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
+ value="`'/aai/v$/network/vnfcs/vnfc/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ + '/cps/cp/'
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
<outcome value='failure'>
<block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating l3-interface-ipv6-address-list relationships in AAI" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
</return>
</block>
</outcome>
<outcome value='not-found'>
<block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating l3-interface-ipv6-address-list relationships" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
</return>
</block>
</outcome>
</save>
- </block>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </block>
</for>
- </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-assign' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vlantaggingfailure.log' />
+ </execute>
+ <return status='failure'></return>
</block>
- </for>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ </outcome>
+ </call>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-generate-heat-parameters' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmoduleheat.log' />
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
<block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vf-module:relationship-list"
- key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
- AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
+ <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
+ AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
+ AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
<outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
- </return>
- </block>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
</outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No l3-network found in AAI for network ID '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
- </return>
- </block>
+ </delete>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
+key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , $prop.cloud-region.cloud-owner )" >
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
</outcome>
</save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].created-flag' value='true' />
- </set>
- <for silentFailure='true' index='ipv4-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv4-address-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" >
- <parameter name="vip-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]`" />
- <parameter name="vip-ipv4-prefix-length" value="32" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv4-address-list in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv4-address-list" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv4-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv4-address-list:relationship-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
- + '/subnets/subnet/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv4-subnet-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/vnfcs/vnfc/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv4-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- </for>
- </block>
- </for>
- <for silentFailure='true' index='ipv6-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv6-address-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]" >
- <parameter name="vip-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]`" />
- <parameter name="vip-ipv6-prefix-length" value="128" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv6-address-list in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv6-address-list" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv6-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv6-address-list:relationship-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
- + '/subnets/subnet/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv6-subnet-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/vnfcs/vnfc/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv6-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv6-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- </for>
- </block>
- </for>
</block>
</for>
- </block>
- </for>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-assign' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vlantaggingfailure.log' />
- </execute>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
- <block atomic="true">
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
- AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
- AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </delete>
- <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
-key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , $prop.cloud-region.cloud-owner )" >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </save>
- </block>
</for>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
value='$vf-module-topology-operation-input.sdnc-request-header.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
value='$vf-module-topology-operation-input.request-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
value='$vf-module-topology-operation-input.service-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
value='$vf-module-topology-operation-input.vnf-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
value='$vf-module-topology-operation-input.vf-module-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
value='$vf-module-topology-operation-input.vf-module-request-input.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
</block>
- </block>
- </outcome>
- </get-resource>
- </outcome>
- </switch>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ </block>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml
index 5a0d61e5..b9547f37 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml
@@ -85,41 +85,64 @@
</return>
</outcome>
</switch>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.sdnc-generated-cloud-resources`'>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vfmodule-changeassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error while updating self-serve vf-module resources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT * from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'
pfx='db.vf-module-model'>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VF_MODULE_MODEL table" />
- </return>
- </outcome>
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No model found for VF module customization UUID ' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`" />
- </return>
- </outcome>
- </get-resource>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.onap-model-information.'
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODULE_MODEL table" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No model found for VF module customization UUID ' + $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.onap-model-information.'
value='$vf-module-topology-operation-input.vf-module-information.onap-model-information.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
value='Created' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
+ </set>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
index d9907226..f804500f 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
@@ -85,155 +85,252 @@
</return>
</outcome>
</switch>
- <set>
- <parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
-key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-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 updating EIPAM_IP_ASSIGNMENTS table" />
- </return>
- </outcome>
- </update>
- <!--EIPAM plug-in needs this attribute set with this name-->
- <set>
- <parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />
- </set>
- <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
- <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error in EIPAM unassign IP address" />
- </return>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.sdnc-generated-cloud-resources`'>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-unassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error while unassigning self-serve vf-moldule esources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </outcome>
+ </call>
</outcome>
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+ <outcome value='Other'>
<block atomic="true">
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ <set>
+ <parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
+key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-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 updating EIPAM_IP_ASSIGNMENTS table" />
+ </return>
+ </outcome>
+ </update>
+ <!--EIPAM plug-in needs this attribute set with this name-->
+ <set>
+ <parameter name='service-data.service-information.service-type' value='`$service-data.service-information.subscription-service-type`' />
+ </set>
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+ <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error in EIPAM unassign IP address" />
+ </return>
+ </outcome>
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <for silentFailure='true' index='vm-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+ <block atomic="true">
+ <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
AND vm_name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
+ </outcome>
+ </delete>
+ </block>
+ </for>
+ </for>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>
+ <outcome value=''>
+ <block></block>
</outcome>
- </delete>
- </block>
- </for>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <outcome value='Other'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="instance-groups"
key="instance-group.instance-group-function = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[0].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function
AND instance-group.instance-group-type = 'L3-NETWORK'"
pfx='aai.instance-group' local-only='false' >
- <outcome value='success'>
- <for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >
- <for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >
- <for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >
- <switch test="`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key
+ <outcome value='success'>
+ <for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >
+ <for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >
+ <for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >
+ <switch test="`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key
== 'service-instance.service-instance-id'`">
- <outcome value='true'>
- <switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value
+ <outcome value='true'>
+ <switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value
== $service-data.service-information.service-instance-id`'>
- <outcome value='true'>
- <block>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value='1'>
+ <outcome value='true'>
<block>
- <set>
- <parameter name='tmp.status' value="`'PENDING_DELETE_' + $aai.instance-group.instance-group[$ig-index].id`" />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value='1'>
+ <block>
+ <set>
+ <parameter name='tmp.status' value="`'PENDING_DELETE_' + $aai.instance-group.instance-group[$ig-index].id`" />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
key="UPDATE EIPAM_IP_ASSIGNMENTS set status = $tmp.status WHERE info = $aai.instance-group.instance-group[$ig-index].id" ></update>
- <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
- <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
- </execute>
- </block>
- </outcome>
- </switch>
- <for index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
- <switch test='`$aai.instance-group.instance-group[$ig-index].id
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="unassignIPAddress">
+ <parameter name="deleteEIPAM_status" value="`$tmp.status`" />
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ <for index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
+ <switch test='`$aai.instance-group.instance-group[$ig-index].id
== $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>
- <outcome value='true'>
- <for index='network-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$nig-index].networks.network_length`' >
- <set>
- <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].vlan-tag-id'
+ <outcome value='true'>
+ <for index='network-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$nig-index].networks.network_length`' >
+ <set>
+ <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].vlan-tag-id'
value='' />
- <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].network-status'
+ <parameter name='service-data.network-instance-groups.network-instance-group[$nig-index].networks.network[$network-index].network-status'
value='unassigned' />
- </set>
+ </set>
+ </for>
+ </outcome>
+ </switch>
</for>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </for>
+ </for>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name`'>
+ <outcome value='Other'>
+ <block></block>
+ </outcome>
+ <outcome value=''>
+ <block atomic="true">
+ <set>
+ <parameter name='generate-unique-name-input.name-table-type' value='VF_MODULE_INSTANCE' />
+ <parameter name='generate-unique-name-input.context-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='generate-unique-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-unique-name' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='vm-type-index' start='0'
+ end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block>
+ <for silentFailure='true' index='vm-name-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-name-index]`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VM' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNFC' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`' />
+ <parameter name='naming-policy-generate-name-input.vm-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vnfc-index]`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
</outcome>
</switch>
- </for>
- </for>
- </for>
- </outcome>
- </get-resource>
- </outcome>
- </switch>
- <for silentFailure='true' index='vm-type-index' start='0'
- end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vnfc"
key="vnfc.vnfc-name = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"></delete>
- </for>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value='1'>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
- </set>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <set>
- <parameter name="tmpidx" value="`$idx - 1`"/>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
- </set>
+ </block>
+ </for>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block>
+ <for silentFailure='true' index='ipv4-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv4-address-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv4-address-list.vip-ipv4-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" ></delete>
+ </for>
+ <for silentFailure='true' index='ipv6-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv6-address-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv6-address-list.vip-ipv6-address = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]" ></delete>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ </block>
</for>
- <!--EIPAM plug-in needs this attribute set with this name-->
- <set>
- <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
- </set>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules." value=""/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vf-module-index + 1`' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <set>
+ <parameter name="tmpidx" value="`$idx - 1`"/>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmpidx]." value="$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx]." />
+ </set>
+ </for>
+ <!--EIPAM plug-in needs this attribute set with this name-->
+ <set>
+ <parameter name='lastidx' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length - 1`' />
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$lastidx]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length" value="`$lastidx`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
</block>
</outcome>
</switch>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
index 9f60d4bf..8c1d2166 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
@@ -353,9 +353,6 @@
</set>
</outcome>
</switch>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vnf.log' />
- </execute>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'
value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
@@ -609,6 +606,18 @@
<for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >
<block atomic="true">
<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>
+ <outcome value='service-instance'>
+ <for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
+ <outcome value='service-instance.service-instance-id'>
+ <set>
+ <parameter name='network-service-instance-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
<outcome value='cloud-region'>
<for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
@@ -726,6 +735,12 @@
value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-name'
value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-name`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].network-start-address'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].network-start-address`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].gateway-address'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].gateway-address`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].cidr-mask'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].cidr-mask`' />
</set>
<switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].dhcp-enabled`'>
<outcome value='true'>
@@ -750,6 +765,240 @@
</block>
</outcome>
</switch>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VNF_RELATED_NETWORK_ROLE where vnf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid
+ and network_role = $db.vf-network-role-mapping[$role-index].network-role'
+ pfx='db.vnf-related-network-role[]'>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VNF_RELATED_NETWORK_ROLE table" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.network-topology-identifier-structure`"/>
+ <parameter name="outputPath" value="tmp.part"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$network-service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.part`"/>
+ <parameter name="outputPath" value="tmp.ntis-url"/>
+ <parameter name="target" value="{network-id}"/>
+ <parameter name="replacement" value="`$l3-network-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ntis-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="mdsal-ntis" />
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`
+ 'Error retrieving network-topology-identifier-structure for service instance '
+ + $network-service-instance-id
+ + ' and network-id '
+ + $l3-network-id`" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].is-trunked'
+ value='`$mdsal-ntis.network-topology-identifier-structure.is-trunked`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].segmentation-id'
+ value='`$mdsal-ntis.network-topology-identifier-structure.segmentation-id`' />
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="custom-query"
+ key="format = 'resource'"
+ force="true"
+ local-only="false"
+ pfx="tmp.AnAI-data.oe">
+ <parameter name="start[0]" value="`'nodes/service-instances/service-instance?service-instance-id=' + $network-service-instance-id `" />
+ <parameter name="start_length" value="1" />
+ <parameter name="query" value="/query/owning-entity-fromService-instance" />
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error getting owning entity from service instance" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Unable to find owning entity from service instance" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='rn-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network_length`' />
+ </set>
+ <switch test='`$rn-index`'>
+ <outcome value=''>
+ <set>
+ <parameter name='rn-index' value='0' />
+ </set>
+ </outcome>
+ </switch>
+ <for index='rel-network-role-index' start='0' end='`$db.vnf-related-network-role_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="custom-query"
+ key="format = 'resource'"
+ force="true"
+ local-only="false"
+ pfx="tmp.AnAI-data.get-networks">
+ <parameter name="start[0]" value="`'/business/owning-entities/owning-entity/' + $tmp.AnAI-data.oe.results[0].owning-entity.owning-entity-id `" />
+ <parameter name="start_length" value="1" />
+ <parameter name="query" value="`'/query/getNetworks?networkRole=' + $db.vnf-related-network-role[$rel-network-role-index].related-network-role
+ + '&amp;cloudRegionId=' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error calling getNetworks custom query in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No l3-network returned from getNetworks custom query for related network role '
+ + $db.vnf-related-network-role[0].related-network-role`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].network-id'
+ value='`$tmp.AnAI-data.get-networks.results[0].l3-network.network-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].network-role'
+ value='`$tmp.AnAI-data.get-networks.results[0].l3-network.network-role`' />
+ </set>
+ <for index='rel-index' start='0' end='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship_length`' >
+ <switch test='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship[$rel-index].related-to`'>
+ <outcome value='vlan-tag'>
+ <block atomic="true">
+ <set>
+ <parameter name='vlan-tag-id' value='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value`' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vlan-tag"
+ key="vlan-tag.vlan-tag-id = $vlan-tag-id"
+ pfx='aai.vlan-tag' local-only='false'
+>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error getting vlan-tag object from AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
+ value='`$aai.vlan-tag.vlan-tag-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
+ value='`$aai.vlan-tag.vlan-id-outer`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
+ value='`$aai.vlan-tag.vlan-id-inner`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
+ value='`$aai.vlan-tag.is-private`' />
+ </set>
+ </outcome>
+ </get-resource>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network_length'
+ value='`$rn-index + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
<set>
<parameter name='network-index' value='`$network-index + 1`' />
</set>
@@ -757,6 +1006,9 @@
</outcome>
</switch>
</for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vnfa.log' />
+ </execute>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'
value='`$network-index`' />
@@ -906,7 +1158,11 @@
+ $vnf-topology-operation-input.service-information.service-instance-id
+ '/service-data/vnfs/vnf/'
+ $service-data.vnfs.vnf[$vnf-index].vnf-id
- + '/vnf-data/vnf-topology'`"/>
+ + '/vnf-data/vnf-topology/'`"/>
+ <parameter name='service-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $vnf-topology-operation-input.service-information.service-instance-id
+ + '/service-data/service-topology/'`"/>
</set>
<update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf"
@@ -919,6 +1175,7 @@
<parameter name="model-invariant-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid`" />
<parameter name="model-version-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid`" />
<parameter name="model-customization-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`" />
+ <parameter name="in-maint" value="true" />
<parameter name="selflink" value="`$vnf-object-path`" />
<outcome value='failure'>
<block>
@@ -1015,7 +1272,7 @@
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-viprend.log' />
+ <parameter name='filename' value='/var/tmp/bgb-vnf.log' />
</execute>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml
index 5823f6ba..60634ade 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml
@@ -42,40 +42,63 @@
</return>
</outcome>
</switch>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-changeassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT * from VF_MODEL WHERE customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'
pfx='db.vf-model'>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VF_MODEL table" />
- </return>
- </outcome>
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No model found for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`" />
- </return>
- </outcome>
- </get-resource>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.'
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODEL table" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No model found for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.'
value='`$vnf-topology-operation-input.vnf-information.onap-model-information.`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
- </set>
- <set>
- <parameter name='service-object-path'
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <set>
+ <parameter name='service-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $service-topology-operation-input.service-information.service-instance-id
+ '/service-data/service-topology/'`"/>
- </set>
- <return status='success'></return>
+ </set>
+ <return status='success'></return>
+ </block>
+ </outcome>
+ </switch>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
index a50fa7d9..b3ea3447 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
@@ -59,68 +59,61 @@
</switch>
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>
<outcome value='true'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
- </return>
- </outcome>
- </call>
- </block>
- </outcome>
- </switch>
- <switch test='`$service-data.vnfs.vnf_length`'>
- <outcome value='1'>
- <set>
- <parameter name="service-data.vnfs." value=""/>
- </set>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </outcome>
+ </call>
</outcome>
<outcome value='Other'>
<block atomic="true">
- <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
- <set>
- <parameter name="$tmpidx" value="`$idx - 1`"/>
- <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
- </set>
- </for>
- <set>
- <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1]." value=""/>
- </set>
- <set>
- <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
- </set>
- </block>
- </outcome>
- </switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>
- <outcome value='false'>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- </outcome>
- <outcome value=''>
- <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="service-data.vnfs." value=""/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <for index='idx' start='`$vnf-index + 1`' end='`$service-data.vnfs.vnf_length`' >
+ <set>
+ <parameter name="$tmpidx" value="`$idx - 1`"/>
+ <parameter name="service-data.vnfs.vnf[$tmpidx]." value="$service-data.vnfs.vnf[$idx]." />
+ </set>
+ </for>
+ <set>
+ <parameter name="service-data.vnfs.vnf[$service-data.vnfs.vnf_length-1]." value=""/>
+ </set>
+ <set>
+ <parameter name="service-data.vnfs.vnf_length" value="`$service-data.vnfs.vnf_length - 1`"/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
<set>
<parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
<parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
<parameter name='naming-policy-generate-name-input.action' value='DELETE' />
</set>
<call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
</block>
</outcome>
</switch>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
</block>
</method>
</service-logic> \ No newline at end of file