aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorCheung, Pat <kc1472@att.com>2018-11-01 18:30:58 +0000
committerTimoney, Dan (dt5972) <dtimoney@att.com>2018-11-01 14:47:50 -0400
commitbc265458adb8189cff56662fca6b543ffde8b750 (patch)
treeabfaad4a1514212a81aa8a8295f6219bab3394f6 /platform-logic/generic-resource-api/src/main/xml
parent5f2deedd4d0d1c0b8b1c97cf9e7e3e5f9f1138cf (diff)
self-serve DG bug fixes
Fixing various bug fixes for self serve logics Change-Id: I9127900df427483ac9bc93c51774d7b1f97ba1c5 Issue-ID: SDNC-509 Signed-off-by: Cheung, Pat <kc1472@att.com> Former-commit-id: 8eb03908d9de95073ec6484a95009a033f324b8a
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.xml9116
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-vnf-put.xml473
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-capability-param-resolution.xml4
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-vlan-tag-assign.xml263
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml2
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml18
6 files changed, 5880 insertions, 3996 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
index 2cf8ee17..63a6ca26 100644
--- 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
@@ -3,6 +3,15 @@
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-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">
@@ -49,7 +58,7 @@
<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'>
+ <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>
@@ -100,9 +109,10 @@
<parameter name='ss.param.loopback0-ipv4-address-index' value='`$bidx`' />
</set>
</outcome>
- <outcome value='aai-vf-module-put'>
+ <outcome value='ipv4-loopback0-address'>
<set>
- <parameter name='ss.param.aai-vf-module-put-index' value='`$bidx`' />
+ <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='nfc-naming-code'>
@@ -135,12 +145,6 @@
<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`' />
@@ -153,6 +157,58 @@
<parameter name='ss.param.vlan-id-outer-index' value='`$bidx`' />
</set>
</outcome>
+ <outcome value='availability_zone_0'>
+ <set>
+ <parameter name='ss.param.availability-zone-0' 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.availability-zone-0-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='aai-vf-module-put'>
+ <block>
+ <set>
+ <parameter name='ss.param.aai-vf-module-put-index' value='`$bidx`' />
+ </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[$bidx].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[$bidx].resource-resolution-data.resource-key[$kidx].name`'>
+ <outcome value='generic-vnf'>
+ <set>
+ <parameter name='ss.resource-key.generic-vnf' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vf-module'>
+ <set>
+ <parameter name='ss.resource-key.vf-module' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='volume-group'>
+ <set>
+ <parameter name='ss.resource-key.volume-group' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc'>
+ <set>
+ <parameter name='ss.resource-key.vnfc' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='connection-points'>
+ <set>
+ <parameter name='ss.resource-key.connection-points' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='l-interface'>
+ <set>
+ <parameter name='ss.resource-key.l-interface' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='l3-netework'>
+ <set>
+ <parameter name='ss.resource-key.l3-network' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
</switch>
</outcome>
</execute>
@@ -161,1097 +217,1854 @@
<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"
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <block atomic='true'>
+ <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'
+ <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'
+ </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"
+ </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>
+ <switch test="`$ss.param.ipv4-loopback0-address != ''`">
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$ss.param.ipv4-loopback0-address`' />
+ <parameter name='target' value='$' />
+ <outcome value='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="`'ss.param.ipv4-loopback0-address = ' + $ss.param.ipv4-loopback0-address`"/>
+ <parameter name="field3" value="__SKIP ipv4-loopback0-address update for generic-vnf in AnAI__"/>
+ </record>
+ </outcome>
+ <outcome value='false'>
+ <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'
+ <parameter name="ipv4-loopback0-address" value='`$ss.param.ipv4-loopback0-address`' />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf.ipv4-loopback0-address in AnAI with ipv4-loopback0-address=' + $ss.param.ipv4-loopback0-address + '; ' + $error-message`" />
+ </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 because vnf-id =' + $ss.param.vnf-id + ' is not found in AAI. ' + $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='ss.ipv4-loopback0-address-updated' value='true' />
+ </set>
+ </outcome>
+ </update>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <switch test="`$ss.param.ipv4-oam-address != ''`">
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$ss.param.ipv4-oam-address`' />
+ <parameter name='target' value='$' />
+ <outcome value='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="`'ss.param.ipv4-oam-address = ' + $ss.param.ipv4-oam-address`"/>
+ <parameter name="field3" value="__SKIP ipv4-oam-address update for generic-vnf in AnAI__"/>
+ </record>
+ </outcome>
+ <outcome value='false'>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="ipv4-oam-address" value='`$ss.param.ipv4-oam-address`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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>
- <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'
+ </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`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf.ipv4-oam-address in AnAI with ipv4-oam-address=' + $ss.param.ipv4-oam-address + '; ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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"
+ </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'
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf because vnf-id =' + $ss.param.vnf-id + ' is not found in AAI' + '; ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='ss.ipv4-oam-address-updated' value='true' />
+ </set>
+ </outcome>
+ </update>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <switch test="`$ss.param.as-number != ''`">
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$ss.param.as-number`' />
+ <parameter name='target' value='$' />
+ <outcome value='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="`'ss.param.as-number = ' + $ss.param.as-number`"/>
+ <parameter name="field3" value="__SKIP as-number update for generic-vnf in AnAI__"/>
+ </record>
+ </outcome>
+ <outcome value='false'>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="as-number" value='`$ss.param.as-number`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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"
+ </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'
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.ipv4-oam-address-updated`">
+ <outcome value='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.ipv4-oam-address 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"
+ </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'
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-oam-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-oam-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf.as-number in AnAI with as-number=' + $ss.param.as-number + '; ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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"
+ </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'
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.ipv4-oam-address-updated`">
+ <outcome value='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.ipv4-oam-address 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"
+ </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>
+ <parameter name="ipv4-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-oam-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-oam-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf because vnf-id =' + $ss.param.vnf-id + ' is not found in AAI. ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='ss.as-number-updated' value='true' />
+ </set>
+ </outcome>
+ </update>
</outcome>
- <outcome value='success'>
- <set>
- <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
- </set>
+ </execute>
+ </outcome>
+ </switch>
+ <switch test="`$ss.param.vlan-id-outer != ''`">
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$ss.param.vlan-id-outer`' />
+ <parameter name='target' value='$' />
+ <outcome value='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="`'ss.param.vlan-id-outer = ' + $ss.param.vlan-id-outer`"/>
+ <parameter name="field3" value="__SKIP vlan-id-outer update for generic-vnf in AnAI__"/>
+ </record>
</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'
+ <outcome value='false'>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $ss.param.vnf-id " >
+ <parameter name="vlan-id-outer" value='`$ss.param.vlan-id-outer`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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"
+ </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>
+ <parameter name="ipv4-loopback0-address" value='`$tmp.aai.vnf.ipv4-loopback0-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.ipv4-oam-address-updated`">
+ <outcome value='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.ipv4-oam-address 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-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-oam-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-oam-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.as-number-updated`">
+ <outcome value='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.as-number 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="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.as-number update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.as-number update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf.vlan-id-outer in AnAI with as-number=' + $ss.param.as-number + '; ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.ipv4-oam-address-updated`">
+ <outcome value='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.ipv4-oam-address 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-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-oam-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-oam-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.as-number-updated`">
+ <outcome value='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.as-number 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="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.as-number update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.as-number update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update generic-vnf because vnf-id =' + $ss.param.vnf-id + ' is not found in AAI. ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='ss.vlan-id-outer-updated' value='true' />
+ </set>
+ </outcome>
+ </update>
</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>
+ </execute>
+ </outcome>
+ </switch>
+ <switch test="`$ss.param.availability-zone-0 != ''`">
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$ss.param.availability-zone-0`' />
+ <parameter name='target' value='$' />
+ <outcome value='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="`'ss.param.availability-zone-0 = ' + $ss.param.availability-zone-0`"/>
+ <parameter name="field3" value="__SKIP availability-zone-0 update for generic-vnf in AnAI__"/>
+ </record>
</outcome>
- <outcome value='success'>
- <set>
- <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
- </set>
+ <outcome value='false'>
+ <block atomic='true'>
+ <set>
+ <parameter name='ss.availability-zone.related-link'
+ value="`'/aai/v$/cloud-infrastructure/cloud-regions/cloud-region/' +
+ $prop.cloud-region.cloud-owner + '/' + $ss.param.aic-cloud-region +
+ '/availability-zones/availability-zone/' +
+ $ss.param.availability-zone-0`" />
+ </set>
+ <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="availability-zone" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`$ss.availability-zone.related-link`" />
+ <!--
+<parameter name="relationship-list.relationship[0].related-to" value="availability-zone" /><parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" /><parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.cloud-region.cloud-owner`" /><parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" /><parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$ss.param.aic-cloud-region`" /><parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="availability-zone.availability-zone-name" /><parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$ss.param.availability-zone-0`" />
+-->
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.ipv4-oam-address-updated`">
+ <outcome value='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.ipv4-oam-address 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-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-oam-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-oam-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.as-number-updated`">
+ <outcome value='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.as-number 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="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.as-number update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.as-number update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.vlan-id-outer-updated`">
+ <outcome value='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.vlan-id-outer 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="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.vlan-id-outer update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.vlan-id-outer update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to save availability-zone relationship for generic-vnf in AnAI with availability-zone-name =' + $ss.param.as-number + '; ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.ipv4-loopback0-address-updated`">
+ <outcome value='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.ipv4-loopback0-address 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`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-loopback0-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-loopback0-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.ipv4-oam-address-updated`">
+ <outcome value='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.ipv4-oam-address 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-oam-address" value='`$tmp.aai.vnf.ipv4-oam-address`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.ipv4-oam-address update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.ipv4-oam-address update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.as-number-updated`">
+ <outcome value='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.as-number 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="as-number" value='`$tmp.aai.vnf.as-number`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.as-number update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.as-number update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.vlan-id-outer-updated`">
+ <outcome value='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.vlan-id-outer 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="vlan-id-outer" value='`$tmp.aai.vnf.vlan-id-outer`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf.vlan-id-outer update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf.vlan-id-outer update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to create availability-zone relationship because generic-vnf with vnf-id =' + $ss.param.vnf-id + ' is not found in AAI. ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='ss.availability-zone-0-updated' value='true' />
+ </set>
+ </outcome>
+ </save>
+ </block>
</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>
+ </execute>
+ </outcome>
+ </switch>
</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'>
+ </switch>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
<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'
+ <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>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </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>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </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>
+ <set>
+ <parameter name='ss.selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' +
+$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.service-instance-id +
+'/service-data/vnfs/vnf/' +
+$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.vnf-id +
+'/vnf-data/vf-modules/vf-module/' +
+$ss.param.vf-module-id +
+'/vf-module-data/vf-module-topology/'`" />
+ </set>
+ <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>
+ <parameter name="vf-module-name" value='`$ss.param.vf-module-name`' />
+ <parameter name="selflink" value='`$ss.selflink`' />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </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>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </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>
</block>
</outcome>
- <outcome value='not-found'>
+ </switch>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
<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'
+ <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>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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>
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </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'>
- <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'
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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>
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </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>
- </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"
+ </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='`$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>
+ <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'>
- <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'
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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>
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </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'>
- <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"
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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>
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </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>
- </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>
+ </outcome>
+ </update>
</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>
+ </switch>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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'
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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>
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
</outcome>
- </update>
+ </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 vf-module update"/>
- </record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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>
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </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 volume-group update"/>
- </record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
- </switch>
+ <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>
</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>
+ </switch>
</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>
- <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>
+ </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'
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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>
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
</outcome>
- </update>
+ </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 vf-module update"/>
- </record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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>
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </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 volume-group update"/>
- </record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
- </switch>
+ <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>
</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>
+ </switch>
</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>
- <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'>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ <switch test="`$ss.resource-key.connection-points`">
+ <outcome value='connection-points'>
+ <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-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 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'
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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'>
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="ROLLBACK vf-module update"/>
@@ -1261,6 +2074,7 @@
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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
<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!'`" />
@@ -1278,8 +2092,12 @@
</outcome>
</update>
</block>
- </block>
- <block atomic='true'>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="ROLLBACK volume-group update"/>
@@ -1308,7 +2126,11 @@
</outcome>
</update>
</block>
- </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
<block atomic='true'>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
@@ -1350,99 +2172,62 @@
</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>
+ </outcome>
+ </switch>
</block>
- </outcome>
- <outcome value='not-found'>
+ <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 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'
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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'>
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="ROLLBACK vf-module update"/>
@@ -1452,6 +2237,7 @@
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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
<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!'`" />
@@ -1469,8 +2255,12 @@
</outcome>
</update>
</block>
- </block>
- <block atomic='true'>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="ROLLBACK volume-group update"/>
@@ -1499,7 +2289,11 @@
</outcome>
</update>
</block>
- </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
<block atomic='true'>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
@@ -1541,204 +2335,830 @@
</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"
+ </outcome>
+ </switch>
+ </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" >
- <outcome value='failure'>
+ <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='success'>
+ <block atomic='true'>
+ <set>
+ <parameter name='ss.cp.related-link'
+ value="`'/aai/v$/network/vnfcs/vnfc/' +
+ $ss.param.vnfc-name +
+ '/cps/cp/' +
+ $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`" />
+ </set>
+ <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].related-link" value="`$ss.cp.related-link`" />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
<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>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
<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'
+ <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>
+ </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>
</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"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
</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'
+ <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>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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 atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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>
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
</outcome>
- </update>
+ </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 vf-module update"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
</record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <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>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic='true'>
+ <block>
+ <block atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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`' />
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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'>
- <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>
+ <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 + ' 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!'`" />
+ <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 of vf-module update completed.'`" />
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
</set>
</outcome>
- </update>
+ </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 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>
+ </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 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'>
- <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>
+ <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 + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ <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 of volume_group completed.'`" />
+ <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>
- </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'
+ </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 atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
- </block>
+ </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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
- </switch>
+ <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>
</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>
+ </switch>
</block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
+ </outcome>
+ </switch>
</block>
<block atomic='true'>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
@@ -1788,148 +3208,396 @@
</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`" />
+ <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'>
+ </save>
+ </for>
+ </outcome>
+ </save>
+ </for>
+ </outcome>
+ </switch>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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 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'
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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>
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
</outcome>
- </update>
+ </switch>
</block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
<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"/>
+ <parameter name="field1" value="ROLLBACK vnfc save"/>
</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`' />
+ <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $ss.param.vnfc-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>
+ <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 + ' 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!'`" />
+ <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 of vf-module update completed.'`" />
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
</set>
</outcome>
- </update>
+ </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 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>
+ </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 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'>
- <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>
+ <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 + ' volume-group with volume-group-id = ' + $ss.param.volume-group-id + ' not found in AAI. Consider silent success!'`" />
+ <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 of volume_group completed.'`" />
+ <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>
- </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'
+ </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 atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
- </block>
+ </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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
- </switch>
+ <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>
</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>
+ </switch>
</block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
+ </outcome>
+ </switch>
</block>
<block atomic='true'>
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
@@ -1979,1883 +3647,2070 @@
</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`" />
+ <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>
- </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>
+ <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 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'
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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"
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
</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"
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
+ </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 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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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>
+ <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>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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>
+ </outcome>
+ </switch>
+ </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.ipv4-oam-address + ' in AnAI. ' + $error-message`" />
+ </return>
</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>
+ </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'
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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"
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
</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"
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
+ </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 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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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>
+ <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>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
<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"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
</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'
+ <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>
- <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>
+ </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>
- </update>
+ </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 vf-module update"/>
- </record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </outcome>
+ </switch>
+ </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.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 atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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"
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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"
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </switch>
+ <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>
</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'>
+ </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 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='service-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' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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>
+ <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>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
<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"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
</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'
+ <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>
- <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>
+ </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>
- </update>
+ </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 vf-module update"/>
- </record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </outcome>
+ </switch>
+ </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 atomic='true'>
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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"
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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"
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </switch>
+ <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>
</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'>
+ </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 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='service-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' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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"
+ <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>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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.lo0-interface-name
+ 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.lo0-interface-name`' />
- <parameter name="interface-role" value='loopback' />
- <outcome value='failure'>
- <block atomic='true'>
- <block>
- <block>
+ <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>
+ </outcome>
+ </switch>
+ </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.ipv4-loopback0-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.ipv4-loopback0-address`' />
+ <parameter name="l3-interface-ipv4-prefix-length" value='32' />
+ <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'
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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"
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
</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"
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
+ </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 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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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"
+ <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>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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'
+ <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>
+ </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>
</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>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
<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"/>
+ <parameter name="field1" value="ROLLBACK l-interface (oam) save"/>
</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'
+ <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>
- <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>
+ </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>
- </update>
+ </switch>
</block>
+ </outcome>
+ </switch>
+ </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 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"
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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"
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
</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"
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
+ </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 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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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"
+ <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>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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'
+ <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>
+ </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>
</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>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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>
+ </outcome>
+ </switch>
+ </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>
- </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>
+ </outcome>
+ </save>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$ss.resource-key.l3-network`">
+ <outcome value='l3-netework'>
+ <for silentFailure='true' index='n' start='0' end='`$nidx`' >
+ <block atomic='true'>
+ <set>
+ <parameter name='ss.l3-network.related-link'
+ value="`'/aai/v$/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
+ </set>
<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' />
+ 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].related-link" value="`$ss.l3-network.related-link`" />
+ <!--
+<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 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'
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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>
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
</outcome>
- </update>
+ </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 volume-group update"/>
- </record>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
</outcome>
- </update>
+ </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 vnfc save"/>
- </record>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </switch>
+ <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>
</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>
+ </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 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"
+ <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'>
+ <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 + ' 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! '`" />
+ <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>
- <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>
+ </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>
- </for>
+ </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 l-interface (oam) save"/>
- </record>
- <switch test="`$ss.param.oam-interface-name != ''`">
- <outcome value='true'>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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 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>
</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"
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <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'
+ <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>
- <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>
+ </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 + ' 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!'`" />
+ <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 of vf-module update completed.'`" />
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of l-interface with interface-name = ' + $ss.param.lo0-interface-name + ' 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>
+ </delete>
</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>
+ </switch>
</block>
- </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.l3-network`">
+ <outcome value='l3-netework'>
<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"/>
+ <parameter name="field1" value="ROLLBACK VNF l3-network relationship"/>
</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" >
+ <for silentFailure='true' index='n' start='0' end='`$nidx`' >
+ <set>
+ <parameter name='tmp.related-link' value="`'/aai/v$/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
+ <!--
+<parameter name='tmp.related-link' value="`'/aai/' + $prop.aai.version + '/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
+-->
+ </set>
+ <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 relationship.related-link = $tmp.related-link" >
<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! '`" />
+ <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'>
@@ -3875,769 +5730,407 @@
</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!'`" />
+ <parameter name='error-message' value="`$error-message + ' l3-network relationship with related-path = ' + $tmp.related-path + ' 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.'`" />
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of generic-vnf l3-network relationships 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>
+ </for>
+ </block>
+ </outcome>
+ </switch>
</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`" />
+ <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>
- </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>
+ <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'
+ <block>
+ <block>
+ <block>
+ <switch test="`$ss.resource-key.generic-vnf`">
+ <outcome value='generic-vnf'>
+ <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-module-put-index].resource-resolution-data.status'
value='FAILED' />
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </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"
+ <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="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.vf-module`">
+ <outcome value='vf-module'>
+ <block>
+ <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"
+ <parameter name="vf-module-name" value='`$tmp.aai.vfmdoule.vf-module-name`' />
+ <parameter name="selflink" value='`$tmp.aai.vfmdoule.selflink`' />
+ <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>
+ </outcome>
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.volume-group`">
+ <outcome value='volume-group'>
+ <block>
+ <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>
+ <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>
</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"
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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>
+ </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 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'>
+ <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.param.aai-vf-module-put-index].resource-resolution-data.status'
- value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value='`$error-message`' />
- </return>
+ <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>
- </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"
+ <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>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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'
+ <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>
+ </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>
</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"
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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'
+ <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>
+ </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>
</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`' >
- <set>
- <parameter name='tmp.related-link' value="`'/aai/v$/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
- <!--
+ </switch>
+ </block>
+ <switch test="`$ss.resource-key.l3-network`">
+ <outcome value='l3-netework'>
+ <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`' >
+ <set>
+ <parameter name='tmp.related-link' value="`'/aai/v$/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
+ <!--
<parameter name='tmp.related-link' value="`'/aai/' + $prop.aai.version + '/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
-->
- </set>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <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 relationship.related-link = $tmp.related-link" >
- <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 + ' l3-network relationship with related-path = ' + $tmp.related-path + ' 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>
+ <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 + ' 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!'`" />
+ <parameter name='error-message' value="`$error-message + ' l3-network relationship with related-path = ' + $tmp.related-path + ' not found in AAI. Consider silent success!'`" />
</set>
</outcome>
<outcome value='success'>
<set>
- <parameter name='error-message' value="`$error-message + ' Rollback of vf-module update completed.'`" />
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of generic-vnf l3-network relationships 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>
+ </delete>
+ </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 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>
+ <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>
- <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`' >
- <set>
- <parameter name='tmp.related-link' value="`'/aai/v$/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
- <!--
-<parameter name='tmp.related-link' value="`'/aai/' + $prop.aai.version + '/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
--->
- </set>
- <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 relationship.related-link = $tmp.related-link" >
- <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 + ' l3-network relationship with related-path = ' + $tmp.related-path + ' 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>
+ </outcome>
+ </save>
</block>
- </outcome>
- </save>
- </for>
+ </for>
+ </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[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
value='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[$ss.param.aai-vf-module-put-index].value'
+ value='SUCCESS' />
</set>
</block>
</outcome>
@@ -4679,7 +6172,7 @@
<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'>
+ <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>
@@ -4730,9 +6223,10 @@
<parameter name='ss.param.loopback0-ipv4-address-index' value='`$bidx`' />
</set>
</outcome>
- <outcome value='aai-vf-module-put'>
+ <outcome value='ipv4-loopback0-address'>
<set>
- <parameter name='ss.param.aai-vf-module-put-index' value='`$bidx`' />
+ <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='nfc-naming-code'>
@@ -4765,12 +6259,6 @@
<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`' />
@@ -4783,6 +6271,58 @@
<parameter name='ss.param.vlan-id-outer-index' value='`$bidx`' />
</set>
</outcome>
+ <outcome value='availability_zone_0'>
+ <set>
+ <parameter name='ss.param.availability-zone-0' 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.availability-zone-0-index' value='`$bidx`' />
+ </set>
+ </outcome>
+ <outcome value='aai-vf-module-put'>
+ <block>
+ <set>
+ <parameter name='ss.param.aai-vf-module-put-index' value='`$bidx`' />
+ </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[$bidx].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[$bidx].resource-resolution-data.resource-key[$kidx].name`'>
+ <outcome value='generic-vnf'>
+ <set>
+ <parameter name='ss.resource-key.generic-vnf' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vf-module'>
+ <set>
+ <parameter name='ss.resource-key.vf-module' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='volume-group'>
+ <set>
+ <parameter name='ss.resource-key.volume-group' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='vnfc'>
+ <set>
+ <parameter name='ss.resource-key.vnfc' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='connection-points'>
+ <set>
+ <parameter name='ss.resource-key.connection-points' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='l-interface'>
+ <set>
+ <parameter name='ss.resource-key.l-interface' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='l3-netework'>
+ <set>
+ <parameter name='ss.resource-key.l3-network' 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].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
</switch>
</outcome>
</execute>
@@ -4794,66 +6334,21 @@
<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"
+ <block atomic='true'>
+ <switch test="`$ss.resource-key.vnfc`">
+ <outcome value='vnfc'>
+ <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! '`" />
+ <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'>
@@ -4873,33 +6368,32 @@
</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!'`" />
+ <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 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.'`" />
+ <parameter name='error-message' value="`$error-message + ' Rollback (delete) of vnfc with vnfc-name=' + $ss.param.vnfc-name + ' completed.'`" />
</set>
</outcome>
</delete>
- </for>
- </for>
- </block>
+ </block>
+ </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="ROLLBACK l-interface (oam) save"/>
+ <parameter name="field1" value="ROLLBACK vlan-tag save"/>
</record>
- <switch test="`$ss.param.oam-interface-name != ''`">
- <outcome value='true'>
+ <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="l-interface"
- key="l-interface.interface-name = $ss.param.oam-interface-name
- AND generic-vnf.vnf-id = $ss.param.vnf-id" >
+ 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 l-interface.interface-name = ' + $ss.param.oam-interface-name + ' from AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ <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'>
@@ -4919,121 +6413,187 @@
</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!'`" />
+ <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 l-interface with interface-name = ' + $ss.param.oam-interface-name + ' completed.'`" />
+ <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>
- </outcome>
- </switch>
+ </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.lo0-interface-name != ''`">
- <outcome value='true'>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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.lo0-interface-name
+ 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.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'
+ <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.lo0-interface-name + ' not found in AAI. Consider silent success!'`" />
- </set>
+ </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>
- <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>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$ss.resource-key.l-interface`">
+ <outcome value='l-interface'>
+ <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>
- </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`' >
- <set>
- <parameter name='tmp.related-link' value="`'/aai/v$/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
- <!--
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test="`$ss.resource-key.l3-network`">
+ <outcome value='l3-netework'>
+ <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`' >
+ <set>
+ <parameter name='tmp.related-link' value="`'/aai/v$/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
+ <!--
<parameter name='tmp.related-link' value="`'/aai/' + $prop.aai.version + '/network/l3-networks/l3-network/' + $ss.network[$n].netid`" />
-->
- </set>
- <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <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 relationship.related-link = $tmp.related-link" >
- <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'
+ <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 + ' l3-network relationship with related-path = ' + $tmp.related-path + ' 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>
+ </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 + ' l3-network relationship with related-path = ' + $tmp.related-path + ' 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>
+ </outcome>
+ </switch>
</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[$ss.param.aai-vf-module-put-index].resource-resolution-data.status'
+ value='DELETED' />
+ </set>
</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[$ss.param.aai-vf-module-put-index].value'
+ value='SUCCESS' />
+ </set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss.aai.vfmoduleput.log' />
+ <parameter name='filename' value='/var/tmp/ss-aai-vfput.log' />
</execute>
</block>
</method>
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
index e7910881..877c272d 100644
--- 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
@@ -3,6 +3,15 @@
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-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">
@@ -44,6 +53,18 @@
<parameter name='ss.param.aai-vnf-put-index' value='`$aidx`' />
</set>
</outcome>
+ <outcome value='license-key'>
+ <set>
+ <parameter name='ss.param.license-key' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.license-key-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='entitlement-key'>
+ <set>
+ <parameter name='ss.param.entitlement-key' value ='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.entitlement-key-index' value='`$aidx`' />
+ </set>
+ </outcome>
</switch>
</for>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
@@ -75,10 +96,27 @@
</block>
</outcome>
</get-resource>
+ <set>
+ <parameter name="ss.selflink"
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' +
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id +
+ '/service-data/vnfs/vnf/' +
+ $ss.param.vnf-id +
+ '/vnf-data/vnf-topology/'`" />
+ </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='`$ss.param.vnf-name`' />
+ <parameter name="vnf-name" value="`$ss.param.vnf-name`" />
+ <parameter name="prov-status" value="PREPROV" />
+ <parameter name="operational-status" value="out-of-service-path" />
+ <parameter name="selflink" value="`$ss.selflink`" />
+ <parameter name="model-customization-id"
+ value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid`" />
+ <parameter name="model-invariant-id"
+ value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-invariant-uuid`" />
+ <parameter name="model-version-id"
+ value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-uuid`" />
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -104,230 +142,279 @@
</block>
</outcome>
</update>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <switch test="`$ss.param.license-assignment-group-uuid != ''`">
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$ss.param.license-assignment-group-uuid`' />
+ <parameter name='target' value='$' />
+ <outcome value='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="`'ss.param.license-assignment-group-uuid = ' + $ss.param.license-assignment-group-uuid`"/>
+ <parameter name="field3" value="__SKIP saving license object in AnAI__"/>
+ </record>
+ </outcome>
+ <outcome value='false'>
+ <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'
+ <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"
+ </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>
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' 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 AA. ' + $error-message`" />
+ </return>
+ </block>
</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'
+ <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"
+ </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>
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' 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. ' + $error-message`" />
+ </return>
+ </block>
</outcome>
<outcome value='success'>
<set>
- <parameter name='error-message' value=" Rollback of generic-vnf update completed. " />
+ <parameter name='ss.license-updated' value='true' />
</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>
+ </save>
+ </outcome>
+ </execute>
</outcome>
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </switch>
+ <switch test="`$ss.param.entitlement-assignment-group-uuid != ''`">
+ <outcome value='true'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name='source' value='`$ss.param.entitlement-assignment-group-uuid`' />
+ <parameter name='target' value='$' />
+ <outcome value='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="`'ss.param.entitlement-assignment-group-uuid = ' + $ss.param.entitlement-assignment-group-uuid`"/>
+ <parameter name="field3" value="__SKIP saving entitlement object in AnAI__"/>
+ </record>
+ </outcome>
+ <outcome value='false'>
+ <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'
+ <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"
+ </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"
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <switch test="`$ss.license-updated`">
+ <outcome value='true'>
+ <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'
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' 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="`$error-message + ' Rollback of license completed. '`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </outcome>
+ </switch>
+ </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. ' + $error-message`" />
+ </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"
+ </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"
+ <parameter name="vnf-name" value='`$tmp.aai.vnf.vnf-anme`' />
+ <outcome value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' Failed to rollback generic-vnf update in AnAI. MANUAL ROLLBACK IS REQUIRED! '`" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' Rollback of generic-vnf update completed. '`" />
+ </set>
+ </outcome>
+ </update>
+ </block>
+ <switch test="`$ss.license-updated`">
+ <outcome value='true'>
+ <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 value='failure'>
+ <set>
+ <parameter name='error-message' value="`$error-message + ' 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="`$error-message + ' 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="`$error-message + ' Rollback of license completed. '`" />
+ </set>
+ </outcome>
+ </delete>
+ </block>
+ </outcome>
+ </switch>
+ </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. ' + $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </execute>
</outcome>
- </save>
+ </switch>
<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' />
@@ -335,8 +422,12 @@
</block>
</outcome>
</switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$ss.param.aai-vnf-put-index].value'
+ value='SUCCESS' />
+ </set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss.aai.vfmoduleput.log' />
+ <parameter name='filename' value='/var/tmp/ss-aai-vnfput.log' />
</execute>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-capability-param-resolution.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-capability-param-resolution.xml
index d59d3140..2afe8be1 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-capability-param-resolution.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-capability-param-resolution.xml
@@ -183,6 +183,10 @@
</switch>
</outcome>
</switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="DONE: self-serve-capability-param-resolution"/>
+ </record>
</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
index ce0905a8..0b2cde91 100644
--- 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
@@ -156,10 +156,15 @@
<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'
+ <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>
+ </set>
+ </for>
<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`" />
@@ -246,10 +251,74 @@
</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 vnfc-name' />
- </return>
+ <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: self-serve-mS-vlan-tag-assign"/>
+ </record>
+ <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="unassign"/>
+ </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.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'>
+ <set>
+ <parameter name="error-message"
+ value="Failed to rollback vlan-tag from mS. vlan-tag MUST BE ROLLBACK MANUALLY!!!" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name="error-message"
+ value="Failed to rollback vlan-tag from mS. vlan-tag MUST BE ROLLBACK MANUALLY!!!" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <switch test='`$vtResp.error-code`'>
+ <outcome value='500'>
+ <set>
+ <parameter name="error-message"
+ value="`'Received error from mS with error-code = ' + $vtResp.error-code + ' and error-message = ' + $vtResp.error-message + '; vlan-tag MUST BE ROLLBACK MANUALLY!!!'`" />
+ </set>
+ </outcome>
+ <outcome value='200'>
+ <block>
+ <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='PENDING' />
+ </set>
+ </for>
+ </for>
+ <set>
+ <parameter name="error-message"
+ value="vlan tags were rolled back from mS successfully." />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Unable to resolve vnfc-name; ' + $error-message`" />
+ </return>
+ </block>
</outcome>
</switch>
</block>
@@ -297,10 +366,74 @@
</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>
+ <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: self-serve-mS-vlan-tag-assign"/>
+ </record>
+ <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="unassign"/>
+ </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.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'>
+ <set>
+ <parameter name="error-message"
+ value="Failed to rollback vlan-tag from mS. vlan-tag MUST BE ROLLBACK MANUALLY!!!" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name="error-message"
+ value="Failed to rollback vlan-tag from mS. vlan-tag MUST BE ROLLBACK MANUALLY!!!" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <switch test='`$vtResp.error-code`'>
+ <outcome value='500'>
+ <set>
+ <parameter name="error-message"
+ value="`'Received error from mS with error-code = ' + $vtResp.error-code + ' and error-message = ' + $vtResp.error-message + '; vlan-tag MUST BE ROLLBACK MANUALLY!!!'`" />
+ </set>
+ </outcome>
+ <outcome value='200'>
+ <block>
+ <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='PENDING' />
+ </set>
+ </for>
+ </for>
+ <set>
+ <parameter name="error-message"
+ value="vlan tags were rolled back from mS successfully." />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ <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 + $error-message`" />
+ </return>
+ </block>
</outcome>
</call>
<for silentFailure='true' index="sidx" start="0" end="`$vtResp.output[$oidx].stored-elements_length`">
@@ -344,10 +477,74 @@
</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>
+ <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: self-serve-mS-vlan-tag-assign"/>
+ </record>
+ <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="unassign"/>
+ </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.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'>
+ <set>
+ <parameter name="error-message"
+ value="Failed to rollback vlan-tag from mS. vlan-tag MUST BE ROLLBACK MANUALLY!!!" />
+ </set>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name="error-message"
+ value="Failed to rollback vlan-tag from mS. vlan-tag MUST BE ROLLBACK MANUALLY!!!" />
+ </set>
+ </outcome>
+ <outcome value='success'>
+ <switch test='`$vtResp.error-code`'>
+ <outcome value='500'>
+ <set>
+ <parameter name="error-message"
+ value="`'Received error from mS with error-code = ' + $vtResp.error-code + ' and error-message = ' + $vtResp.error-message + '; vlan-tag MUST BE ROLLBACK MANUALLY!!!'`" />
+ </set>
+ </outcome>
+ <outcome value='200'>
+ <block>
+ <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='PENDING' />
+ </set>
+ </for>
+ </for>
+ <set>
+ <parameter name="error-message"
+ value="vlan tags were rolled back from mS successfully." />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ <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 + $error-message`" />
+ </return>
+ </block>
</outcome>
</call>
<for silentFailure='true' index="sidx" start="0" end="`$vtResp.output[$oidx].stored-elements_length`">
@@ -452,9 +649,9 @@
</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='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" />
@@ -471,7 +668,7 @@
</for>
<return status='failure'>
<parameter name='error-code' value='500' />
- <parameter name='error-message' value="Failed to get vlan-tag assisgnment from mS" />
+ <parameter name='error-message' value="Failed to unassign vlan-tag from mS" />
</return>
</block>
</outcome>
@@ -488,7 +685,7 @@
</for>
<return status='failure'>
<parameter name='error-code' value='500' />
- <parameter name='error-message' value="Failed to get vlan-tag assisgnment from mS" />
+ <parameter name='error-message' value="Failed to unassign vlan-tag from mS" />
</return>
</block>
</outcome>
@@ -496,13 +693,18 @@
<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'
+ <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>
+ </set>
+ </for>
<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`" />
+ <parameter name='error-message' value="`'Encountered error while unassigning mS-vlan-tag with error-code = ' + $vtResp.error-code + ' and error-message = ' + $vtResp.error-message`" />
</return>
</block>
</outcome>
@@ -510,7 +712,7 @@
<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`' />
+ <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'
@@ -525,9 +727,18 @@
</block>
</outcome>
</switch>
+ <set>
+ <parameter name='pathname'
+ value="`'/var/tmp/ss-mS-vlan-tag-' + $ss.capability-action + '-' +
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.vf-module-id + '.log'`" />
+ </set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss.ms-vlan-tag.log' />
+ <parameter name='filename' value='`$pathname`' />
</execute>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="DONE: mS-vlan-tag-assign"/>
+ </record>
</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 66330261..93eaf71a 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
@@ -143,7 +143,7 @@
<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`' />
+ value='`$vf-module-topology-operation-input.request-information.request-action`' />
</set>
<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 d93f9689..a45713f5 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,6 +42,24 @@
</return>
</outcome>
</switch>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_MODEL WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.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 ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`" />
+ </return>
+ </outcome>
+ </get-resource>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' ></call>
<switch test="`$ss.self-serve-flag`">
<outcome value='false'>