aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorCheung, Pat <kc1472@att.com>2018-10-04 18:35:55 +0000
committerDan Timoney <dtimoney@att.com>2018-10-04 20:01:45 +0000
commit7f70731621bcd7cdb4f4157eba0d66b3638f1519 (patch)
treeee4a185b69efe53321284766027e26c514771b8b /platform-logic/generic-resource-api/src/main/xml
parent0d607948ff5a38a1ca0306bc68f7985a94b0be37 (diff)
self-serve dg patch
inclues new self-serve forking logic, added silentFailure to for loops, not to set cap name to INPUT for generate-name Change-Id: Idd3deb016533dc70611d60dd289f4c4bc40d3136 Issue-ID: CCSDK-604 Signed-off-by: Cheung, Pat <kc1472@att.com> Former-commit-id: 7209c246e382048781f166c2b3eeab24be7e9815
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.xml30
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-capability-param-resolution.xml340
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml19
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml197
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-vlan-tag-assign.xml2
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-unresolved-composite-data.xml16
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml17
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-forking-logic.xml85
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml13
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml35
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml98
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml6
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml37
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-forking-logic.xml54
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml86
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml11
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml22
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml3404
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml16
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml19
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml2076
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml48
-rwxr-xr-xplatform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml39
23 files changed, 2700 insertions, 3970 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 acbda514..2cf8ee17 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
@@ -4241,11 +4241,17 @@
<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 l3-network.network-id = $ss.network[$n].netid" >
+ AND relationship.related-link = $tmp.related-link" >
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -4269,7 +4275,7 @@
</outcome>
<outcome value='not-found'>
<set>
- <parameter name='error-message' value="`$error-message + ' generic-vnf.vnfid = ' + $ss.param.vnf-id + ' not found in AAI. Consider silent success!'`" />
+ <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'>
@@ -4575,11 +4581,17 @@
<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 l3-network.network-id = $ss.network[$n].netid" >
+ AND relationship.related-link = $tmp.related-link" >
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -4603,7 +4615,7 @@
</outcome>
<outcome value='not-found'>
<set>
- <parameter name='error-message' value="`$error-message + ' generic-vnf.vnfid = ' + $ss.param.vnf-id + ' not found in AAI. Consider silent success!'`" />
+ <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'>
@@ -4971,11 +4983,17 @@
<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 l3-network.network-id = $ss.network[$n].netid" >
+ AND relationship.related-link = $tmp.related-link" >
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -4999,7 +5017,7 @@
</outcome>
<outcome value='not-found'>
<set>
- <parameter name='error-message' value="`$error-message + ' generic-vnf.vnfid = ' + $ss.param.vnf-id + ' not found in AAI. Consider silent success!'`" />
+ <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'>
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 cf3447f7..d59d3140 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
@@ -5,186 +5,182 @@
<block atomic='true'>
<switch test="`$ss.capability-type`">
<outcome value='vnf'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
- <outcome value='true'>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
- <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`" />
- <parameter name="target" value="$"/>
- <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="`'SS: param[].value with leading $: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='resource-resolution-split' />
- <parameter name='original_string' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`' />
- <parameter name='regex' value='\$\{' />
- </execute>
- <set>
- <parameter name="tmp.s1" value='`$resource-resolution-split[0]`'/>
- <parameter name="tmp.resolved.var.value" value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`'/>
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='s2' />
- <parameter name='original_string' value='`$resource-resolution-split[1]`' />
- <parameter name='regex' value='\}' />
- </execute>
- <switch test='`$s2_length`'>
- <outcome value='1'>
- <set>
- <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
- </set>
- </outcome>
- <outcome value='2'>
- <block>
- <set>
- <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
- </set>
- <set>
- <parameter name="tmp.s2.s2" value='`$s2[1]`'/>
- </set>
- </block>
- </outcome>
- </switch>
- <for index='cn' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$cn].name == $tmp.s2.s1`'>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length == ''`">
+ <outcome value='false'>
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
+ <outcome value='true'>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length == ''`">
+ <outcome value='false'>
+ <for silentFailure='true' index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`" />
+ <parameter name="target" value="$"/>
<outcome value='true'>
- <set>
- <parameter name='tmp.resolved.var.value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$cn].value`'/>
- </set>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'SS: param[].value with leading $: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='resource-resolution-split' />
+ <parameter name='original_string' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`' />
+ <parameter name='regex' value='\$\{' />
+ </execute>
+ <set>
+ <parameter name="tmp.s1" value='`$resource-resolution-split[0]`'/>
+ <parameter name="tmp.s2.s2" value=''/>
+ <parameter name="tmp.resolved.var.value" value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='s2' />
+ <parameter name='original_string' value='`$resource-resolution-split[1]`' />
+ <parameter name='regex' value='\}' />
+ </execute>
+ <switch test='`$s2_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
+ </set>
+ </outcome>
+ <outcome value='2'>
+ <block>
+ <set>
+ <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
+ </set>
+ <set>
+ <parameter name="tmp.s2.s2" value='`$s2[1]`'/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='cn' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$cn].name == $tmp.s2.s1`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.resolved.var.value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$cn].value`'/>
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
+ <parameter name='source' value='`$tmp.s1`' />
+ <parameter name='target' value='`$tmp.resolved.var.value`' />
+ <parameter name='outputPath' value='tmp.result' />
+ </execute>
+ <switch test="`$tmp.s2.s2 == ''`">
+ <outcome value='true'></outcome>
+ <outcome value='false'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
+ <parameter name='source' value='`$tmp.result`' />
+ <parameter name='target' value='`$tmp.s2.s2`' />
+ <parameter name='outputPath' value='tmp.result' />
+ </execute>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`' value='`$tmp.result`'/>
+ </set>
+ </block>
</outcome>
- </switch>
+ </execute>
</for>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
- <parameter name='source' value='`$tmp.s1`' />
- <parameter name='target' value='`$tmp.resolved.var.value`' />
- <parameter name='outputPath' value='tmp.result' />
- </execute>
- <switch test='`$tmp.s2.s2`'>
- <outcome value=''></outcome>
- <outcome value='Other'>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
- <parameter name='source' value='`$tmp.result`' />
- <parameter name='target' value='`$tmp.s2.s2`' />
- <parameter name='outputPath' value='tmp.result' />
- </execute>
- </outcome>
- </switch>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`' value='`$tmp.result`'/>
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
- <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`" />
- <parameter name="target" value="$"/>
- <outcome value='true'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value= "`'Not able to resolve Capability ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name + ':' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`" />
- </return>
- </outcome>
- </execute>
- </block>
- </outcome>
- </execute>
- </for>
- </outcome>
- </switch>
- </for>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
</outcome>
<outcome value='vf-module'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
- <outcome value='true'>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length`' >
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
- <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`" />
- <parameter name="target" value="$"/>
- <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="`'SS: param[].value with leading $: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`"/>
- </record>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='resource-resolution-split' />
- <parameter name='original_string' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`' />
- <parameter name='regex' value='\$\{' />
- </execute>
- <set>
- <parameter name="tmp.s1" value='`$resource-resolution-split[0]`'/>
- <parameter name="tmp.resolved.var.value" value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`'/>
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='s2' />
- <parameter name='original_string' value='`$resource-resolution-split[1]`' />
- <parameter name='regex' value='\}' />
- </execute>
- <switch test='`$s2_length`'>
- <outcome value='1'>
- <set>
- <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
- </set>
- </outcome>
- <outcome value='2'>
- <block>
- <set>
- <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
- </set>
- <set>
- <parameter name="tmp.s2.s2" value='`$s2[1]`'/>
- </set>
- </block>
- </outcome>
- </switch>
- <for index='cn' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].name == $tmp.s2.s1`'>
+ <switch test="`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length == ''`">
+ <outcome value='false'>
+ <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-parameters.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
+ <outcome value='true'>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length == ''`">
+ <outcome value='false'>
+ <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-parameters.param[$i].resource-resolution-data.resource-key_length`' >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`" />
+ <parameter name="target" value="$"/>
<outcome value='true'>
- <set>
- <parameter name='tmp.resolved.var.value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].value`'/>
- </set>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'SS: param[].value with leading $: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`"/>
+ </record>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='resource-resolution-split' />
+ <parameter name='original_string' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`' />
+ <parameter name='regex' value='\$\{' />
+ </execute>
+ <set>
+ <parameter name="tmp.s1" value='`$resource-resolution-split[0]`'/>
+ <parameter name="tmp.s2.s2" value=''/>
+ <parameter name="tmp.resolved.var.value" value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='s2' />
+ <parameter name='original_string' value='`$resource-resolution-split[1]`' />
+ <parameter name='regex' value='\}' />
+ </execute>
+ <switch test='`$s2_length`'>
+ <outcome value='1'>
+ <set>
+ <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
+ </set>
+ </outcome>
+ <outcome value='2'>
+ <block>
+ <set>
+ <parameter name="tmp.s2.s1" value='`$s2[0]`'/>
+ </set>
+ <set>
+ <parameter name="tmp.s2.s2" value='`$s2[1]`'/>
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='cn' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].name == $tmp.s2.s1`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='tmp.resolved.var.value' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].value`'/>
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
+ <parameter name='source' value='`$tmp.s1`' />
+ <parameter name='target' value='`$tmp.resolved.var.value`' />
+ <parameter name='outputPath' value='tmp.result' />
+ </execute>
+ <switch test="`$tmp.s2.s2 == ''`">
+ <outcome value='true'></outcome>
+ <outcome value='false'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
+ <parameter name='source' value='`$tmp.result`' />
+ <parameter name='target' value='`$tmp.s2.s2`' />
+ <parameter name='outputPath' value='tmp.result' />
+ </execute>
+ </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[$i].resource-resolution-data.resource-key[$j].value`' value='`$tmp.result`'/>
+ </set>
+ </block>
</outcome>
- </switch>
+ </execute>
</for>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
- <parameter name='source' value='`$tmp.s1`' />
- <parameter name='target' value='`$tmp.resolved.var.value`' />
- <parameter name='outputPath' value='tmp.result' />
- </execute>
- <switch test='`$tmp.s2.s2`'>
- <outcome value=''></outcome>
- <outcome value='Other'>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat'>
- <parameter name='source' value='`$tmp.result`' />
- <parameter name='target' value='`$tmp.s2.s2`' />
- <parameter name='outputPath' value='tmp.result' />
- </execute>
- </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[$i].resource-resolution-data.resource-key[$j].value`' value='`$tmp.result`'/>
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
- <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`" />
- <parameter name="target" value="$"/>
- <outcome value='true'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value= "`'Not able to resolve Capability ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name + ':' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`" />
- </return>
- </outcome>
- </execute>
- </block>
- </outcome>
- </execute>
- </for>
- </outcome>
- </switch>
- </for>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
</outcome>
</switch>
</block>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml
index ba153ffe..6456f73b 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name-changeassign.xml
@@ -43,7 +43,7 @@
</outcome>
</switch>
<set>
- <parameter name="tmp.vnf.changeassign.naming-data-payload" value="`'{&quot;elements&quot;:[{' + '&quot;resource-name&quot;:&quot;' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].name + '&quot;,&quot;resource-value&quot;:&quot;' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].value + '&quot;,&quot;external-key&quot;:&quot;' + $tmp.external-key.value + '&quot;}]'`"/>
+ <parameter name="tmp.vnf.changeassign.naming-data-payload" value="`'{&quot;elements&quot;:[{' + '&quot;resource-name&quot;:&quot;' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].name + '&quot;,&quot;resource-value&quot;:&quot;' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].value + '&quot;,&quot;external-key&quot;:&quot;' + $tmp.external-key.value + '&quot;}]}'`"/>
</set>
<execute plugin='org.openecomp.sdnc.prov.namegeneration.node.AssignNameNode' method='process'>
<parameter name='payload' value='`$tmp.vnf.changeassign.naming-data-payload`' />
@@ -75,11 +75,8 @@
</execute>
<update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf"
- key="generic-vnf.vnf-id = $ss.param.vnf-id " >
- <parameter name="ipv4-loopback0-address" value='`$ss.param.ipv4-loopback0-address`' />
- <parameter name="ipv4-oam-address" value='`$ss.param.ipv4-oam-address`' />
- <parameter name="as-number" value='`$ss.param.as-number`' />
- <parameter name="vlan-id-outer" value='`$ss.param.vlan-id-outer`' />
+ key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id " >
+ <parameter name="vnf-name" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$ss.input.param.index].value`' />
<outcome value='failure'>
<block atomic='true'>
<set>
@@ -132,7 +129,7 @@
</outcome>
</switch>
<set>
- <parameter name="tmp.vf-module.changeassign.naming-data-payload" value="`'{&quot;elements&quot;:[{' + '&quot;resource-name&quot;:&quot;' + $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].name + '&quot;,&quot;resource-value&quot;:&quot;' + $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].value + '&quot;,&quot;external-key&quot;:&quot;' + $tmp.external-key.value + '&quot;}]'`"/>
+ <parameter name="tmp.vf-module.changeassign.naming-data-payload" value="`'{&quot;elements&quot;:[{' + '&quot;resource-name&quot;:&quot;' + $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].name + '&quot;,&quot;resource-value&quot;:&quot;' + $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].value + '&quot;,&quot;external-key&quot;:&quot;' + $tmp.external-key.value + '&quot;}]}'`"/>
</set>
<execute plugin='org.openecomp.sdnc.prov.namegeneration.node.AssignNameNode' method='process'>
<parameter name='payload' value='`$tmp.vf-module.changeassign.naming-data-payload`' />
@@ -162,11 +159,9 @@
</block>
</outcome>
</execute>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vf-module"
- key="generic-vnf.vnf-id = $ss.param.vnf-id
- AND vf-module.vf-module-id = $ss.param.vf-module-id " >
- <parameter name="vf-module-name" value='`$ss.param.vf-module-name`' />
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module" key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id AND vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id " >
+ <parameter name="vf-module-name" value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$ss.input.param.index].value`' />
<outcome value='failure'>
<block atomic='true'>
<set>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml
index ba373a26..527ac845 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-generate-name.xml
@@ -6,10 +6,6 @@
<set>
<parameter name='tmp.naming-data-payload' value='{&quot;elements&quot;:[' />
</set>
- <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
- <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
- <parameter name='contextPrefix' value='prop' />
- </execute>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-capability-param-resolution' mode='sync' >
<outcome value='failure'>
<return status='failure'>
@@ -31,22 +27,18 @@
<block>
<switch test="`$ss.capability-action == 'unassign'`">
<outcome value='true'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
- <parameter name='tmp.gen-name_length' value='1' />
</set>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
+ <for silentFailure='true' index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
<switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name == 'external-key'`">
<outcome value='true'>
<set>
<parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
- <parameter name="`tmp.gen-name[0].element[$j].name`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name`"/>
- <parameter name="`tmp.gen-name[0].element[$j].value`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`"/>
- <parameter name="`tmp.gen-name[0].element_length`" value='`$j + 1`' />
</set>
</outcome>
</switch>
@@ -69,14 +61,9 @@
<parameter name='target' value=',]' />
<parameter name='replacement' value=']' />
</execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.naming.gen-name.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.naming.gen-name.url + $prop.restapi.naming.gen-name.service`' />
- <parameter name='restapiUser' value='`$prop.naming.gen-name.user`' />
- <parameter name='restapiPassword' value='`$prop.naming.gen-name.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='DELETE' />
- <parameter name="responsePrefix" value="nameGenResponse" />
+ <execute plugin='org.openecomp.sdnc.prov.namegeneration.node.UnAssignNameNode' method='process'>
+ <parameter name='payload' value='`$tmp.naming-data-payload`' />
+ <parameter name="prifix" value="nameGenResponse" />
<outcome value='failure'>
<block>
<set>
@@ -103,15 +90,15 @@
</outcome>
</execute>
<execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <parameter name="source" value="nameGenResponse.httpResponse" />
+ <parameter name="source" value="nameGenResponse.response-payload" />
<parameter name="outputPath" value="jsonContextPrefix" />
<parameter name="isEscaped" value="false" />
</execute>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='DELETED' />
</set>
- <for index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
- <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <for silentFailure='true' index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
+ <for silentFailure='true' index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
<parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].value`" />
<parameter name="target" value="$"/>
@@ -150,26 +137,21 @@
<block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value='{&quot;elements&quot;:[' />
- <parameter name='tmp.gen-name_length' value='0' />
</set>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <for silentFailure='true' index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
</set>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
+ <for silentFailure='true' index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key_length`' >
<set>
<parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
- <parameter name="`tmp.gen-name[$tmp.gen-name_length].element[$j].name`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name`"/>
- <parameter name="`tmp.gen-name[$tmp.gen-name_length].element[$j].value`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value`"/>
- <parameter name="`tmp.gen-name[$tmp.gen-name_length].element_length`" value='`$j + 1`' />
</set>
</for>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
- <parameter name='tmp.gen-name_length' value='`$tmp.gen-name_length + 1`' />
</set>
</block>
</outcome>
@@ -193,14 +175,9 @@
<parameter name='target' value=',]' />
<parameter name='replacement' value=']' />
</execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.naming.gen-name.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.naming.gen-name.url + $prop.restapi.naming.gen-name.service`' />
- <parameter name='restapiUser' value='`$prop.naming.gen-name.user`' />
- <parameter name='restapiPassword' value='`$prop.naming.gen-name.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='POST' />
- <parameter name="responsePrefix" value="nameGenResponse" />
+ <execute plugin='org.openecomp.sdnc.prov.namegeneration.node.AssignNameNode' method='process'>
+ <parameter name='payload' value='`$tmp.naming-data-payload`' />
+ <parameter name="prifix" value="nameGenResponse" />
<outcome value='failure'>
<block>
<set>
@@ -227,15 +204,15 @@
</outcome>
</execute>
<execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <parameter name="source" value="nameGenResponse.httpResponse" />
+ <parameter name="source" value="nameGenResponse.response-payload" />
<parameter name="outputPath" value="jsonContextPrefix" />
<parameter name="isEscaped" value="false" />
</execute>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='SUCCESS' />
</set>
- <for index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
- <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <for silentFailure='true' index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
+ <for silentFailure='true' index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
<parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].value`" />
<parameter name="target" value="$"/>
@@ -263,22 +240,6 @@
</execute>
</for>
</for>
- <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
- <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].value`" />
- <parameter name="target" value="$"/>
- <outcome value='false'>
- <block>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].resource-resolution-data.capability-name`' value='INPUT' />
- </set>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].resource-resolution-data.status`' value='SUCCESS' />
- </set>
- </block>
- </outcome>
- </execute>
- </for>
</block>
</outcome>
</switch>
@@ -293,22 +254,18 @@
<block>
<switch test="`$ss.capability-action == 'unassign'`">
<outcome value='true'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <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-parameters.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
- <parameter name='tmp.gen-name_length' value='1' />
</set>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length`' >
+ <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-parameters.param[$i].resource-resolution-data.resource-key_length`' >
<switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name == 'external-key'`">
<outcome value='true'>
<set>
<parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
- <parameter name="`tmp.gen-name[0].element[$j].name`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name`"/>
- <parameter name="`tmp.gen-name[0].element[$j].value`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`"/>
- <parameter name="`tmp.gen-name[0].element_length`" value='`$j + 1`' />
</set>
</outcome>
</switch>
@@ -331,14 +288,9 @@
<parameter name='target' value=',]' />
<parameter name='replacement' value=']' />
</execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.naming.gen-name.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.naming.gen-name.url + $prop.restapi.naming.gen-name.service`' />
- <parameter name='restapiUser' value='`$prop.naming.gen-name.user`' />
- <parameter name='restapiPassword' value='`$prop.naming.gen-name.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='DELETE' />
- <parameter name="responsePrefix" value="nameGenResponse" />
+ <execute plugin='org.openecomp.sdnc.prov.namegeneration.node.UnAssignNameNode' method='process'>
+ <parameter name='payload' value='`$tmp.naming-data-payload`' />
+ <parameter name="prifix" value="nameGenResponse" />
<outcome value='failure'>
<block>
<set>
@@ -365,15 +317,15 @@
</outcome>
</execute>
<execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <parameter name="source" value="nameGenResponse.httpResponse" />
+ <parameter name="source" value="nameGenResponse.response-payload" />
<parameter name="outputPath" value="jsonContextPrefix" />
<parameter name="isEscaped" value="false" />
</execute>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.status`' value='DELETED' />
</set>
- <for index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
- <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <for silentFailure='true' index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
+ <for silentFailure='true' index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
<parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].value`" />
<parameter name="target" value="$"/>
@@ -412,26 +364,21 @@
<block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value='{&quot;elements&quot;:[' />
- <parameter name='tmp.gen-name_length' value='0' />
</set>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <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-parameters.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '{'`" />
</set>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length`' >
+ <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-parameters.param[$i].resource-resolution-data.resource-key_length`' >
<set>
<parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
- <parameter name="`tmp.gen-name[$tmp.gen-name_length].element[$j].name`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name`"/>
- <parameter name="`tmp.gen-name[$tmp.gen-name_length].element[$j].value`" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value`"/>
- <parameter name="`tmp.gen-name[$tmp.gen-name_length].element_length`" value='`$j + 1`' />
</set>
</for>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
- <parameter name='tmp.gen-name_length' value='`$tmp.gen-name_length + 1`' />
</set>
</block>
</outcome>
@@ -455,14 +402,9 @@
<parameter name='target' value=',]' />
<parameter name='replacement' value=']' />
</execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.naming.gen-name.templatefile`" />
- <parameter name='restapiUrl' value='`$prop.naming.gen-name.url + $prop.restapi.naming.gen-name.service`' />
- <parameter name='restapiUser' value='`$prop.naming.gen-name.user`' />
- <parameter name='restapiPassword' value='`$prop.naming.gen-name.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='POST' />
- <parameter name="responsePrefix" value="nameGenResponse" />
+ <execute plugin='org.openecomp.sdnc.prov.namegeneration.node.AssignNameNode' method='process'>
+ <parameter name='payload' value='`$tmp.naming-data-payload`' />
+ <parameter name="prifix" value="nameGenResponse" />
<outcome value='failure'>
<block>
<set>
@@ -489,74 +431,15 @@
</outcome>
</execute>
<execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <parameter name="source" value="nameGenResponse.httpResponse" />
+ <parameter name="source" value="nameGenResponse.response-payload" />
<parameter name="outputPath" value="jsonContextPrefix" />
<parameter name="isEscaped" value="false" />
</execute>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.status`' value='SUCCESS' />
</set>
- <for index='cn' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].name == 'vnfc-name'`">
- <outcome value='true'>
- <for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key_length`' >
- <block>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'vm-type'`">
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-type`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-invariant-uuid'`">
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-invariant-uuid`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-customization-uuid'`">
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-customization-uuid`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-uuid'`">
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-uuid`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-version'`">
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-version`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[j].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'model-name'`">
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].onap-model-information.model-name`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
- </set>
- </outcome>
- </switch>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].name == 'vnfc-name'`">
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[0].vm-names.vnfc-names[0].vnfc-name`' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cn].resource-resolution-data.resource-key[$j].value`' />
- </set>
- </outcome>
- </switch>
- </block>
- </for>
- </outcome>
- </switch>
- </for>
- <for index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
- <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <for silentFailure='true' index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
+ <for silentFailure='true' index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
<parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].value`" />
<parameter name="target" value="$"/>
@@ -584,22 +467,6 @@
</execute>
</for>
</for>
- <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
- <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].value`" />
- <parameter name="target" value="$"/>
- <outcome value='false'>
- <block>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].resource-resolution-data.capability-name`' value='INPUT' />
- </set>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].resource-resolution-data.status`' value='SUCCESS' />
- </set>
- </block>
- </outcome>
- </execute>
- </for>
</block>
</outcome>
</switch>
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 15b4e625..ce0905a8 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
@@ -248,7 +248,7 @@
<outcome value=''>
<return status='failure'>
<parameter name='error-code' value='500' />
- <parameter name='error-message' value='Unable to resolve vnf-name' />
+ <parameter name='error-message' value='Unable to resolve vnfc-name' />
</return>
</outcome>
</switch>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-unresolved-composite-data.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-unresolved-composite-data.xml
index 58bb677f..eab4d555 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-unresolved-composite-data.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-unresolved-composite-data.xml
@@ -30,7 +30,7 @@
</return>
</outcome>
<outcome value='vnf'>
- <for index="pidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`">
+ <for silentFailure='true' index="pidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`">
<set>
<parameter name='tmp.ss.param.capability-name'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />
@@ -85,7 +85,7 @@
<parameter name="regex" value=","/>
<parameter name="ctx_memory_result_key" value="splits" />
</execute>
- <for index="split-index" start="0" end="`$splits_length`">
+ <for silentFailure='true' index="split-index" start="0" end="`$splits_length`">
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='trim' >
<parameter name="source" value="`$splits[$split-index]`" />
<parameter name="outputPath" value="tmp.ss.trim"/>
@@ -113,7 +113,7 @@
</record>
<switch test='`$ss.capability-type`'>
<outcome value='vnf'>
- <for index="i" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`">
+ <for silentFailure='true' index="i" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`">
<set>
<parameter name='tmp.ss.param-name'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].name`' />
@@ -132,7 +132,7 @@
</for>
</outcome>
<outcome value='vf-module'>
- <for index="i" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
+ <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-parameters.param_length`">
<set>
<parameter name='tmp.ss.param-name'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].name`' />
@@ -231,7 +231,7 @@
</for>
</outcome>
<outcome value='vf-module'>
- <for index="pidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
+ <for silentFailure='true' index="pidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
<set>
<parameter name='tmp.ss.param.capability-name'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />
@@ -286,7 +286,7 @@
<parameter name="regex" value=","/>
<parameter name="ctx_memory_result_key" value="splits" />
</execute>
- <for index="split-index" start="0" end="`$splits_length`">
+ <for silentFailure='true' index="split-index" start="0" end="`$splits_length`">
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='trim' >
<parameter name="source" value="`$splits[$split-index]`" />
<parameter name="outputPath" value="tmp.ss.trim"/>
@@ -314,7 +314,7 @@
</record>
<switch test='`$ss.capability-type`'>
<outcome value='vnf'>
- <for index="i" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`">
+ <for silentFailure='true' index="i" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`">
<set>
<parameter name='tmp.ss.param-name'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].name`' />
@@ -333,7 +333,7 @@
</for>
</outcome>
<outcome value='vf-module'>
- <for index="i" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`">
+ <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-parameters.param_length`">
<set>
<parameter name='tmp.ss.param-name'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].name`' />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
index 33f6f35c..e39ba78e 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
@@ -179,14 +179,15 @@
<parameter name='ss.capability.execution-order[2]' value='alts-license-assign' />
<parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
<parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[5]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[6]' value='eipam-create-pool"' />
- <parameter name='ss.capability.execution-order[7]' value='mac-address-assign' />
- <parameter name='ss.capability.execution-order[8]' value='mS-mac-address-assign' />
- <parameter name='ss.capability.execution-order[9]' value='create-vpe-pool' />
- <parameter name='ss.capability.execution-order[10]' value='unresolved-composite-data' />
- <parameter name='ss.capability.execution-order[11]' value='aai-vf-module-put' />
- <parameter name='ss.capability.execution-order_length' value='12' />
+ <parameter name='ss.capability.execution-order[5]' value='eipam-ip-assignment' />
+ <parameter name='ss.capability.execution-order[6]' value='eipam-create-pool' />
+ <parameter name='ss.capability.execution-order[7]' value='netbox-ip-assign' />
+ <parameter name='ss.capability.execution-order[8]' value='mac-address-assign' />
+ <parameter name='ss.capability.execution-order[9]' value='mS-mac-address-assign' />
+ <parameter name='ss.capability.execution-order[10]' value='create-vpe-pool' />
+ <parameter name='ss.capability.execution-order[11]' value='unresolved-composite-data' />
+ <parameter name='ss.capability.execution-order[12]' value='aai-vf-module-put' />
+ <parameter name='ss.capability.execution-order_length' value='13' />
</set>
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`'>
<outcome value=''>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-forking-logic.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-forking-logic.xml
new file mode 100644
index 00000000..bbec5b34
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-forking-logic.xml
@@ -0,0 +1,85 @@
+<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
+ <method rpc='self-serve-vf-module-forking-logic' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.exist.sdnc-model-name' value='false' />
+ <parameter name='tmp.exist.vf_module_label' value='false' />
+ </set>
+ <switch test="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`">
+ <outcome value=''>
+ <set>
+ <parameter name='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length' value='0' />
+ </set>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='p' start='0' end='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`' >
+ <switch test="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$p].name`">
+ <outcome value='sdnc_model_name'>
+ <set>
+ <parameter name='tmp.exist.sdnc-model-name' value='true' />
+ </set>
+ </outcome>
+ <outcome value='vf_module_label'>
+ <set>
+ <parameter name='tmp.exist.vf_module_label' value='true' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.vf_module_label == 'true'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='ss.self-serve-flag' value='true' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT sdnc_model_name from VF_MODEL
+ WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid
+ AND sdnc_model_name is not null'
+ pfx='db.vf-model-name'>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODEL table to determine self-serve forking criteria" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT vf_module_label from VF_MODULE_MODEL
+ WHERE vf_customization_uuid = $vf-module-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid
+ AND vf_module_label is not null '
+ pfx='db.vf-module-label'>
+ <outcome value='success'>
+ <set>
+ <parameter name='ss.self-serve-flag' value='true' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_MODULE_MODEL table to determine self-serve forking criteria" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='ss.self-serve-flag' value='false' />
+ </set>
+ </outcome>
+ </get-resource>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='ss.self-serve-flag' value='false' />
+ </set>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml
index 4ca47e63..28735a9b 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-unassign.xml
@@ -7,12 +7,13 @@
<parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />
<parameter name='ss.capability.execution-order[1]' value='mS-mac-address-assign' />
<parameter name='ss.capability.execution-order[2]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[5]' value='alts-license-assign' />
- <parameter name='ss.capability.execution-order[6]' value='alts-entitlement-assign' />
- <parameter name='ss.capability.execution-order[7]' value='generate-name' />
- <parameter name='ss.capability.execution-order_length' value='8' />
+ <parameter name='ss.capability.execution-order[3]' value='netbox-ip-assign' />
+ <parameter name='ss.capability.execution-order[4]' value='vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='mS-vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[6]' value='alts-license-assign' />
+ <parameter name='ss.capability.execution-order[7]' value='alts-entitlement-assign' />
+ <parameter name='ss.capability.execution-order[8]' value='generate-name' />
+ <parameter name='ss.capability.execution-order_length' value='9' />
</set>
<set>
<parameter name='ss.capability-type' value='vf-module' />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml
index 5b98ce48..5aed4fc8 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-changeassign.xml
@@ -13,24 +13,23 @@
</outcome>
</switch>
<for index='i' start='0' end='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`' >
- <block atomic='true'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`'>
- <outcome value='Other'>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length == ''`">
+ <outcome value='false'>
+ <block atomic='true'>
+ <set>
+ <parameter name='ss.input.param.found.in.service.param' value='false' />
+ </set>
<for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$j].name == $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$i].name`'>
- <outcome value='false'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No param with param[].name = ' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name + ' found in service-data.'`" />
- </return>
- </outcome>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$j].resource-resolution-data.status`' value='PENDING'/>
<parameter name='ss.input.param.index' value='`$i`' />
<parameter name='ss.service-data.param.index' value='`$j`' />
+ <parameter name='ss.input.param.found.in.service.param' value='true' />
+ <parameter name='ss.capability-type' value='vf-module' />
+ <parameter name='ss.capability-action' value='changeassign' />
</set>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-generate-name-changeassign' mode='sync' >
<outcome value='failure'>
@@ -48,13 +47,23 @@
</return>
</outcome>
</call>
+ <return status='success'></return>
</block>
</outcome>
</switch>
</for>
- </outcome>
- </switch>
- </block>
+ <switch test='`$ss.input.param.found.in.service.param`'>
+ <outcome value='false'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No param with param[].name = ' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name + ' found in service-data.'`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
</for>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml
index ff6decab..8a91cdec 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml
@@ -34,7 +34,7 @@
</set>
</outcome>
</switch>
- <for index='i' start='0' end='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`' >
+ <for silentFailure='true' index='i' start='0' end='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`' >
<switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$i].name`'>
<outcome value='sdnc_model_name'>
<set>
@@ -151,14 +151,14 @@
<parameter name="outputPath" value="jsonContextPrefix" />
<parameter name="isEscaped" value="false" />
</execute>
- <for index='i' start='0' end='`$jsonContextPrefix.resource-accumulator-resolved-data_length`' >
+ <for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.resource-accumulator-resolved-data_length`' >
<block atomic="true">
<set>
<parameter name='tmp.mso.param.found' value='false' />
</set>
<switch test='`$prehighnum &gt; 0`'>
<outcome value='true'>
- <for index='cnt' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <for silentFailure='true' index='cnt' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$cnt].name == $jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'>
<outcome value='true'>
<set>
@@ -172,56 +172,60 @@
</switch>
<switch test='`$tmp.mso.param.found`'>
<outcome value='false'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].name`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>
- <parameter name='highnum' value='`$highnum + 1`' />
- </set>
+ <block atomic='true'>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].name`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.capability-name`' value='RA Resolved'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.status`' value='SUCCESS'/>
+ </set>
+ <set>
+ <parameter name='highnum' value='`$highnum + 1`' />
+ </set>
+ </block>
</outcome>
</switch>
</block>
</for>
- <for index='i' start='0' end='`$jsonContextPrefix.capability-data_length`' >
- <block atomic="true">
- <set>
- <parameter name='num' value='0' />
- </set>
- <for index='j' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping_length`' >
- <block atomic='true'>
- <for index='l' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping_length`' >
- <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[$highnum].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-value`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.capability-name`' value='`$jsonContextPrefix.capability-data[$i].capability-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.status`' value='PENDING'/>
- </set>
- <switch test="`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length == ''`">
- <outcome value='true'></outcome>
- <outcome value='false'>
- <for index='k' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length`' >
- <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[$highnum].resource-resolution-data.resource-key[$num].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.resource-key[$num].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-value`'/>
- </set>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
- <parameter name='num' value='`$num + 1`' />
- </set>
- </block>
- </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_length`' value='`$highnum + 1`'/>
- <parameter name='highnum' value='`$highnum + 1`' />
- </set>
- </block>
- </for>
+ <for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.capability-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping_length`' >
+ <for silentFailure='true' index='l' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping_length`' >
+ <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[$highnum].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-value`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.capability-name`' value='`$jsonContextPrefix.capability-data[$i].capability-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.status`' value='PENDING'/>
+ <parameter name='num' value='0' />
+ </set>
+ <switch test="`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length == ''`">
+ <outcome value='true'></outcome>
+ <outcome value='false'>
+ <for index='k' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length`' >
+ <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[$highnum].resource-resolution-data.resource-key[$num].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.resource-key[$num].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-value`'/>
+ </set>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
+ </set>
+ <set>
+ <parameter name='num' value='`$num + 1`' />
+ </set>
+ </block>
+ </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_length`' value='`$highnum + 1`'/>
+ </set>
+ <set>
+ <parameter name='highnum' value='`$highnum + 1`' />
+ </set>
</block>
</for>
- </block>
+ </for>
</for>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml
index bc92ba07..c8b52b29 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-assign.xml
@@ -170,9 +170,9 @@
<parameter name='ss.capability.execution-order[2]' value='alts-license-assign' />
<parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
<parameter name='ss.capability.execution-order[4]' value='mS-vlan-tag-assign' />
- <parameter name='ss.capability.execution-order[5]' value='eipam-ip-assign' />
- <parameter name='ss.capability.execution-order[6]' value='netbox-ip-assign' />
- <parameter name='ss.capability.execution-order[7]' value='eipam-create-pool"' />
+ <parameter name='ss.capability.execution-order[5]' value='eipam-ip-assignment' />
+ <parameter name='ss.capability.execution-order[6]' value='eipam-create-pool' />
+ <parameter name='ss.capability.execution-order[7]' value='netbox-ip-assign' />
<parameter name='ss.capability.execution-order[8]' value='mac-address-assign' />
<parameter name='ss.capability.execution-order[9]' value='mS-mac-address-assign' />
<parameter name='ss.capability.execution-order[10]' value='create-vpe-pool' />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml
index dc7b1609..4e049468 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-changeassign.xml
@@ -2,7 +2,7 @@
xmlns='http://www.onap.org/sdnc/svclogic'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
<method rpc='self-serve-vnf-changeassign' mode='sync'>
- <block atomic="true">
+ <block atomic='true'>
<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`'>
<outcome value=''>
<return status='failure'>
@@ -13,24 +13,23 @@
</outcome>
</switch>
<for index='i' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
- <block atomic='true'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`'>
- <outcome value='Other'>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length == ''`">
+ <outcome value='false'>
+ <block atomic='true'>
+ <set>
+ <parameter name='ss.input.param.found.in.service.param' value='false' />
+ </set>
<for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$j].name == $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name`'>
- <outcome value='false'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No param with param[].name = ' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name + ' found in service-data.'`" />
- </return>
- </outcome>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$j].resource-resolution-data.status`' value='PENDING'/>
<parameter name='ss.input.param.index' value='`$i`' />
<parameter name='ss.service-data.param.index' value='`$j`' />
+ <parameter name='ss.input.param.found.in.service.param' value='true' />
+ <parameter name='ss.capability-type' value='vnf' />
+ <parameter name='ss.capability-action' value='changeassign' />
</set>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-generate-name-changeassign' mode='sync' >
<outcome value='failure'>
@@ -48,13 +47,23 @@
</return>
</outcome>
</call>
+ <return status='success'></return>
</block>
</outcome>
</switch>
</for>
- </outcome>
- </switch>
- </block>
+ <switch test='`$ss.input.param.found.in.service.param`'>
+ <outcome value='false'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No param with param[].name = ' + $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name + ' found in service-data.'`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
</for>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-forking-logic.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-forking-logic.xml
new file mode 100644
index 00000000..3570e5d7
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-forking-logic.xml
@@ -0,0 +1,54 @@
+<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
+ <method rpc='self-serve-vnf-forking-logic' mode='sync'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.exist.sdnc-model-name' value='false' />
+ <parameter name='tmp.exist.sdnc-artifact-name' value='false' />
+ </set>
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
+ <outcome value=''>
+ <set>
+ <parameter name='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length' value='0' />
+ </set>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='p' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$p].name`">
+ <outcome value='sdnc_model_name'>
+ <set>
+ <parameter name='tmp.exist.sdnc-model-name' value='true' />
+ </set>
+ </outcome>
+ <outcome value='sdnc_artifact_name'>
+ <set>
+ <parameter name='tmp.exist.sdnc-artifact-name' value='true' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.sdnc-artifact-name == 'true'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='ss.self-serve-flag' value='true' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <switch test="`$db.vf-model.sdnc-model-name != '' and $db.vf-model.sdnc-artifact-name != ''`">
+ <outcome value='true'>
+ <set>
+ <parameter name='ss.self-serve-flag' value='true' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='ss.self-serve-flag' value='false' />
+ </set>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml
index 78a0282f..5d3ec7eb 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml
@@ -34,7 +34,7 @@
</set>
</outcome>
</switch>
- <for index='i' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
+ <for silentFailure='true' index='i' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
<block atomic="true">
<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name`'>
<outcome value='sdnc_model_name'>
@@ -126,14 +126,14 @@
<parameter name="outputPath" value="jsonContextPrefix" />
<parameter name="isEscaped" value="false" />
</execute>
- <for index='i' start='0' end='`$jsonContextPrefix.resource-accumulator-resolved-data_length`' >
+ <for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.resource-accumulator-resolved-data_length`' >
<block atomic="true">
<set>
<parameter name='tmp.mso.param.found' value='false' />
</set>
<switch test='`$prehighnum &gt; 0`'>
<outcome value='true'>
- <for index='cnt' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
+ <for silentFailure='true' index='cnt' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$cnt].name == $jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'>
<outcome value='true'>
<set>
@@ -151,6 +151,8 @@
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-name`'/>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.resource-accumulator-resolved-data[$i].param-value`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.capability-name`' value='RA Resolved'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.status`' value='SUCCESS'/>
</set>
<set>
<parameter name='highnum' value='`$highnum + 1`' />
@@ -160,51 +162,45 @@
</switch>
</block>
</for>
- <for index='i' start='0' end='`$jsonContextPrefix.capability-data_length`' >
- <block atomic="true">
- <set>
- <parameter name='num' value='0' />
- </set>
- <for index='j' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping_length`' >
+ <for silentFailure='true' index='i' start='0' end='`$jsonContextPrefix.capability-data_length`' >
+ <for silentFailure='true' index='j' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping_length`' >
+ <for silentFailure='true' index='l' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping_length`' >
<block atomic="true">
- <for index='l' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping_length`' >
- <block atomic="true">
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-value`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.capability-name`' value='`$jsonContextPrefix.capability-data[$i].capability-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.status`' value='PENDING'/>
- </set>
- <switch test="`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length == ''`">
- <outcome value='true'></outcome>
- <outcome value='false'>
- <for index='k' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length`' >
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-name`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-value`'/>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
- <parameter name='num' value='`$num + 1`' />
- </set>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
- </set>
- <set>
- <parameter name='num' value='`$num + 1`' />
- </set>
- </for>
- </outcome>
- </switch>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' value='`$highnum + 1`'/>
- </set>
- <set>
- <parameter name='highnum' value='`$highnum + 1`' />
- </set>
- </block>
- </for>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].output-key-mapping[$l].resource-value`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.capability-name`' value='`$jsonContextPrefix.capability-data[$i].capability-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.status`' value='PENDING'/>
+ <parameter name='num' value='0' />
+ </set>
+ <switch test="`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length == ''`">
+ <outcome value='true'></outcome>
+ <outcome value='false'>
+ <for silentFailure='true' index='k' start='0' end='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].name`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-name`'/>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key[$num].value`' value='`$jsonContextPrefix.capability-data[$i].key-mapping[$j].payload[$k].param-value`'/>
+ </set>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$highnum].resource-resolution-data.resource-key_length`' value='`$num + 1`'/>
+ </set>
+ <set>
+ <parameter name='num' value='`$num + 1`' />
+ </set>
+ </block>
+ </for>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' value='`$highnum + 1`'/>
+ </set>
+ <set>
+ <parameter name='highnum' value='`$highnum + 1`' />
+ </set>
</block>
</for>
- </block>
+ </for>
</for>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml
index fd660a94..82bf08ed 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vf-module-input.xml
@@ -89,17 +89,6 @@
</switch>
</block>
</outcome>
- <outcome value='changeassign'>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vf-module-information.onap-model-information.model-customization-uuid is a required input" />
- </return>
- </outcome>
- </switch>
- </outcome>
</switch>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml
index 1c8c64c5..bb60391c 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_validate-vnf-input.xml
@@ -39,6 +39,15 @@
</return>
</outcome>
</switch>
+ <switch test='`$vnf-topology-operation-input.vnf-information.vnf-id`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf-information.vnf-id is a required input" />
+ </return>
+ </outcome>
+ </switch>
<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>
<outcome value='assign'>
<block atomic="true">
@@ -71,19 +80,6 @@
</switch>
</block>
</outcome>
- <outcome value='changeassign'>
- <block atomic="true">
- <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="vnf-information.onap-model-information.model-customization-uuid is a required input" />
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
</switch>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
index 07ae1e64..69f26c74 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml
@@ -7,6 +7,16 @@
<parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
<parameter name='contextPrefix' value='prop' />
</execute>
+ <switch test='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='prop.cloud-region.cloud-owner' value='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`' />
+ </set>
+ </outcome>
+ </switch>
<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>
<outcome value='CreateVfModuleInstance'>
<block></block>
@@ -72,619 +82,555 @@
</return>
</outcome>
</switch>
- <block atomic="true">
- <set>
- <parameter name='tmp.exist.sdnc-model-name' value='false' />
- <parameter name='tmp.exist.vf_module_label' value='false' />
- </set>
- <switch test="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`">
- <outcome value=''>
- <set>
- <parameter name='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length' value='0' />
- </set>
- </outcome>
- </switch>
- <for silentFailure='true' index='p' start='0' end='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`' >
- <switch test="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$p].name`">
- <outcome value='sdnc_model_name'>
- <set>
- <parameter name='tmp.exist.sdnc-model-name' value='true' />
- </set>
- </outcome>
- <outcome value='vf_module_label'>
- <set>
- <parameter name='tmp.exist.vf_module_label' value='true' />
- </set>
- </outcome>
- </switch>
- </for>
- <switch test="`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.vf_module_label == 'true'`">
- <outcome value='true'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-assign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Failed to create self-serve assignment for vf-module with vf-module-id=' + $vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
- </return>
- </outcome>
- </call>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
- value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='false'>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='SELECT sdnc_model_name from VF_MODEL
- WHERE customization_uuid = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.onap-model-information.model-customization-uuid
- AND sdnc_model_name is not null'
- pfx='db.vf-model-name'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
+ <outcome value='true'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-assign' mode='sync' >
<outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VF_MODEL table" />
+ <parameter name="error-message" value="`'Failed to create self-serve assignment for vf-module with vf-module-id=' + $vf-module-topology-operation-input.vf-module-information.vf-module-id + ' with error: ' + $error-message`" />
</return>
</outcome>
- <outcome value='success'>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='SELECT vf_module_label from VF_MODULE_MODEL
- WHERE vf_customization_uuid = $vf-module-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid
- AND vf_module_label is not null '
- pfx='db.vf-module-label'>
- <outcome value='success'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-assign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Failed to create self-serve assignment for vf-module with vf-module-id=' + $vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
- </return>
- </outcome>
- </call>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ </call>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VF_MODULE_MODEL table" />
- </return>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <block atomic="true">
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value=''>
- <set>
- <parameter name='vf-module-index' value='0' />
- </set>
- </outcome>
- <outcome value='Other'>
- <block>
- <set>
- <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
- </set>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
- <outcome value='true'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vf-module-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <set>
+ <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ </set>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
+ <outcome value='true'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
+ ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`" />
- </return>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
+ </return>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
- <parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
- <parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
+ <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
+ <parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
+ <parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cloud-region"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner AND
cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region"
pfx='aai.cloud-region' local-only='false' >
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Cloud region not found in AAI" />
- </return>
- </outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving cloud region from AAI" />
- </return>
- </outcome>
- </get-resource>
- <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
- <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
- <outcome value='complex'>
- <block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='aai-uid-split' />
- <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
- <parameter name='regex' value='/' />
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region not found in AAI" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving cloud region from AAI" />
+ </return>
+ </outcome>
+ </get-resource>
+ <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
+ <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
+ <outcome value='complex'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='aai-uid-split' />
+ <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
+ <parameter name='regex' value='/' />
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
- </return>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
value='`$db.vf-module-model.invariant-uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
value='`$db.vf-module-model.uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
value='`$db.vf-module-model.version`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>
+ <outcome value=''>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
value='`$db.vf-module-model.name`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'
value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-parameters.'
- value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />
- </set>
- <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
- <outcome value=''>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- </outcome>
- <outcome value='Other'>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='restapiUrl' value="`$prop.controller.url + $prop.restapi.preloadinformation + $vf-module-topology-operation-input.vf-module-request-input.vf-module-name + '/vf-module'`" />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='GET' />
- <parameter name="responsePrefix" value="mdsal-preload" />
- <outcome value='failure'>
- <block>
- <switch test='`$mdsal-preload.response-code`'>
- <outcome value='404'>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving preload-information" />
- </return>
- </block>
- </outcome>
- </switch>
- </block>
- </outcome>
- <outcome value='success'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-preload' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- </block>
- </outcome>
- </execute>
- </outcome>
- </switch>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmoduleb.log' />
- </execute>
- <switch test='`$from-preload`'>
- <outcome value='false'>
+ </set>
+ <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
+ <outcome value=''>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value="`$prop.controller.url + $prop.restapi.preloadinformation + $vf-module-topology-operation-input.vf-module-request-input.vf-module-name + '/vf-module'`" />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="mdsal-preload" />
+ <outcome value='failure'>
+ <block>
+ <switch test='`$mdsal-preload.response-code`'>
+ <outcome value='404'>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving preload-information" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-preload' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmoduleb.log' />
+ </execute>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.from-preload`'>
+ <outcome value='false'>
+ <set>
+ <parameter name='automated-assignment' value='true' />
+ </set>
+ </outcome>
+ <outcome value='true'>
+ <set>
+ <parameter name='automated-assignment' value='false' />
+ </set>
+ </outcome>
+ </switch>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <for silentFailure='true' index='vnfc-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='vnf-network-index' value='-1' />
+ </set>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-role`'>
+ <outcome value='true'>
+ <block atomic="true">
<set>
- <parameter name='automated-assignment' value='true' />
+ <parameter name='vnf-network-index' value='`$idx`' />
</set>
- </outcome>
- <outcome value='true'>
<set>
- <parameter name='automated-assignment' value='false' />
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].network-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-id`' />
</set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$vnf-network-index`'>
+ <outcome value='-1'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNFC network role '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
+ + ' is not found in VNF network list'
+ `" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <for index='subnet-role-index' start='0'
+ end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet_length`' >
+ <for index='address-family-index' start='0'
+ end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`'>
+ <outcome value=''>
+ <block></block>
</outcome>
- </switch>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <for silentFailure='true' index='vnfc-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <outcome value='0'>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.address-family'
+ value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
+ </set>
<block atomic="true">
<set>
- <parameter name='vnf-network-index' value='-1' />
+ <parameter name='af-count' value='0' />
</set>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-role`'>
+ <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
+ <switch test='`$tmp.address-family
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
<outcome value='true'>
<block atomic="true">
<set>
- <parameter name='vnf-network-index' value='`$idx`' />
+ <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
</set>
<set>
- <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].network-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-id`' />
+ <parameter name='af-count' value='`$af-count + 1`' />
</set>
- <break/>
</block>
</outcome>
</switch>
</for>
- <switch test='`$vnf-network-index`'>
- <outcome value='-1'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'VNFC network role '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
- + ' is not found in VNF network list'
- `" />
- </return>
- </block>
+ <switch test='`$af-count`'>
+ <outcome value='1'>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id'
+ value='`$subnet-id`' />
+ </set>
</outcome>
- </switch>
- <for index='subnet-role-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet_length`' >
- <for index='address-family-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
- </set>
- <block atomic="true">
- <set>
- <parameter name='af-count' value='0' />
- </set>
- <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='-1' />
+ </set>
+ <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
+ <switch test='`$tmp.address-family
== $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
- </set>
- <set>
- <parameter name='af-count' value='`$af-count + 1`' />
- </set>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$af-count`'>
- <outcome value='1'>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id'
- value='`$subnet-id`' />
- </set>
- </outcome>
- <outcome value='Other'>
+ <outcome value='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`'>
+ <outcome value=''>
<block atomic="true">
- <set>
- <parameter name='subnet-id' value='-1' />
- </set>
- <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
- <outcome value='true'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <switch test='`$tmp.address-family`'>
- <outcome value='ipv4'>
- <set>
- <parameter name='ip-type' value='IPv4' />
- </set>
- </outcome>
- <outcome value='ipv6'>
- <set>
- <parameter name='ip-type' value='IPv6' />
- </set>
- </outcome>
- </switch>
- <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="isInSameSubnet">
- <parameter name="firstIPAddr" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`" />
- <parameter name="secondIPAddr" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address`" />
- <parameter name="subnet" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`" />
- <parameter name="ipType" value="`$ip-type`" />
- <outcome value='success'>
- <block atomic="true">
- <set>
- <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
- </set>
- <break/>
- </block>
- </outcome>
- </execute>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </for>
- <switch test='`$subnet-id`'>
- <outcome value='-1'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Not able to find VNF network subnet that contains address '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address
- `" />
- </return>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id' value='`$subnet-id`' />
- </set>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'SDNC subnet id '
+ + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id
+ + ' does not have network-start-address populated'`" />
+ </return>
</block>
</outcome>
+ <outcome value='Other'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`'>
+ <outcome value=''>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'SDNC subnet id '
+ + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id
+ + ' does not have cidr-mask populated'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <switch test='`$tmp.address-family`'>
+ <outcome value='ipv4'>
+ <set>
+ <parameter name='ip-type' value='IPv4' />
+ </set>
+ </outcome>
+ <outcome value='ipv6'>
+ <set>
+ <parameter name='ip-type' value='IPv6' />
+ </set>
+ </outcome>
+ </switch>
+ <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="isInSameSubnet">
+ <parameter name="firstIPAddr" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`" />
+ <parameter name="secondIPAddr" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address`" />
+ <parameter name="subnet" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`" />
+ <parameter name="ipType" value="`$ip-type`" />
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
</switch>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$subnet-id`'>
+ <outcome value='-1'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Not able to find VNF network subnet that contains address '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address
+ `" />
+ </return>
</block>
- </block>
- </outcome>
- </switch>
- </for>
- </for>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id' value='`$subnet-id`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
</block>
- </for>
- </for>
- </for>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmodulec.log' />
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <block atomic="true">
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block atomic="true">
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </for>
+ </block>
+ </for>
+ </for>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmodulec.log' />
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block atomic="true">
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT * from VFC_RELATED_NETWORK_ROLE where vfc_customization_uuid = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid
and network_role = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'
pfx='db.vnf-related-network-role[]'>
- <outcome value='failure'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VFC_RELATED_NETWORK_ROLE table" />
- </return>
- </block>
- </outcome>
- <outcome value='success'>
- <for index='db-related-network-index' start='0' end='`$db.vnf-related-network-role_length`' >
+ <outcome value='failure'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VFC_RELATED_NETWORK_ROLE table" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <for index='db-related-network-index' start='0' end='`$db.vnf-related-network-role_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='found-related-network' value='false' />
+ </set>
+ <for silentFailure='true' index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='related-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network[$related-network-index].network-role
+ == $db.vnf-related-network-role[$db-related-network-index].related-network-role`'>
+ <outcome value='true'>
<block atomic="true">
<set>
- <parameter name='found-related-network' value='false' />
+ <parameter name='found-related-network' value='true' />
</set>
- <for silentFailure='true' index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <block atomic="true">
- <for silentFailure='true' index='related-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network[$related-network-index].network-role
- == $db.vnf-related-network-role[$db-related-network-index].related-network-role`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='found-related-network' value='true' />
- </set>
- <set>
- <parameter name='saved-vnf-network-index' value='`$vnf-network-index`' />
- <parameter name='saved-related-network-index' value='`$related-network-index`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-related-network`'>
- <outcome value='true'>
- <break/>
- </outcome>
- </switch>
- </block>
- </for>
- <switch test='`$found-related-network`'>
- <outcome value='false'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find related network '
- + $db.vnf-related-network-role[$db-related-network-index].related-network-role + ' in vnf-networks'`" />
- </return>
- </block>
- </outcome>
- </switch>
<set>
- <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].is-trunked'
+ <parameter name='saved-vnf-network-index' value='`$vnf-network-index`' />
+ <parameter name='saved-related-network-index' value='`$related-network-index`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$found-related-network`'>
+ <outcome value='true'>
+ <break/>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ <switch test='`$found-related-network`'>
+ <outcome value='false'>
+ <block>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find related network '
+ + $db.vnf-related-network-role[$db-related-network-index].related-network-role + ' in vnf-networks'`" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].is-trunked'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].is-trunked`' />
- <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].segmentation-id'
+ <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].segmentation-id'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].segmentation-id`' />
- </set>
- <set>
- <parameter name='rn-index' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' />
- </set>
- <switch test='`$rn-index`'>
- <outcome value=''>
- <set>
- <parameter name='rn-index' value='0' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-id'
+ </set>
+ <set>
+ <parameter name='rn-index' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' />
+ </set>
+ <switch test='`$rn-index`'>
+ <outcome value=''>
+ <set>
+ <parameter name='rn-index' value='0' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-id'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-role'
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-role'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-role`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.vlan-interface`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.lower-tag-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.upper-tag-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.is-private`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length'
+ </set>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length'
value='`$rn-index + 1`' />
- </set>
- </block>
- </for>
- </outcome>
- </get-resource>
- </block>
- </for>
+ </set>
</block>
</for>
- <set>
- <parameter name='vf-module-object-path'
+ </outcome>
+ </get-resource>
+ </block>
+ </for>
+ </block>
+ </for>
+ <set>
+ <parameter name='vf-module-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/vnfs/vnf/'
@@ -692,1299 +638,170 @@
+ '/vnf-data/vf-modules/vf-module/'
+ $vf-module-topology-operation-input.vf-module-information.vf-module-id
+ '/vf-module-data/vf-module-topology/'`"/>
- <parameter name='vnf-object-path'
+ <parameter name='vnf-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/vnfs/vnf/'
+ $service-data.vnfs.vnf[$vnf-index].vnf-id
+ '/vnf-data/vnf-topology/'`"/>
- <parameter name='service-object-path'
+ <parameter name='service-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/service-topology/'`"/>
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vf-module"
key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.onap-model-information.model-uuid`" />
- <parameter name="model-customization-id" value="`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`" />
- <parameter name="selflink" value="`$vf-module-object-path`" />
- <parameter name="automated-assignment" value="`$automated-assignment`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
- </return>
- </block>
- </outcome>
- </update>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <block atomic="true">
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.nfc-naming-code' value='DEFAULT' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.nfc-naming-code' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.nfc-function' value='DEFAULT' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.nfc-function' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`' />
- </set>
- </outcome>
- </switch>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name" >
- <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <parameter name="nfc-naming-code" value="`$tmp.nfc-naming-code`" />
- <parameter name="nfc-function" value="`$tmp.nfc-function`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].uuid`" />
- <parameter name="model-customization-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid`" />
- <parameter name="orchestration-status" value="`PendingCreate`" />
- <parameter name="in-maint" value="true" />
- <parameter name="prov-status" value="`PREPROV`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].created_flag' value='true' />
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
- $vf-module-topology-operation-input.vnf-information.vnf-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vf-module" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
- $vf-module-topology-operation-input.vnf-information.vnf-id +
- '/vf-modules/vf-module/' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vnfc relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vnfc relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <block atomic="true">
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
- <parameter name="ctx-destination" value="cp-instance-id" />
- </execute>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="cp"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id" >
- <parameter name="cp-instance-id" value="`$cp-instance-id`" />
- <parameter name="port-id" value="0" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating cp object in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating cp object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.connection-point-id'
- value='`$cp-instance-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.port-id'
- value='0' />
- </set>
- <for silentFailure='true' index='subnet-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
- <for silentFailure='true' index='address-family-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
- </set>
- <for silentFailure='true' index='address-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`' >
- <switch test='`$tmp.address-family`'>
- <outcome value='ipv4'>
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv4-address-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id
- AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
- <parameter name="l3-interface-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
- <parameter name="l3-interface-ipv4-prefix-length" value="32" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating l3-interface-ipv4-address-list object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv4-address-list:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id
- AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
- '/subnets/subnet/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating l3-interface-ipv4-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating l3-interface-ipv4-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- </block>
- </outcome>
- <outcome value='ipv6'>
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv6-address-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id
- AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
- <parameter name="l3-interface-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
- <parameter name="l3-interface-ipv6-prefix-length" value="128" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating l3-interface-ipv6-address-list object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-interface-ipv6-address-list:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id
- AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
- '/subnets/subnet/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating l3-interface-ipv6-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating l3-interface-ipv6-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- </block>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </for>
- <for index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
- <outcome value='true'>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="cp:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating cp relationship to l3-network in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating cp relationship to l3-network" />
- </return>
- </block>
- </outcome>
- </save>
- </outcome>
- </switch>
- </for>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
- <outcome value='true'>
- <for silentFailure='true' index='related-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' >
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="cp:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vlan-tag" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/vlan-tags/vlan-tag/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].vlan-tags.vlan-interface`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating cp relationship to l3-network and vlan-tag in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating cp relationship to l3-network and vlan-tag" />
- </return>
- </block>
- </outcome>
- </save>
- </for>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </block>
- </for>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vf-module:relationship-list"
- key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
- AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No l3-network found in AAI for network ID '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].created-flag' value='true' />
- </set>
- <for silentFailure='true' index='ipv4-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv4-address-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" >
- <parameter name="vip-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]`" />
- <parameter name="vip-ipv4-prefix-length" value="32" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv4-address-list in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv4-address-list" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv4-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv4-address-list:relationship-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
- + '/subnets/subnet/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv4-subnet-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/vnfcs/vnfc/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv4-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
- == $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
- <outcome value='true'>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv4-address-list:relationship-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="cp" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/vnfcs/vnfc/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- + '/cps/cp/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
- </return>
- </block>
- </outcome>
- </save>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </block>
- </for>
- <for silentFailure='true' index='ipv6-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv6-address-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]" >
- <parameter name="vip-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]`" />
- <parameter name="vip-ipv6-prefix-length" value="128" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv6-address-list in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv6-address-list" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv6-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv6-address-list:relationship-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
- + '/subnets/subnet/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv6-subnet-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/vnfcs/vnfc/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv6-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv6-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
- == $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
- <outcome value='true'>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv6-address-list:relationship-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="cp" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/vnfcs/vnfc/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- + '/cps/cp/'
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
- </return>
- </block>
- </outcome>
- </save>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </block>
- </for>
- </block>
- </for>
- </block>
- </for>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-assign' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vlantaggingfailure.log' />
- </execute>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-generate-heat-parameters' mode='sync' ></call>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmoduleheat.log' />
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
- <block atomic="true">
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
- AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
- AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </delete>
- <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
-key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , $prop.cloud-region.cloud-owner )" >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </save>
- </block>
- </for>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
- value='$vf-module-topology-operation-input.sdnc-request-header.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
- value='$vf-module-topology-operation-input.request-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
- value='$vf-module-topology-operation-input.service-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
- value='$vf-module-topology-operation-input.vnf-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
- value='$vf-module-topology-operation-input.vf-module-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
- value='$vf-module-topology-operation-input.vf-module-request-input.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
- value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
- value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </block>
- </outcome>
- </get-resource>
+ <parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
+ <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`" />
+ <parameter name="model-version-id" value="`$tmp.vf-module-topology.onap-model-information.model-uuid`" />
+ <parameter name="model-customization-id" value="`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`" />
+ <parameter name="selflink" value="`$vf-module-object-path`" />
+ <parameter name="automated-assignment" value="`$automated-assignment`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module in AAI" />
+ </return>
+ </block>
</outcome>
<outcome value='not-found'>
<block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <block atomic="true">
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
<block atomic="true">
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
- <outcome value=''>
- <set>
- <parameter name='vf-module-index' value='0' />
- </set>
- </outcome>
- <outcome value='Other'>
- <block>
- <set>
- <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
- </set>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' >
- <switch test='`$vf-module-topology-operation-input.vf-module-information.vf-module-id == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id`'>
- <outcome value='true'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'VF module id ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id
- + ' already exists, and status is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-level-oper-status.order-status`" />
- </return>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id'
- value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-id' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name' value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`' />
- <parameter name='tmp.vf-module-topology.vf-module-topology-identifier.vf-module-type' value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
- <parameter name='tmp.vf-module-topology.tenant' value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
- <parameter name='tmp.vf-module-topology.aic-cloud-region' value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="cloud-region"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner AND
- cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region"
- pfx='aai.cloud-region' local-only='false' >
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Cloud region not found in AAI" />
- </return>
- </outcome>
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving cloud region from AAI" />
- </return>
- </outcome>
- </get-resource>
- <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
- <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
- <outcome value='complex'>
- <block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='aai-uid-split' />
- <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
- <parameter name='regex' value='/' />
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
- value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`" />
- </return>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
- value='`$db.vf-module-model.invariant-uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-invariant-uuid'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`'>
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`'>
<outcome value=''>
<set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
- value='`$db.vf-module-model.uuid`' />
+ <parameter name='tmp.nfc-naming-code' value='DEFAULT' />
</set>
</outcome>
<outcome value='Other'>
<set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-uuid'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
+ <parameter name='tmp.nfc-naming-code' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`' />
</set>
</outcome>
</switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`'>
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`'>
<outcome value=''>
<set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
- value='`$db.vf-module-model.version`' />
+ <parameter name='tmp.nfc-function' value='DEFAULT' />
</set>
</outcome>
<outcome value='Other'>
<set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-version'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
+ <parameter name='tmp.nfc-function' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`' />
</set>
</outcome>
</switch>
- <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`'>
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`'>
<outcome value=''>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
- value='`$db.vf-module-model.name`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-name'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-name`' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.onap-model-information.model-customization-uuid'
- value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-parameters.'
- value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />
- </set>
- <switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-name`'>
- <outcome value=''>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name" >
+ <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
+ <parameter name="nfc-naming-code" value="`$tmp.nfc-naming-code`" />
+ <parameter name="nfc-function" value="`$tmp.nfc-function`" />
+ <parameter name="orchestration-status" value="`PendingCreate`" />
+ <parameter name="in-maint" value="true" />
+ <parameter name="prov-status" value="`PREPROV`" />
<outcome value='failure'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'></return>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
</block>
</outcome>
- </call>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
</outcome>
<outcome value='Other'>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='restapiUrl' value="`$prop.controller.url + $prop.restapi.preloadinformation + $vf-module-topology-operation-input.vf-module-request-input.vf-module-name + '/vf-module'`" />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='GET' />
- <parameter name="responsePrefix" value="mdsal-preload" />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name" >
+ <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
+ <parameter name="nfc-naming-code" value="`$tmp.nfc-naming-code`" />
+ <parameter name="nfc-function" value="`$tmp.nfc-function`" />
+ <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`" />
+ <parameter name="model-version-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].uuid`" />
+ <parameter name="model-customization-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid`" />
+ <parameter name="orchestration-status" value="`PendingCreate`" />
+ <parameter name="in-maint" value="true" />
+ <parameter name="prov-status" value="`PREPROV`" />
<outcome value='failure'>
- <block>
- <switch test='`$mdsal-preload.response-code`'>
- <outcome value='404'>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-no-preload' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving preload-information" />
- </return>
- </block>
- </outcome>
- </switch>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
</block>
</outcome>
- <outcome value='success'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-operation-assign-preload' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vnfc to AAI" />
+ </return>
</block>
</outcome>
- </execute>
+ </save>
</outcome>
</switch>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmoduleb.log' />
- </execute>
- <switch test='`$from-preload`'>
- <outcome value='false'>
- <set>
- <parameter name='automated-assignment' value='true' />
- </set>
- </outcome>
- <outcome value='true'>
- <set>
- <parameter name='automated-assignment' value='false' />
- </set>
- </outcome>
- </switch>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <for silentFailure='true' index='vnfc-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <block atomic="true">
- <set>
- <parameter name='vnf-network-index' value='-1' />
- </set>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-role`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='vnf-network-index' value='`$idx`' />
- </set>
- <set>
- <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].network-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$idx].network-id`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$vnf-network-index`'>
- <outcome value='-1'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'VNFC network role '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-network-role
- + ' is not found in VNF network list'
- `" />
- </return>
- </block>
- </outcome>
- </switch>
- <for index='subnet-role-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet_length`' >
- <for index='address-family-index' start='0'
- end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family'
- value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
- </set>
- <block atomic="true">
- <set>
- <parameter name='af-count' value='0' />
- </set>
- <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
- </set>
- <set>
- <parameter name='af-count' value='`$af-count + 1`' />
- </set>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$af-count`'>
- <outcome value='1'>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id'
- value='`$subnet-id`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <set>
- <parameter name='subnet-id' value='-1' />
- </set>
- <for index='subnet-data-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data_length`' >
- <switch test='`$tmp.address-family
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].ip-version`'>
- <outcome value='true'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`'>
- <outcome value=''>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <switch test='`$tmp.address-family`'>
- <outcome value='ipv4'>
- <set>
- <parameter name='ip-type' value='IPv4' />
- </set>
- </outcome>
- <outcome value='ipv6'>
- <set>
- <parameter name='ip-type' value='IPv6' />
- </set>
- </outcome>
- </switch>
- <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="isInSameSubnet">
- <parameter name="firstIPAddr" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].network-start-address`" />
- <parameter name="secondIPAddr" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address`" />
- <parameter name="subnet" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].cidr-mask`" />
- <parameter name="ipType" value="`$ip-type`" />
- <outcome value='success'>
- <block atomic="true">
- <set>
- <parameter name='subnet-id' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].subnets-data.subnet-data[$subnet-data-index].sdnc-subnet-id`' />
- </set>
- <break/>
- </block>
- </outcome>
- </execute>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </for>
- <switch test='`$subnet-id`'>
- <outcome value='-1'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Not able to find VNF network subnet that contains address '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[0].vnfc-ip-address
- `" />
- </return>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id' value='`$subnet-id`' />
- </set>
- </block>
- </outcome>
- </switch>
- </block>
- </block>
- </outcome>
- </switch>
- </for>
- </for>
- </block>
- </for>
- </for>
- </for>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmodulec.log' />
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <block atomic="true">
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block atomic="true">
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from VFC_RELATED_NETWORK_ROLE where vfc_customization_uuid = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid
- and network_role = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role'
- pfx='db.vnf-related-network-role[]'>
- <outcome value='failure'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VFC_RELATED_NETWORK_ROLE table" />
- </return>
- </block>
- </outcome>
- <outcome value='success'>
- <for index='db-related-network-index' start='0' end='`$db.vnf-related-network-role_length`' >
- <block atomic="true">
- <set>
- <parameter name='found-related-network' value='false' />
- </set>
- <for silentFailure='true' index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <block atomic="true">
- <for silentFailure='true' index='related-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].related-networks.related-network[$related-network-index].network-role
- == $db.vnf-related-network-role[$db-related-network-index].related-network-role`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='found-related-network' value='true' />
- </set>
- <set>
- <parameter name='saved-vnf-network-index' value='`$vnf-network-index`' />
- <parameter name='saved-related-network-index' value='`$related-network-index`' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-related-network`'>
- <outcome value='true'>
- <break/>
- </outcome>
- </switch>
- </block>
- </for>
- <switch test='`$found-related-network`'>
- <outcome value='false'>
- <block>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find related network '
- + $db.vnf-related-network-role[$db-related-network-index].related-network-role + ' in vnf-networks'`" />
- </return>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].is-trunked'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].is-trunked`' />
- <parameter name='$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].segmentation-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].segmentation-id`' />
- </set>
- <set>
- <parameter name='rn-index' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' />
- </set>
- <switch test='`$rn-index`'>
- <outcome value=''>
- <set>
- <parameter name='rn-index' value='0' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].network-role'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].network-role`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.vlan-interface`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.lower-tag-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.upper-tag-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
- value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$saved-vnf-network-index].related-networks.related-network[$saved-related-network-index].vlan-tags.is-private`' />
- </set>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length'
- value='`$rn-index + 1`' />
- </set>
- </block>
- </for>
- </outcome>
- </get-resource>
- </block>
- </for>
- </block>
- </for>
<set>
- <parameter name='vf-module-object-path'
- value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
- + $vf-module-topology-operation-input.service-information.service-instance-id
- + '/service-data/vnfs/vnf/'
- + $service-data.vnfs.vnf[$vnf-index].vnf-id
- + '/vnf-data/vf-modules/vf-module/'
- + $vf-module-topology-operation-input.vf-module-information.vf-module-id
- + '/vf-module-data/vf-module-topology/'`"/>
- <parameter name='vnf-object-path'
- value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
- + $vf-module-topology-operation-input.service-information.service-instance-id
- + '/service-data/vnfs/vnf/'
- + $service-data.vnfs.vnf[$vnf-index].vnf-id
- + '/vnf-data/vnf-topology/'`"/>
- <parameter name='service-object-path'
- value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
- + $vf-module-topology-operation-input.service-information.service-instance-id
- + '/service-data/service-topology/'`"/>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].created_flag' value='true' />
</set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vf-module"
- key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
- AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"
force="true" pfx="tmp.AnAI-data">
- <parameter name="vf-module-name" value="`$tmp.vf-module-topology.vf-module-topology-identifier.vf-module-name`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.onap-model-information.model-invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.onap-model-information.model-uuid`" />
- <parameter name="model-customization-id" value="`$tmp.vf-module-topology.onap-model-information.model-customization-uuid`" />
- <parameter name="selflink" value="`$vf-module-object-path`" />
- <parameter name="automated-assignment" value="`$automated-assignment`" />
+ <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
+ $vf-module-topology-operation-input.vnf-information.vnf-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="vf-module" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
+ $vf-module-topology-operation-input.vnf-information.vnf-id +
+ '/vf-modules/vf-module/' +
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
<outcome value='failure'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module in AAI" />
+ <parameter name="error-message" value="Error updating vnfc relationships in AAI" />
</return>
</block>
</outcome>
@@ -1994,302 +811,162 @@ key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No vf-module found in AAI for vf module ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
+ <parameter name="error-message" value="Not-found error updating vnfc relationships" />
</return>
</block>
</outcome>
- </update>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ </save>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
<block atomic="true">
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.nfc-naming-code' value='DEFAULT' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.nfc-naming-code' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-naming-code`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`'>
- <outcome value=''>
- <set>
- <parameter name='tmp.nfc-function' value='DEFAULT' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.nfc-function' value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].nfc-function`' />
- </set>
- </outcome>
- </switch>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name" >
- <parameter name="vnfc-name" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <parameter name="nfc-naming-code" value="`$tmp.nfc-naming-code`" />
- <parameter name="nfc-function" value="`$tmp.nfc-function`" />
- <parameter name="model-invariant-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].invariant-uuid`" />
- <parameter name="model-version-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].uuid`" />
- <parameter name="model-customization-id" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].model-customization-uuid`" />
- <parameter name="orchestration-status" value="`PendingCreate`" />
- <parameter name="in-maint" value="true" />
- <parameter name="prov-status" value="`PREPROV`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vnfc to AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].created_flag' value='true' />
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vnfc:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
- $vf-module-topology-operation-input.vnf-information.vnf-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vf-module" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/generic-vnfs/generic-vnf/' +
- $vf-module-topology-operation-input.vnf-information.vnf-id +
- '/vf-modules/vf-module/' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vnfc relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vnfc relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <block atomic="true">
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
- <parameter name="ctx-destination" value="cp-instance-id" />
- </execute>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="generateUUID" >
+ <parameter name="ctx-destination" value="cp-instance-id" />
+ </execute>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cp"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
AND cp.cp-instance-id = $cp-instance-id" >
- <parameter name="cp-instance-id" value="`$cp-instance-id`" />
- <parameter name="port-id" value="0" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating cp object in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating cp object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.connection-point-id'
+ <parameter name="cp-instance-id" value="`$cp-instance-id`" />
+ <parameter name="port-id" value="0" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating cp object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating cp object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.connection-point-id'
value='`$cp-instance-id`' />
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.port-id'
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].connection-point.port-id'
value='0' />
- </set>
- <for silentFailure='true' index='subnet-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
- <for silentFailure='true' index='address-family-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
- <block atomic="true">
- <set>
- <parameter name='tmp.address-family'
+ </set>
+ <for silentFailure='true' index='subnet-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet_length`' >
+ <for silentFailure='true' index='address-family-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='tmp.address-family'
value='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-address-family`' />
- </set>
- <for silentFailure='true' index='address-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`' >
- <switch test='`$tmp.address-family`'>
- <outcome value='ipv4'>
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <for silentFailure='true' index='address-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip_length`' >
+ <switch test='`$tmp.address-family`'>
+ <outcome value='ipv4'>
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv4-address-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
- <parameter name="l3-interface-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
- <parameter name="l3-interface-ipv4-prefix-length" value="32" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating l3-interface-ipv4-address-list object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <parameter name="l3-interface-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
+ <parameter name="l3-interface-ipv4-prefix-length" value="32" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating l3-interface-ipv4-address-list object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv4-address-list:relationship-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv4-address-list.l3-interface-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/' +
$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[1].related-link"
+ <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[1].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/' +
$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
'/subnets/subnet/' +
$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating l3-interface-ipv4-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating l3-interface-ipv4-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- </block>
- </outcome>
- <outcome value='ipv6'>
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating l3-interface-ipv4-address-list relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating l3-interface-ipv4-address-list relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </outcome>
+ <outcome value='ipv6'>
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv6-address-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address" >
- <parameter name="l3-interface-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
- <parameter name="l3-interface-ipv6-prefix-length" value="128" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error creating l3-interface-ipv6-address-list object in AAI" />
- </return>
- </block>
- </outcome>
- </save>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <parameter name="l3-interface-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address`" />
+ <parameter name="l3-interface-ipv6-prefix-length" value="128" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error creating l3-interface-ipv6-address-list object in AAI" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-interface-ipv6-address-list:relationship-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
AND cp.cp-instance-id = $cp-instance-id
AND l3-interface-ipv6-address-list.l3-interface-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].vnfc-subnet-ip[$address-index].vnfc-ip-address"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/' +
$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[1].related-link"
+ <parameter name="relationship-list.relationship[1].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[1].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/' +
$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].network-id +
'/subnets/subnet/' +
$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-subnet[$subnet-role-index].vnfc-ip-assignments[$address-family-index].subnet-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating l3-interface-ipv6-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating l3-interface-ipv6-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- </block>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </for>
- <for index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-network-role
- == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
- <outcome value='true'>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="cp:relationship-list"
- key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
- AND cp.cp-instance-id = $cp-instance-id"
- force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
- value="`'/aai/v$/network/l3-networks/l3-network/' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-id`" />
<outcome value='failure'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating cp relationship to l3-network in AAI" />
+ <parameter name="error-message" value="Error updating l3-interface-ipv6-address-list relationships in AAI" />
</return>
</block>
</outcome>
@@ -2299,114 +976,80 @@ key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating cp relationship to l3-network" />
+ <parameter name="error-message" value="Not-found error updating l3-interface-ipv6-address-list relationships" />
</return>
</block>
</outcome>
</save>
- </outcome>
- </switch>
- </for>
- <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </for>
+ <for index='vnf-network-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$network-role-index].vnfc-network-role
== $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
- <outcome value='true'>
- <for silentFailure='true' index='related-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' >
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cp:relationship-list"
key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
AND cp.cp-instance-id = $cp-instance-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].network-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vlan-tag" />
- <parameter name="relationship-list.relationship[1].related-link"
- value="`'/aai/v$/network/vlan-tags/vlan-tag/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].vlan-tags.vlan-interface`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating cp relationship to l3-network and vlan-tag in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating cp relationship to l3-network and vlan-tag" />
- </return>
- </block>
- </outcome>
- </save>
- </for>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </block>
+ $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating cp relationship to l3-network in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating cp relationship to l3-network" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
</for>
<for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vf-module:relationship-list"
- key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
- AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ == $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-network-index].network-role`'>
+ <outcome value='true'>
+ <for silentFailure='true' index='related-network-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network_length`' >
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="cp:relationship-list"
+ key="vnfc.vnfc-name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ AND cp.cp-instance-id = $cp-instance-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/' +
- $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No l3-network found in AAI for network ID '
- + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].created-flag' value='true' />
- </set>
- <for silentFailure='true' index='ipv4-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="vip-ipv4-address-list"
- key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
- AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
- AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" >
- <parameter name="vip-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]`" />
- <parameter name="vip-ipv4-prefix-length" value="32" />
- <parameter name="is-floating" value="false" />
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].network-id`" />
+ <parameter name="relationship-list.relationship[1].related-to" value="vlan-tag" />
+ <parameter name="relationship-list.relationship[1].related-link"
+ value="`'/aai/v$/network/vlan-tags/vlan-tag/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].related-networks.related-network[$related-network-index].vlan-tags.vlan-interface`" />
<outcome value='failure'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv4-address-list in AAI" />
+ <parameter name="error-message" value="Error updating cp relationship to l3-network and vlan-tag in AAI" />
</return>
</block>
</outcome>
@@ -2416,303 +1059,374 @@ key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv4-address-list" />
+ <parameter name="error-message" value="Not-found error updating cp relationship to l3-network and vlan-tag" />
</return>
</block>
</outcome>
</save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv4-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </for>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ </block>
+ </for>
+ <for silentFailure='true' index='network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vf-module:relationship-list"
+ key="vf-module.vf-module-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ AND generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
+ force="true" pfx="tmp.AnAI-data">
+ <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
+ <parameter name="relationship-list.relationship[0].related-link"
+ value="`'/aai/v$/network/l3-networks/l3-network/' +
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vf-module relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No l3-network found in AAI for network ID '
+ + $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-id`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].created-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='ipv4-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vip-ipv4-address-list"
+ key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
+ AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
+ AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]" >
+ <parameter name="vip-ipv4-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]`" />
+ <parameter name="vip-ipv4-prefix-length" value="32" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vip-ipv4-address-list in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error saving vip-ipv4-address-list" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv4-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv4-address-list:relationship-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
+ '/subnets/subnet/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv4-subnet-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
- <parameter name="relationship-list.relationship[1].related-link"
+ <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
+ <parameter name="relationship-list.relationship[1].related-link"
value="`'/aai/v$/network/vnfcs/vnfc/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv4-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
== $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
- <outcome value='true'>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv4-address-list:relationship-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv4-address-list.vip-ipv4-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v4[$ipv4-index]"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="cp" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="cp" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/vnfcs/vnfc/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ '/cps/cp/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
- </return>
- </block>
- </outcome>
- </save>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </block>
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
</for>
- <for silentFailure='true' index='ipv6-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </block>
+ </for>
+ </block>
+ </for>
+ <for silentFailure='true' index='ipv6-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv6-address-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]" >
- <parameter name="vip-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]`" />
- <parameter name="vip-ipv6-prefix-length" value="128" />
- <parameter name="is-floating" value="false" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error saving vip-ipv6-address-list in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error saving vip-ipv6-address-list" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv6-flag' value='true' />
- </set>
- <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <parameter name="vip-ipv6-address" value="`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]`" />
+ <parameter name="vip-ipv6-prefix-length" value="128" />
+ <parameter name="is-floating" value="false" />
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error saving vip-ipv6-address-list in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error saving vip-ipv6-address-list" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.created-ipv6-flag' value='true' />
+ </set>
+ <for silentFailure='true' index='vnfc-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv6-address-list:relationship-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="subnet" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/l3-networks/l3-network/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].network-id
+ '/subnets/subnet/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.ipv6-subnet-id`" />
- <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
- <parameter name="relationship-list.relationship[1].related-link"
+ <parameter name="relationship-list.relationship[1].related-to" value="vnfc" />
+ <parameter name="relationship-list.relationship[1].related-link"
value="`'/aai/v$/network/vnfcs/vnfc/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name`" />
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv6-address-list relationships in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv6-address-list relationships" />
- </return>
- </block>
- </outcome>
- </save>
- <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
- <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv6-address-list relationships in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv6-address-list relationships" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <for silentFailure='true' index='vnfc-network-role-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data_length`' >
+ <switch test='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$network-role-index].network-role
== $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].vnfc-network-role`'>
- <outcome value='true'>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vip-ipv6-address-list:relationship-list"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner
AND cloud-region.cloud-region-id = $vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region
AND vip-ipv6-address-list.vip-ipv6-address = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-networks.vm-network[$vm-network-index].floating-ips.floating-ip-v6[$ipv6-index]"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="cp" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="cp" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/vnfcs/vnfc/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-name
+ '/cps/cp/'
+ $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vnfc-names[$vnfc-index].vnfc-networks.vnfc-network-data[$vnfc-network-role-index].connection-point.connection-point-id`" />
- <outcome value='failure'>
- <block atomic="true">
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block atomic="true">
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
- </return>
- </block>
- </outcome>
- </save>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- </block>
+ <outcome value='failure'>
+ <block atomic="true">
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating vip-ipv4-address-list relationship to cp in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Not-found error updating vip-ipv4-address-list relationship to cp" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
</for>
</block>
</for>
</block>
</for>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-assign' mode='sync' >
- <outcome value='failure'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vlantaggingfailure.log' />
- </execute>
- <return status='failure'></return>
- </block>
- </outcome>
- </call>
- <call module='GENERIC-RESOURCE-API' rpc='vf-module-generate-heat-parameters' mode='sync' ></call>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmoduleheat.log' />
- </execute>
- <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
- <for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
- <block atomic="true">
- <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ </block>
+ </for>
+ </block>
+ </for>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-assign' mode='sync' >
+ <outcome value='failure'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-assign-rollback' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vlantaggingfailure.log' />
+ </execute>
+ <return status='failure'></return>
+ </block>
+ </outcome>
+ </call>
+ <call module='GENERIC-RESOURCE-API' rpc='vf-module-generate-heat-parameters' mode='sync' ></call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmoduleheat.log' />
+ </execute>
+ <for silentFailure='true' index='vm-type-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm_length`' >
+ <for index='vm-index' start='0' end='`$tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-count`' >
+ <block atomic="true">
+ <delete plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='DELETE from VIPR_CONFIGURATION WHERE vnf_id = $service-data.vnfs.vnf[$vnf-index].vnf-id
AND ecomp_service_instance_id = $service-data.service-information.service-instance-id
AND vm_name = $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index]' >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </delete>
- <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
+ </outcome>
+ </delete>
+ <save plugin="org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource" resource="SQL"
key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id, vm_name, cloud_region_id, cloud_owner) VALUES ( $service-data.vnfs.vnf[$vnf-index].vnf-id , $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name , $service-data.service-information.service-instance-id , $tmp.vf-module-topology.vf-module-assignments.vms.vm[$vm-type-index].vm-names.vm-name[$vm-index] , $tmp.vf-module-topology.aic-cloud-region , $prop.cloud-region.cloud-owner )" >
- <outcome value='failure'>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
- <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
- <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
- </record>
- </outcome>
- </save>
- </block>
- </for>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="GENERIC-RESOURCE-API.vf-module-topology-operation-assign:REQID"/>
+ <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
+ <parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
+ </record>
+ </outcome>
+ </save>
+ </block>
+ </for>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
value='$vf-module-topology-operation-input.sdnc-request-header.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.'
value='$vf-module-topology-operation-input.request-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.'
value='$vf-module-topology-operation-input.service-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.'
value='$vf-module-topology-operation-input.vnf-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.'
value='$vf-module-topology-operation-input.vf-module-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
value='$vf-module-topology-operation-input.vf-module-request-input.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-action'
value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </block>
- </outcome>
- </get-resource>
- </outcome>
- </switch>
- </block>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vfmodule.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml
index b9547f37..66330261 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-changeassign.xml
@@ -85,13 +85,14 @@
</return>
</outcome>
</switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.sdnc-generated-cloud-resources`'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
<outcome value='true'>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-vfmodule-changeassign' mode='sync' >
<outcome value='failure'>
<return status='failure'>
<parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Encountered error while updating self-serve vf-module resources with error: '+ $error-message`" />
+ <parameter name='error-message' value="`'Encountered error performing changeassign for self-serve vf-module resources with error: '+ $error-message`" />
</return>
</outcome>
<outcome value='success'>
@@ -103,8 +104,17 @@
</outcome>
</call>
</outcome>
- <outcome value='Other'>
+ <outcome value='false'>
<block atomic="true">
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vf-module-information.onap-model-information.model-customization-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT * from VF_MODULE_MODEL WHERE customization_uuid = $vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid'
pfx='db.vf-module-model'>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
index f804500f..28669172 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-unassign.xml
@@ -3,6 +3,20 @@
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='vf-module-topology-operation-unassign' mode='sync'>
<block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <switch test='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='prop.cloud-region.cloud-owner' value='`$vf-module-topology-operation-input.vf-module-request-input.cloud-owner`' />
+ </set>
+ </outcome>
+ </switch>
<switch test='`$vf-module-topology-operation-input.request-information.request-action`'>
<outcome value='DeleteVfModuleInstance'>
<block></block>
@@ -85,7 +99,8 @@
</return>
</outcome>
</switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.sdnc-generated-cloud-resources`'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
<outcome value='true'>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-vf-module-unassign' mode='sync' >
<outcome value='failure'>
@@ -103,7 +118,7 @@
</outcome>
</call>
</outcome>
- <outcome value='Other'>
+ <outcome value='false'>
<block atomic="true">
<set>
<parameter name='tmp.status' value="`'PENDING_DELETE_' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id`" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
index 8c1d2166..1433b7b5 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
@@ -7,6 +7,16 @@
<parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
<parameter name='contextPrefix' value='prop' />
</execute>
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.cloud-owner`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='prop.cloud-region.cloud-owner' value='`$vnf-topology-operation-input.vnf-request-input.cloud-owner`' />
+ </set>
+ </outcome>
+ </switch>
<switch test='`$vnf-topology-operation-input.request-information.request-action`'>
<outcome value='CreateVnfInstance'>
<block></block>
@@ -37,133 +47,104 @@
</return>
</outcome>
</get-resource>
- <block atomic="true">
- <set>
- <parameter name='tmp.exist.sdnc-model-name' value='false' />
- <parameter name='tmp.exist.sdnc-artifact-name' value='false' />
- </set>
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
- <outcome value=''>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
+ <outcome value='true'>
+ <block atomic="true">
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-assign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Failed to create self-serve assignment for vnf with vnf-id=' + $vnf-topology-operation-input.vnf-information.vnf-id + ' with error: ' + $error-message`" />
+ </return>
+ </outcome>
+ </call>
<set>
- <parameter name='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length' value='0' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
</set>
- </outcome>
- </switch>
- <for silentFailure='true' index='p' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
- <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$p].name`">
- <outcome value='sdnc_model_name'>
- <set>
- <parameter name='tmp.exist.sdnc-model-name' value='true' />
- </set>
- </outcome>
- <outcome value='sdnc_artifact_name'>
- <set>
- <parameter name='tmp.exist.sdnc-artifact-name' value='true' />
- </set>
- </outcome>
- </switch>
- </for>
- <switch test="`$tmp.exist.sdnc-model-name == 'true' and $tmp.exist.sdnc-artifact-name == 'true'`">
- <outcome value='true'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-assign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Failed to create self-serve assignment for vnf with vnf-id=' + $vnf-topology-operation-input.vnf-information.vnf-id`" />
- </return>
- </outcome>
- </call>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </outcome>
- <outcome value='false'>
- <switch test="`$db.vf-model.sdnc-model-name != '' and $db.vf-model.sdnc-artifact-name != ''`">
- <outcome value='true'>
- <block atomic="true">
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-assign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Failed to create self-serve assignment for vnf with vnf-id=' + $vnf-topology-operation-input.vnf-information.vnf-id`" />
- </return>
- </outcome>
- </call>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <block atomic="true">
+ <switch test='`$service-data.vnfs.vnf_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='vnf-index' value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block>
<set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ <parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
</set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/ss-vnfend.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
+ <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
+ <switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>
+ <outcome value='true'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id
+ + ' already exists'`" />
+ </return>
+ </outcome>
+ </switch>
+ </for>
</block>
</outcome>
- <outcome value='false'>
- <block atomic="true">
- <switch test='`$service-data.vnfs.vnf_length`'>
- <outcome value=''>
- <set>
- <parameter name='vnf-index' value='0' />
- </set>
- </outcome>
- <outcome value='Other'>
- <block>
- <set>
- <parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
- </set>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
- <switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>
- <outcome value='true'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id
- + ' already exists'`" />
- </return>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
- </set>
- <set>
- <parameter name='tmp.vnf-network-collection_length' value='0' />
- </set>
- <for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >
- <block atomic="true">
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
+ </set>
+ <set>
+ <parameter name='tmp.vnf-network-collection_length' value='0' />
+ </set>
+ <for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >
+ <block atomic="true">
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="instance-group"
key="instance-group.id = $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id"
pfx='aai.instance-group' local-only='false' >
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Cannot find instance group id ' +
+ $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id
+ + ' in AAI'`" />
+ </return>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving instance-group from AAI" />
+ </return>
+ </outcome>
+ </get-resource>
+ <for index='rel-index' start='0' end='`$aai.instance-group.relationship-list.relationship_length`' >
+ <switch test='`$aai.instance-group.relationship-list.relationship[$rel-index].related-to`'>
+ <outcome value='collection'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="collection"
+ key="collection.collection-id = $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"
+ pfx='aai.collection' local-only='false' >
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find instance group id ' +
- $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id
+ <parameter name="error-message" value="`'Cannot find collection ' +
+ $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value
+ ' in AAI'`" />
</return>
</outcome>
@@ -171,379 +152,625 @@
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving instance-group from AAI" />
+ <parameter name="error-message" value="System error retrieving collection from AAI" />
</return>
</outcome>
- </get-resource>
- <for index='rel-index' start='0' end='`$aai.instance-group.relationship-list.relationship_length`' >
- <switch test='`$aai.instance-group.relationship-list.relationship[$rel-index].related-to`'>
- <outcome value='collection'>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="collection"
- key="collection.collection-id = $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value"
- pfx='aai.collection' local-only='false' >
- <outcome value='not-found'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Cannot find collection ' +
- $aai.instance-group.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value
- + ' in AAI'`" />
- </return>
- </outcome>
- <outcome value='failure'>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='found-network-instance-group' value='false' />
+ </set>
+ <for silentFailure='true' index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
+ <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id
+ == $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='found-network-instance-group' value='true' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$found-network-instance-group`'>
+ <outcome value='false'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="System error retrieving collection from AAI" />
- </return>
- </outcome>
- <outcome value='success'>
- <block atomic="true">
- <set>
- <parameter name='found-network-instance-group' value='false' />
- </set>
- <for silentFailure='true' index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
- <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id
- == $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>
- <outcome value='true'>
- <block>
- <set>
- <parameter name='found-network-instance-group' value='true' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </for>
- <switch test='`$found-network-instance-group`'>
- <outcome value='false'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Could not find network instance group ' +
+ <parameter name="error-message" value="`'Could not find network instance group ' +
$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id
+ ' in MD-SAL'`" />
- </return>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-function'
+ </return>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-function'
value='`$aai.instance-group.instance-group-function`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-id'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-instance-group-id'
value='`$aai.instance-group.id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-service-instance-id'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-service-instance-id'
value='`$service-data.network-instance-groups.network-instance-group[$nig-index].service-instance-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-customization-uuid'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$tmp.vnf-network-collection_length].network-collection-customization-uuid'
value='`$aai.collection.collection-customization-id`' />
- </set>
- <set>
- <parameter name='tmp.vnf-network-collection_length' value='`$tmp.vnf-network-collection_length + 1`' />
- </set>
- </block>
- </outcome>
- </get-resource>
- </outcome>
- </switch>
- </for>
- </block>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection_length'
+ </set>
+ <set>
+ <parameter name='tmp.vnf-network-collection_length' value='`$tmp.vnf-network-collection_length + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection_length'
value='`$tmp.vnf-network-collection_length`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id'
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id'
value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type'
value='`$vnf-topology-operation-input.vnf-information.vnf-type`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type'
value='`$db.vf-model.nf-type`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role'
value='`$db.vf-model.nf-role`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function'
value='`$db.vf-model.nf-function`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code'
value='`$db.vf-model.nf-code`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.tenant'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.tenant'
value='`$vnf-topology-operation-input.vnf-request-input.tenant`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-cloud-region'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-cloud-region'
value='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`' />
- </set>
- <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>
+ </set>
+ <switch test='`$vnf-topology-operation-input.vnf-information.vnf-name`'>
+ <outcome value=''>
+ <block atomic="true">
+ <switch test='`$db.vf-model.ecomp-generated-naming`'>
+ <outcome value='Y'>
+ <block></block>
+ </outcome>
+ <outcome value='N'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="No vnf-name was received but ecomp-generated-naming is not Y" />
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="No vnf-name was received but ecomp-generated-naming is not Y" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$db.vf-model.naming-policy`'>
<outcome value=''>
<block atomic="true">
- <switch test='`$db.vf-model.ecomp-generated-naming`'>
- <outcome value='Y'>
- <block></block>
- </outcome>
- <outcome value='N'>
+ <set>
+ <parameter name='generate-unique-name-input.action' value='ASSIGN' />
+ <parameter name='generate-unique-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='generate-unique-name-input.index-table-name' value='VNF_NAME_INDEX' />
+ <parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />
+ <parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />
+ <parameter name='generate-unique-name-input.prefix' value="`'z' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + $db.vf-model.nf-code`" />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
+ <outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="No vnf-name was received but ecomp-generated-naming is not Y" />
+ <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
</return>
</outcome>
- <outcome value='Other'>
+ <outcome value='success'>
+ <set>
+ <parameter name='tmp.vnf-name' value='`$generate-unique-name-output.generated-name`' />
+ </set>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.policy-instance-name' value='`$db.vf-model.naming-policy`' />
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='ASSIGN' />
+ <parameter name='naming-policy-generate-name-input.query-parameter' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >
+ <outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="No vnf-name was received but ecomp-generated-naming is not Y" />
+ <parameter name="error-message" value="Unable to generate VNF name" />
</return>
</outcome>
- </switch>
- <switch test='`$db.vf-model.naming-policy`'>
- <outcome value=''>
- <block atomic="true">
- <set>
- <parameter name='generate-unique-name-input.action' value='ASSIGN' />
- <parameter name='generate-unique-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='generate-unique-name-input.index-table-name' value='VNF_NAME_INDEX' />
- <parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />
- <parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />
- <parameter name='generate-unique-name-input.prefix' value="`'z' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + $db.vf-model.nf-code`" />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`$generate-unique-name-output.error-message`" />
- </return>
- </outcome>
- <outcome value='success'>
- <set>
- <parameter name='tmp.vnf-name' value='`$generate-unique-name-output.generated-name`' />
- </set>
- </outcome>
- </call>
- </block>
- </outcome>
- <outcome value='Other'>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.policy-instance-name' value='`$db.vf-model.naming-policy`' />
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='ASSIGN' />
- <parameter name='naming-policy-generate-name-input.query-parameter' value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Unable to generate VNF name" />
- </return>
- </outcome>
- <outcome value='success'>
- <set>
- <parameter name='tmp.vnf-name' value='`$naming-policy-generate-name-output.vnf-name`' />
- </set>
- </outcome>
- </call>
- </block>
+ <outcome value='success'>
+ <set>
+ <parameter name='tmp.vnf-name' value='`$naming-policy-generate-name-output.vnf-name`' />
+ </set>
</outcome>
- </switch>
+ </call>
</block>
</outcome>
- <outcome value='Other'>
- <set>
- <parameter name='tmp.vnf-name' value="`$vnf-topology-operation-input.vnf-request-input.vnf-name`" />
- </set>
- </outcome>
</switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='tmp.vnf-name' value="`$vnf-topology-operation-input.vnf-information.vnf-name`" />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'
value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name'
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name'
value='`$tmp.vnf-name`' />
- </set>
- <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'
+ </set>
+ <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'
value='`$db.vf-model.invariant-uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'
value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`'>
- <outcome value=''>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'
value='`$db.vf-model.uuid`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'
value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`'>
- <outcome value=''>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'
value='`$db.vf-model.version`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'
value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`' />
- </set>
- </outcome>
- </switch>
- <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`'>
- <outcome value=''>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'
value='`$db.vf-model.name`' />
- </set>
- </outcome>
- <outcome value='Other'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'
value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'
value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="cloud-region"
key="cloud-region.cloud-owner = $prop.cloud-region.cloud-owner AND
cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND
depth='all'"
pfx='aai.cloud-region' local-only='false' >
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Cloud region not found in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving cloud region from AAI" />
+ </return>
+ </block>
+ </outcome>
+ </get-resource>
+ <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
+ <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
+ <outcome value='complex'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
+ <parameter name='ctx_memory_result_key' value='aai-uid-split' />
+ <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
+ <parameter name='regex' value='/' />
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli'
+ value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli`'>
+ <outcome value=''>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VF_TO_NETWORK_ROLE_MAPPING WHERE vf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'
+ pfx='db.vf-network-role-mapping[]'>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VF_TO_NETWORK_ROLE_MAPPING table" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <set>
+ <parameter name='db.vf-network-role-mapping_length' value='0' />
+ </set>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='network-index' value='0' />
+ </set>
+ <for silentFailure='true' index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'>
+ <switch test='`$db.vf-network-role-mapping[$role-index].network-role`'>
+ <outcome value=''>
+ <block></block>
+ </outcome>
+ <outcome value='null'>
+ <block></block>
+ </outcome>
+ <outcome value='NULL'>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true">
+ <set>
+ <parameter name='aai.l3-network.' value='' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="l3-networks"
+ key="l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role"
+ pfx='aai.l3-network' local-only='false'
+>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No active l3-network found in AAI with cloud_region_id '
+ + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '
+ + $db.vf-network-role-mapping[$network-index].network-role`" />
+ </return>
</block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Cloud region not found in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </outcome>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error retrieving l3-network from AAI" />
+ </return>
</block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving cloud region from AAI" />
- </return>
- </block>
- </outcome>
- </get-resource>
- <for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
- <switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
- <outcome value='complex'>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name='l3-network-id' value='-1' />
+ </set>
+ <block>
+ <set>
+ <parameter name='found-network' value='false' />
+ </set>
+ <for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >
<block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
- <parameter name='ctx_memory_result_key' value='aai-uid-split' />
- <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
- <parameter name='regex' value='/' />
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli'
- value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
- </set>
- <break/>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>
+ <outcome value='PendingCreate'>
+ <block></block>
+ </outcome>
+ <outcome value='Pending Create'>
+ <block></block>
+ </outcome>
+ <outcome value='PendingDelete'>
+ <block></block>
+ </outcome>
+ <outcome value='Pending Delete'>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >
+ <block atomic="true">
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>
+ <outcome value='service-instance'>
+ <for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
+ <outcome value='service-instance.service-instance-id'>
+ <set>
+ <parameter name='network-service-instance-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ <outcome value='cloud-region'>
+ <for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
+ <outcome value='cloud-region.cloud-region-id'>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value == $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>
+ <outcome value='true'>
+ <block atomic="true">
+ <set>
+ <parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
+ </set>
+ <set>
+ <parameter name='found-network' value='true' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ <switch test='`$found-network`'>
+ <outcome value='true'>
+ <break/>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </outcome>
+ </switch>
+ <switch test='`$found-network`'>
+ <outcome value='true'>
+ <break/>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ <switch test='`$l3-network-id`'>
+ <outcome value='-1'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`" />
+ </return>
</block>
</outcome>
</switch>
- </for>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli`'>
- <outcome value=''>
- <block>
- <block atomic="true">
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'
+ value='`$db.vf-network-role-mapping[$role-index].network-role`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'
+ value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'
+ value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />
+ </set>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet_length`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
+ value='0' />
+ </set>
+ </outcome>
+ <outcome value='0'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
+ value='0' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet_length`' >
+ <block>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`'>
+ <outcome value=''>
+ <set>
+ <parameter name='aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role' value='NONE' />
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`'>
+ <outcome value='4'>
+ <set>
+ <parameter name='tmp.ip-version' value='ipv4' />
+ </set>
+ </outcome>
+ <outcome value='6'>
+ <set>
+ <parameter name='tmp.ip-version' value='ipv6' />
+ </set>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].ip-version'
+ value='`$tmp.ip-version`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].neutron-subnet-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].sdnc-subnet-id'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-role'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-name'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-name`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].network-start-address'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].network-start-address`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].gateway-address'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].gateway-address`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].cidr-mask'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].cidr-mask`' />
+ </set>
+ <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].dhcp-enabled`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].dhcp-enabled'
+ value='Y' />
+ </set>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].dhcp-enabled'
+ value='N' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
<set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
+ value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet_length`' />
</set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
</block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
- </return>
- </block>
- </outcome>
- </switch>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from VF_TO_NETWORK_ROLE_MAPPING WHERE vf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'
- pfx='db.vf-network-role-mapping[]'>
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </outcome>
+ </switch>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
+ key='SELECT * from VNF_RELATED_NETWORK_ROLE where vnf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid
+ and network_role = $db.vf-network-role-mapping[$role-index].network-role'
+ pfx='db.vnf-related-network-role[]'>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error reading VNF_RELATED_NETWORK_ROLE table" />
+ </return>
</block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VF_TO_NETWORK_ROLE_MAPPING table" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <set>
- <parameter name='db.vf-network-role-mapping_length' value='0' />
- </set>
- </outcome>
- </get-resource>
- <set>
- <parameter name='network-index' value='0' />
- </set>
- <for index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'>
- <switch test='`$db.vf-network-role-mapping[$role-index].network-role`'>
- <outcome value=''>
- <block></block>
</outcome>
- <outcome value='Other'>
+ <outcome value='success'>
<block atomic="true">
- <set>
- <parameter name='aai.l3-network.' value='' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="l3-networks"
- key="l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role"
- pfx='aai.l3-network' local-only='false'
->
- <outcome value='not-found'>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.network-topology-identifier-structure`"/>
+ <parameter name="outputPath" value="tmp.part"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$network-service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.part`"/>
+ <parameter name="outputPath" value="tmp.ntis-url"/>
+ <parameter name="target" value="{network-id}"/>
+ <parameter name="replacement" value="`$l3-network-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ntis-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="mdsal-ntis" />
+ <outcome value='failure'>
<block>
<block atomic="true">
<set>
@@ -556,12 +783,30 @@
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No active l3-network found in AAI with cloud_region_id '
- + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '
- + $db.vf-network-role-mapping[$network-index].network-role`" />
+ <parameter name="error-message" value="`
+ 'Error retrieving network-topology-identifier-structure for service instance '
+ + $network-service-instance-id
+ + ' and network-id '
+ + $l3-network-id`" />
</return>
</block>
</outcome>
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].is-trunked'
+ value='`$mdsal-ntis.network-topology-identifier-structure.is-trunked`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].segmentation-id'
+ value='`$mdsal-ntis.network-topology-identifier-structure.segmentation-id`' />
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="custom-query"
+ key="format = 'resource'"
+ force="true"
+ local-only="false"
+ pfx="tmp.AnAI-data.oe">
+ <parameter name="start[0]" value="`'nodes/service-instances/service-instance?service-instance-id=' + $network-service-instance-id `" />
+ <parameter name="start_length" value="1" />
+ <parameter name="query" value="/query/owning-entity-fromService-instance" />
<outcome value='failure'>
<block>
<block atomic="true">
@@ -575,90 +820,11 @@
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error retrieving l3-network from AAI" />
+ <parameter name="error-message" value="Error getting owning entity from service instance" />
</return>
</block>
</outcome>
- </get-resource>
- <set>
- <parameter name='l3-network-id' value='-1' />
- </set>
- <block>
- <set>
- <parameter name='found-network' value='false' />
- </set>
- <for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >
- <block atomic="true">
- <switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>
- <outcome value='PendingCreate'>
- <block></block>
- </outcome>
- <outcome value='Pending Create'>
- <block></block>
- </outcome>
- <outcome value='PendingDelete'>
- <block></block>
- </outcome>
- <outcome value='Pending Delete'>
- <block></block>
- </outcome>
- <outcome value='Other'>
- <for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >
- <block atomic="true">
- <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>
- <outcome value='service-instance'>
- <for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
- <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
- <outcome value='service-instance.service-instance-id'>
- <set>
- <parameter name='network-service-instance-id'
- value='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value`' />
- </set>
- </outcome>
- </switch>
- </for>
- </outcome>
- <outcome value='cloud-region'>
- <for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
- <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
- <outcome value='cloud-region.cloud-region-id'>
- <switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value == $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>
- <outcome value='true'>
- <block atomic="true">
- <set>
- <parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
- </set>
- <set>
- <parameter name='found-network' value='true' />
- </set>
- <break/>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </for>
- </outcome>
- </switch>
- <switch test='`$found-network`'>
- <outcome value='true'>
- <break/>
- </outcome>
- </switch>
- </block>
- </for>
- </outcome>
- </switch>
- <switch test='`$found-network`'>
- <outcome value='true'>
- <break/>
- </outcome>
- </switch>
- </block>
- </for>
- </block>
- <switch test='`$l3-network-id`'>
- <outcome value='-1'>
+ <outcome value='not-found'>
<block>
<block atomic="true">
<set>
@@ -671,620 +837,414 @@
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`" />
+ <parameter name="error-message" value="Unable to find owning entity from service instance" />
</return>
</block>
</outcome>
- </switch>
+ </save>
<set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'
- value='`$db.vf-network-role-mapping[$role-index].network-role`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'
- value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'
- value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'
- value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'
- value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />
+ <parameter name='rn-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network_length`' />
</set>
- <switch test='`$aai.l3-network.l3-network[0].subnets.subnet_length`'>
+ <switch test='`$rn-index`'>
<outcome value=''>
<set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
- value='0' />
- </set>
- </outcome>
- <outcome value='0'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
- value='0' />
+ <parameter name='rn-index' value='0' />
</set>
</outcome>
- <outcome value='Other'>
- <block>
- <for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >
- <block>
- <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`'>
- <outcome value=''>
- <set>
- <parameter name='aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role' value='NONE' />
- </set>
- </outcome>
- </switch>
- <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`'>
- <outcome value='4'>
- <set>
- <parameter name='tmp.ip-version' value='ipv4' />
- </set>
- </outcome>
- <outcome value='6'>
- <set>
- <parameter name='tmp.ip-version' value='ipv6' />
- </set>
- </outcome>
- </switch>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].ip-version'
- value='`$tmp.ip-version`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-id'
- value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].neutron-subnet-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].sdnc-subnet-id'
- value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-role'
- value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-role`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-name'
- value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-name`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].network-start-address'
- value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].network-start-address`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].gateway-address'
- value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].gateway-address`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].cidr-mask'
- value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].cidr-mask`' />
- </set>
- <switch test='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].dhcp-enabled`'>
- <outcome value='true'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].dhcp-enabled'
- value='Y' />
- </set>
- </outcome>
- <outcome value='false'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].dhcp-enabled'
- value='N' />
- </set>
- </outcome>
- </switch>
- </block>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
- value='`$aai.l3-network.l3-network[0].subnets.subnet_length`' />
- </set>
- </block>
- </outcome>
</switch>
- <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
- key='SELECT * from VNF_RELATED_NETWORK_ROLE where vnf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid
- and network_role = $db.vf-network-role-mapping[$role-index].network-role'
- pfx='db.vnf-related-network-role[]'>
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error reading VNF_RELATED_NETWORK_ROLE table" />
- </return>
- </block>
- </outcome>
- <outcome value='success'>
- <block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$prop.restapi.network-topology-identifier-structure`"/>
- <parameter name="outputPath" value="tmp.part"/>
- <parameter name="target" value="{service-instance-id}"/>
- <parameter name="replacement" value="`$network-service-instance-id`"/>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
- <parameter name="source" value="`$tmp.part`"/>
- <parameter name="outputPath" value="tmp.ntis-url"/>
- <parameter name="target" value="{network-id}"/>
- <parameter name="replacement" value="`$l3-network-id`"/>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ntis-url`' />
- <parameter name='restapiUser' value='`$prop.controller.user`' />
- <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
- <parameter name='format' value='json' />
- <parameter name='httpMethod' value='GET' />
- <parameter name="responsePrefix" value="mdsal-ntis" />
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`
- 'Error retrieving network-topology-identifier-structure for service instance '
- + $network-service-instance-id
- + ' and network-id '
- + $l3-network-id`" />
- </return>
- </block>
- </outcome>
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].is-trunked'
- value='`$mdsal-ntis.network-topology-identifier-structure.is-trunked`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].segmentation-id'
- value='`$mdsal-ntis.network-topology-identifier-structure.segmentation-id`' />
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="custom-query"
- key="format = 'resource'"
- force="true"
- local-only="false"
- pfx="tmp.AnAI-data.oe">
- <parameter name="start[0]" value="`'nodes/service-instances/service-instance?service-instance-id=' + $network-service-instance-id `" />
- <parameter name="start_length" value="1" />
- <parameter name="query" value="/query/owning-entity-fromService-instance" />
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error getting owning entity from service instance" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Unable to find owning entity from service instance" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='rn-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network_length`' />
- </set>
- <switch test='`$rn-index`'>
- <outcome value=''>
- <set>
- <parameter name='rn-index' value='0' />
- </set>
- </outcome>
- </switch>
- <for index='rel-network-role-index' start='0' end='`$db.vnf-related-network-role_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <for index='rel-network-role-index' start='0' end='`$db.vnf-related-network-role_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="custom-query"
key="format = 'resource'"
force="true"
local-only="false"
pfx="tmp.AnAI-data.get-networks">
- <parameter name="start[0]" value="`'/business/owning-entities/owning-entity/' + $tmp.AnAI-data.oe.results[0].owning-entity.owning-entity-id `" />
- <parameter name="start_length" value="1" />
- <parameter name="query" value="`'/query/getNetworks?networkRole=' + $db.vnf-related-network-role[$rel-network-role-index].related-network-role
+ <parameter name="start[0]" value="`'/business/owning-entities/owning-entity/' + $tmp.AnAI-data.oe.results[0].owning-entity.owning-entity-id `" />
+ <parameter name="start_length" value="1" />
+ <parameter name="query" value="`'/query/getNetworks?networkRole=' + $db.vnf-related-network-role[$rel-network-role-index].related-network-role
+ '&amp;cloudRegionId=' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error calling getNetworks custom query in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No l3-network returned from getNetworks custom query for related network role '
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error calling getNetworks custom query in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No l3-network returned from getNetworks custom query for related network role '
+ $db.vnf-related-network-role[0].related-network-role`" />
- </return>
- </block>
- </outcome>
- </save>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].network-id'
+ </return>
+ </block>
+ </outcome>
+ </save>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].network-id'
value='`$tmp.AnAI-data.get-networks.results[0].l3-network.network-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].network-role'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].network-role'
value='`$tmp.AnAI-data.get-networks.results[0].l3-network.network-role`' />
- </set>
- <for index='rel-index' start='0' end='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship_length`' >
- <switch test='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship[$rel-index].related-to`'>
- <outcome value='vlan-tag'>
- <block atomic="true">
- <set>
- <parameter name='vlan-tag-id' value='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value`' />
- </set>
- <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <for index='rel-index' start='0' end='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship_length`' >
+ <switch test='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship[$rel-index].related-to`'>
+ <outcome value='vlan-tag'>
+ <block atomic="true">
+ <set>
+ <parameter name='vlan-tag-id' value='`$tmp.AnAI-data.get-networks.results[0].l3-network.relationship-list.relationship[$rel-index].relationship-data[0].relationship-value`' />
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vlan-tag"
key="vlan-tag.vlan-tag-id = $vlan-tag-id"
pfx='aai.vlan-tag' local-only='false'
>
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error getting vlan-tag object from AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='success'>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error getting vlan-tag object from AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='success'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.vlan-interface'
value='`$aai.vlan-tag.vlan-tag-id`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.upper-tag-id'
value='`$aai.vlan-tag.vlan-id-outer`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.lower-tag-id'
value='`$aai.vlan-tag.vlan-id-inner`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network[$rn-index].vlan-tags.is-private'
value='`$aai.vlan-tag.is-private`' />
- </set>
- </outcome>
- </get-resource>
- <break/>
- </block>
+ </set>
</outcome>
- </switch>
- </for>
- </block>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network_length'
- value='`$rn-index + 1`' />
- </set>
- </block>
- </outcome>
- </get-resource>
+ </get-resource>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ </block>
+ </for>
<set>
- <parameter name='network-index' value='`$network-index + 1`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].related-networks.related-network_length'
+ value='`$rn-index + 1`' />
</set>
</block>
</outcome>
- </switch>
- </for>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vnfa.log' />
- </execute>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'
+ </get-resource>
+ <set>
+ <parameter name='network-index' value='`$network-index + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vnfa.log' />
+ </execute>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'
value='`$network-index`' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.'
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.'
value='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.' />
- </set>
- <switch test='`$aai.cloud-region.availability-zones.availability-zone_length`'>
- <outcome value=''>
- <switch test='`$db.vf-model.avail-zone-max-count &gt; 0`'>
- <outcome value='true'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No availability zones found in AAI for cloud region '
+ </set>
+ <switch test='`$aai.cloud-region.availability-zones.availability-zone_length`'>
+ <outcome value=''>
+ <switch test='`$db.vf-model.avail-zone-max-count &gt; 0`'>
+ <outcome value='true'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No availability zones found in AAI for cloud region '
+ $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
- </return>
- </block>
- </outcome>
- <outcome value='false'>
- <set>
- <parameter name='aai.cloud-region.availability-zones.availability-zone_length' value='0' />
- </set>
- </outcome>
- </switch>
- </outcome>
- </switch>
- <for index='idx' start='0' end='`$aai.cloud-region.availability-zones.availability-zone_length`' >
- <block atomic="true">
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[$idx]'
+ </return>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <set>
+ <parameter name='aai.cloud-region.availability-zones.availability-zone_length' value='0' />
+ </set>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <for index='idx' start='0' end='`$aai.cloud-region.availability-zones.availability-zone_length`' >
+ <block atomic="true">
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[$idx]'
value='`$aai.cloud-region.availability-zones.availability-zone[$idx].availability-zone-name`' />
- </set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf:relationship-list"
key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="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="`$vnf-topology-operation-input.vnf-request-input.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="`$aai.cloud-region.availability-zones.availability-zone[$idx].availability-zone-name`" />
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating generic-vnf in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
- </return>
- </block>
- </outcome>
- </save>
+ <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="`$vnf-topology-operation-input.vnf-request-input.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="`$aai.cloud-region.availability-zones.availability-zone[$idx].availability-zone-name`" />
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating generic-vnf in AAI" />
+ </return>
</block>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.max-count'
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.max-count'
value='`$db.vf-model.avail-zone-max-count`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length'
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length'
value='`$aai.cloud-region.availability-zones.availability-zone_length`' />
- </set>
- <for index='vnf-nw-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <for index='vnf-nw-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf:relationship-list"
key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-nw-index].network-id`" />
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating generic-vnf in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
- </return>
- </block>
- </outcome>
- </save>
+ <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="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-nw-index].network-id`" />
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating generic-vnf in AAI" />
+ </return>
</block>
- </for>
- <set>
- <parameter name='vnf-object-path'
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </for>
+ <set>
+ <parameter name='vnf-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vnf-topology-operation-input.service-information.service-instance-id
+ '/service-data/vnfs/vnf/'
+ $service-data.vnfs.vnf[$vnf-index].vnf-id
+ '/vnf-data/vnf-topology/'`"/>
- <parameter name='service-object-path'
+ <parameter name='service-object-path'
value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vnf-topology-operation-input.service-information.service-instance-id
+ '/service-data/service-topology/'`"/>
- </set>
- <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf"
key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="vnf-name" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name`" />
- <parameter name="prov-status" value="PREPROV" />
- <!-- <parameter name="operational-status" value="out-of-service-path" /> -->
- <parameter name="equipment-role" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`" />
- <parameter name="model-invariant-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid`" />
- <parameter name="model-version-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid`" />
- <parameter name="model-customization-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`" />
- <parameter name="in-maint" value="true" />
- <parameter name="selflink" value="`$vnf-object-path`" />
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating selflink in generic-vnf in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
- </return>
- </block>
- </outcome>
- </update>
- <for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >
- <block atomic="true">
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ <parameter name="vnf-name" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name`" />
+ <parameter name="prov-status" value="PREPROV" />
+ <!-- <parameter name="operational-status" value="out-of-service-path" /> -->
+ <parameter name="equipment-role" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`" />
+ <parameter name="model-invariant-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid`" />
+ <parameter name="model-version-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid`" />
+ <parameter name="model-customization-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`" />
+ <parameter name="in-maint" value="true" />
+ <parameter name="selflink" value="`$vnf-object-path`" />
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating selflink in generic-vnf in AAI" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <for silentFailure='true' index='inst-group-index' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids_length`' >
+ <block atomic="true">
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="generic-vnf:relationship-list"
key="generic-vnf.vnf-id = $vnf-topology-operation-input.vnf-information.vnf-id"
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="instance-group" />
- <parameter name="relationship-list.relationship[0].related-link"
+ <parameter name="relationship-list.relationship[0].related-to" value="instance-group" />
+ <parameter name="relationship-list.relationship[0].related-link"
value="`'/aai/v$/network/instance-groups/instance-group/'
+ $vnf-topology-operation-input.vnf-request-input.vnf-network-instance-group-ids[$inst-group-index].vnf-network-instance-group-id`" />
- <outcome value='failure'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error updating relationship in generic-vnf in AAI" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
- <block atomic="true">
- <set>
- <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
- <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
- <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
- </set>
- <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
- </block>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
- </return>
- </block>
- </outcome>
- </save>
+ <outcome value='failure'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating relationship in generic-vnf in AAI" />
+ </return>
</block>
- </for>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />
- </set>
- <set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='/var/tmp/bgb-vnf.log' />
- </execute>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </block>
- </outcome>
- </switch>
- </outcome>
- </switch>
- </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <block atomic="true">
+ <set>
+ <parameter name='naming-policy-generate-name-input.naming-type' value='VNF' />
+ <parameter name='naming-policy-generate-name-input.context-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
+ <parameter name='naming-policy-generate-name-input.action' value='DELETE' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='naming-policy-generate-name' mode='sync' ></call>
+ </block>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
+ </return>
+ </block>
+ </outcome>
+ </save>
+ </block>
+ </for>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/bgb-vnf.log' />
+ </execute>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </switch>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-changeassign.xml
index 60634ade..d93f9689 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,26 +42,19 @@
</return>
</outcome>
</switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>
- <outcome value='true'>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-changeassign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
- </return>
- </outcome>
- <outcome value='success'>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </outcome>
- </call>
- </outcome>
- <outcome value='Other'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
+ <outcome value='false'>
<block atomic="true">
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vf-module-information.onap-model-information.model-customization-uuid is a required input" />
+ </return>
+ </outcome>
+ </switch>
<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
key='SELECT * from VF_MODEL WHERE customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'
pfx='db.vf-model'>
@@ -98,6 +91,23 @@
<return status='success'></return>
</block>
</outcome>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-changeassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error performing changeassign for self-serve resources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </outcome>
+ </call>
+ </outcome>
</switch>
</block>
</method>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
index b3ea3447..1b3ff069 100755
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-unassign.xml
@@ -57,25 +57,9 @@
</return>
</outcome>
</switch>
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.sdnc-generated-cloud-resources`'>
- <outcome value='true'>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='error-code' value='500' />
- <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
- </return>
- </outcome>
- <outcome value='success'>
- <return status='success'>
- <parameter name="ack-final-indicator" value="Y" />
- <parameter name="error-code" value="200" />
- <parameter name="error-message" value="`$error-message`" />
- </return>
- </outcome>
- </call>
- </outcome>
- <outcome value='Other'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-forking-logic' mode='sync' ></call>
+ <switch test="`$ss.self-serve-flag`">
+ <outcome value='false'>
<block atomic="true">
<switch test='`$service-data.vnfs.vnf_length`'>
<outcome value='1'>
@@ -113,6 +97,23 @@
</return>
</block>
</outcome>
+ <outcome value='true'>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vnf-unassign' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error while unassigning self-serve resources with error: '+ $error-message`" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <return status='success'>
+ <parameter name="ack-final-indicator" value="Y" />
+ <parameter name="error-code" value="200" />
+ <parameter name="error-message" value="`$error-message`" />
+ </return>
+ </outcome>
+ </call>
+ </outcome>
</switch>
</block>
</method>