aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-11-19 22:35:12 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-19 22:35:12 +0000
commit9579898dd5f39cebc4acf7399b82360a2075b4b9 (patch)
treecddb57345d50a746a31a62e48788d9937bee8717 /platform-logic/generic-resource-api/src/main/xml
parenta8bb1f4f282f8606c62483c8724c4cc009ca833a (diff)
parentb574c5a1dd81b7a5d2797c477d2787271a9ce2e5 (diff)
Merge "Fix self serve DG"
Former-commit-id: dc3a1324cdcbf8cad24c8084990ebbbb2f3b86b8
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-generate-name.xml935
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml6
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-netbox-ip-assign.xml2
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vfmodule-ra-assignment.xml2
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml2
5 files changed, 565 insertions, 382 deletions
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 94225a15..294ce772 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,430 +6,613 @@
<set>
<parameter name='tmp.naming-data-payload' value='{&quot;elements&quot;:[' />
</set>
- <call module='GENERIC-RESOURCE-API' rpc='self-serve-capability-param-resolution' mode='sync' ></call>
- <switch test="`$ss.capability-type`">
- <outcome value='vnf'>
- <switch test="`$ss.capability-action`">
- <outcome value='unassign'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
- <outcome value='true'>
- <block atomic='true'>
- <set>
- <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`' >
- <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;,'`"/>
- </set>
- </outcome>
- </switch>
- </for>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
- </set>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',}' />
- <parameter name='replacement' value='}' />
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',]' />
- <parameter name='replacement' value=']' />
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="BEFORE namegeneration.node.UnAssignNameNode"/>
- </record>
- <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>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
- </return>
- </block>
- </outcome>
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="AFTER namegeneration.node.UnAssignNameNode"/>
- </record>
- <set>
- <parameter name='pathname'
- value="`'/var/tmp/ss-gen-name-' +
- $ss.capability-type + '-' + $ss.capability-action + '-' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id + '.log'`" />
- </set>
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <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`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].name == $jsonContextPrefix.elements[$n].resource-name`'>
- <outcome value='true'>
- <set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].value`' value="`$jsonContextPrefix.elements[$n].resource-value`" />
- </set>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- </for>
- </outcome>
- <outcome value='assign'>
- <block atomic='true'>
- <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'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from capability-param-resolution" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from capability-param-resolution" />
+ </return>
+ </outcome>
+ </call>
+ <switch test="`$ss.capability-type == 'vnf'`">
+ <outcome value='true'>
+ <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`' >
<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`' >
- <set>
- <parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
- </set>
+ <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>
</for>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
</set>
+ <set>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <parameter name='target' value=',}' />
+ <parameter name='replacement' value='}' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <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" />
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
+ <parameter name="source" value="nameGenResponse.httpResponse" />
+ <parameter name="outputPath" value="jsonContextPrefix" />
+ <parameter name="isEscaped" value="false" />
+ </execute>
+ <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`' >
+ <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='true'>
+ <block>
+ <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[$l].value`' />
+ <parameter name='regex' value='\$\{' />
+ </execute>
+ <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[0] == $jsonContextPrefix.elements[$n].resource-name`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].value`' value="`$jsonContextPrefix.elements[$n].resource-value`" />
+ </set>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].resource-resolution-data.status`' value='DELETED' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </for>
+ </for>
</block>
</outcome>
</switch>
</for>
- <switch test="`$tmp.naming-data-payload == ''`">
- <outcome value='false'>
- <block atomic='true'>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',}' />
- <parameter name='replacement' value='}' />
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',]' />
- <parameter name='replacement' value=']' />
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="BEFORE namegeneration.node.AssignNameNode"/>
- </record>
- <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>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Assign" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
+ </outcome>
+ </switch>
+ <switch test="`$ss.capability-action == 'assign'`">
+ <outcome value='true'>
+ <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`' >
+ <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`' >
<set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Assign" />
- </return>
- </block>
- </outcome>
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="AFTER namegeneration.node.AssignNameNode"/>
- </record>
- <set>
- <parameter name='pathname'
- value="`'/var/tmp/ss-gen-name-' +
- $ss.capability-type + '-' + $ss.capability-action + '-' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id + '.log'`" />
- </set>
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <parameter name="source" value="nameGenResponse.response-payload" />
- <parameter name="outputPath" value="jsonContextPrefix" />
- <parameter name="isEscaped" value="false" />
- </execute>
- <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`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].name == $jsonContextPrefix.elements[$n].resource-name`'>
- <outcome value='true'>
+ </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>
+ </switch>
+ </for>
+ <switch test="`$tmp.naming-data-payload == ''`">
+ <outcome value='false'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <parameter name='target' value=',}' />
+ <parameter name='replacement' value='}' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <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" />
+ <outcome value='failure'>
+ <block>
<set>
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].value`' value="`$jsonContextPrefix.elements[$n].resource-value`" />
- <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].resource-resolution-data.status`' value='SUCCESS' />
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
</set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Assign" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$i].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Assign" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
+ <parameter name="source" value="nameGenResponse.httpResponse" />
+ <parameter name="outputPath" value="jsonContextPrefix" />
+ <parameter name="isEscaped" value="false" />
+ </execute>
+ <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`' >
+ <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='true'>
+ <block>
+ <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[$l].value`' />
+ <parameter name='regex' value='\$\{' />
+ </execute>
+ <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[0] == $jsonContextPrefix.elements[$n].resource-name`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$l].value`' value="`$jsonContextPrefix.elements[$n].resource-value`" />
+ </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>
+ </switch>
+ </block>
+ </outcome>
+ </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>
- </switch>
+ </execute>
</for>
- </for>
- </block>
- </outcome>
- </switch>
- </block>
- </outcome>
- </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
</outcome>
- <outcome value='vf-module'>
- <switch test="`$ss.capability-action`">
- <outcome value='unassign'>
- <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.capability-name == $ss.capability-name`'>
- <outcome value='true'>
- <block atomic='true'>
- <set>
- <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`' >
- <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;,'`"/>
- </set>
- </outcome>
- </switch>
- </for>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
- </set>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',}' />
- <parameter name='replacement' value='}' />
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',]' />
- <parameter name='replacement' value=']' />
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="BEFORE namegeneration.node.UnAssignNameNode"/>
- </record>
- <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>
- <parameter name='`service-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='FAILED' />
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <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[$i].resource-resolution-data.status`' value='FAILED' />
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
- </return>
- </block>
- </outcome>
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="AFTER namegeneration.node.UnAssignNameNode"/>
- </record>
- <set>
- <parameter name='pathname'
- value="`'/var/tmp/ss-gen-name-' +
- $ss.capability-type + '-' + $ss.capability-action + '-' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.vf-module-id + '.log'`" />
- </set>
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <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`' >
- <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].name == $jsonContextPrefix.elements[$n].resource-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-parameters.param[$i].value`' value="`$jsonContextPrefix.elements[$n].resource-value`" />
- </set>
- </outcome>
- </switch>
- </for>
- </block>
- </outcome>
- </switch>
- </for>
- </outcome>
- <outcome value='assign'>
- <block atomic='true'>
- <set>
- <parameter name='tmp.naming-data-payload' value='{&quot;elements&quot;:[' />
- </set>
+ </switch>
+ <switch test="`$ss.capability-type == 'vf-module'`">
+ <outcome value='true'>
+ <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`' >
<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`' >
- <set>
- <parameter name="tmp.naming-data-payload" value="`$tmp.naming-data-payload + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].name + '&quot;:' + '&quot;' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$j].value + '&quot;,'`"/>
- </set>
+ <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>
</for>
<set>
<parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + '},'`" />
</set>
+ <set>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <parameter name='target' value=',}' />
+ <parameter name='replacement' value='}' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <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" />
+ <outcome value='failure'>
+ <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[$i].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <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[$i].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Unassign" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
+ <parameter name="source" value="nameGenResponse.httpResponse" />
+ <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`' >
+ <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='true'>
+ <block>
+ <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[$l].value`' />
+ <parameter name='regex' value='\$\{' />
+ </execute>
+ <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[0] == $jsonContextPrefix.elements[$n].resource-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-parameters.param[$l].value`' value="`$jsonContextPrefix.elements[$n].resource-value`" />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </for>
+ </for>
</block>
</outcome>
</switch>
</for>
- <switch test="`$tmp.naming-data-payload == ''`">
- <outcome value='false'>
- <block atomic='true'>
- <set>
- <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
- </set>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',}' />
- <parameter name='replacement' value='}' />
- </execute>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
- <parameter name='outputPath' value='tmp.naming-data-payload' />
- <parameter name='source' value='`$tmp.naming-data-payload`' />
- <parameter name='target' value=',]' />
- <parameter name='replacement' value=']' />
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="BEFORE namegeneration.node.AssignNameNode"/>
- </record>
- <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>
- <parameter name='`service-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='FAILED' />
- </set>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Assign" />
- </return>
- </block>
- </outcome>
- <outcome value='not-found'>
- <block>
+ </outcome>
+ </switch>
+ <switch test="`$ss.capability-action == 'assign'`">
+ <outcome value='true'>
+ <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`' >
+ <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`' >
<set>
- <parameter name='`service-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='FAILED' />
+ <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>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error from NameGenerationNode Assign" />
- </return>
- </block>
- </outcome>
- </execute>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
- <parameter name="logger" value="message-log"/>
- <parameter name="field1" value="AFTER namegeneration.node.AssignNameNode"/>
- </record>
- <set>
- <parameter name='pathname'
- value="`'/var/tmp/ss-gen-name-' +
- $ss.capability-type + '-' + $ss.capability-action + '-' +
- $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.vf-module-id + '.log'`" />
- </set>
- <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
- <parameter name="source" value="nameGenResponse.response-payload" />
- <parameter name="outputPath" value="jsonContextPrefix" />
- <parameter name="isEscaped" value="false" />
- </execute>
- <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`' >
- <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[$l].name == $jsonContextPrefix.elements[$n].resource-name`'>
- <outcome value='true'>
+ </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>
+ </switch>
+ </for>
+ <switch test="`$tmp.naming-data-payload == ''`">
+ <outcome value='false'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.naming-data-payload' value="`$tmp.naming-data-payload + ']}'`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <parameter name='target' value=',}' />
+ <parameter name='replacement' value='}' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace'>
+ <parameter name='outputPath' value='tmp.naming-data-payload' />
+ <parameter name='source' value='`$tmp.naming-data-payload`' />
+ <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" />
+ <outcome value='failure'>
+ <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].value`' value="`$jsonContextPrefix.elements[$n].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[$l].resource-resolution-data.status`' value='SUCCESS' />
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.status`' value='FAILED' />
</set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Assign" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <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[$i].resource-resolution-data.status`' value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error from NameGenerationNode Assign" />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils" method="jsonStringToCtx">
+ <parameter name="source" value="nameGenResponse.httpResponse" />
+ <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 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[$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>
- </block>
- </outcome>
- </switch>
- </block>
- </outcome>
- </switch>
+ <for index='n' start='0' end='`$jsonContextPrefix.elements_length`' >
+ <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <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='true'>
+ <block>
+ <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[$l].value`' />
+ <parameter name='regex' value='\$\{' />
+ </execute>
+ <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[0] == $jsonContextPrefix.elements[$n].resource-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-parameters.param[$l].value`' value="`$jsonContextPrefix.elements[$n].resource-value`" />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </execute>
+ </for>
+ </for>
+ <for index='l' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='contains' emitsOutcome='true' >
+ <parameter name="source" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].value`" />
+ <parameter name="target" value="$"/>
+ <outcome value='false'>
+ <block>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].resource-resolution-data.capability-name`' value='INPUT' />
+ </set>
+ <set>
+ <parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$l].resource-resolution-data.status`' value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
</outcome>
</switch>
- <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
- <parameter name='filename' value='`$pathname`' />
- </execute>
</block>
</method>
</service-logic> \ No newline at end of file
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml
index 7d9c358f..60c749ae 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-mS-mac-address-assign.xml
@@ -86,7 +86,7 @@
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="self-serve-mS-mac-address-assign: call self-service-capability-param-resolution DG"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: call self-serve-capability-param-resolution DG"/>
</record>
<set>
<!--<parameter name='name' value='value' />-->
@@ -97,11 +97,11 @@
<record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="self-serve-mS-mac-address-assign: Failure calling self-service-capability-param-resolution"/>
+ <parameter name="field2" value="self-serve-mS-mac-address-assign: Failure calling self-serve-capability-param-resolution"/>
</record>
<return status='failure'>
<parameter name='error-code' value='402' />
- <parameter name='error-message' value='Failure calling self-service-capability-param-resolution' />
+ <parameter name='error-message' value='Failure calling self-serve-capability-param-resolution' />
</return>
</block>
</outcome>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-netbox-ip-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-netbox-ip-assign.xml
index adbe98d8..3d9d0bb9 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-netbox-ip-assign.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-netbox-ip-assign.xml
@@ -21,7 +21,7 @@
</return>
</outcome>
</switch>
- <call module='GENERIC-RESOURCE-API' rpc='self-service-capability-param-resolution' mode='sync' >
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-capability-param-resolution' mode='sync' >
<outcome value='failure'>
<return status="failure">
<parameter name="ack-final" value="Y" />
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 c1bbe225..56a52ff4 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
@@ -125,7 +125,7 @@
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="BEFORE ConfigAssignmentNode"/>
</record>
- <execute plugin='org.onap.ccsdk.config.assignment.service.ConfigAssignmentNode' method='process'>
+ <execute plugin='org.onap.ccsdk.features.assignment.service.ConfigAssignmentNode' method='process'>
<parameter name="request-id" value='`$request-id`' />
<parameter name="resource-id" value='`$resource-id`' />
<parameter name="resource-type" value='`$resource-type`' />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vnf-ra-assignment.xml
index 54549b69..c4f52fca 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
@@ -100,7 +100,7 @@
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="BEFORE ConfigAssignmentNode"/>
</record>
- <execute plugin='org.onap.ccsdk.config.assignment.service.ConfigAssignmentNode' method='process'>
+ <execute plugin='org.onap.ccsdk.features.assignment.service.ConfigAssignmentNode' method='process'>
<parameter name="request-id" value='`$request-id`' />
<parameter name="resource-id" value='`$resource-id`' />
<parameter name="resource-type" value='`$resource-type`' />