aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml551
1 files changed, 551 insertions, 0 deletions
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
new file mode 100644
index 00000000..6abe8274
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-vf-module-assign.xml
@@ -0,0 +1,551 @@
+<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-assign' mode='sync'>
+ <block atomic='true'>
+ <set>
+ <parameter name='is-new-vfmodule' value='true' />
+ </set>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
+ <outcome value=''>
+ <block>
+ <set>
+ <parameter name='vf-module-index' value='0' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='0'>
+ <block>
+ <set>
+ <parameter name='vf-module-index' value='0' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-module-index + 1`' />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <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'>
+ <block>
+ <set>
+ <parameter name='is-new-vfmodule' value='false' />
+ </set>
+ <set>
+ <parameter name='vf-module-index' value='`$idx`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test='`$is-new-vfmodule`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='vf-module-index' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
+ </set>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length + 1`' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ <switch test='`$is-new-vfmodule`'>
+ <outcome value='true'>
+ <block>
+ <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='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'
+ value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name'
+ value='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-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-topology-identifier.vf-module-type'
+ value='`$vf-module-topology-operation-input.vf-module-information.vf-module-type`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.tenant'
+ value='`$vf-module-topology-operation-input.vf-module-request-input.tenant`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-cloud-region'
+ value='`$vf-module-topology-operation-input.vf-module-request-input.aic-cloud-region`' />
+ <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='`$vf-module-topology-operation-input.vf-module-request-input.aic-clli`' />
+ </set>
+ <switch test='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`'>
+ <outcome value=''>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.onap-model-information.model-invariant-uuid'
+ value='`$db.vf-module-model.invariant-uuid`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.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='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.onap-model-information.model-uuid'
+ value='`$db.vf-module-model.uuid`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.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='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.onap-model-information.model-version'
+ value='`$db.vf-module-model.version`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.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='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.onap-model-information.model-name'
+ value='`$db.vf-module-model.name`' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.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='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.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='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>
+ <set>
+ <parameter name='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'
+ value='true' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='ss.capability-type' value='vf-module' />
+ </set>
+ <set>
+ <parameter name='ss.capability.execution-order[0]' value='generate-name' />
+ <parameter name='ss.capability.execution-order[1]' value='alts-entitlement-assign' />
+ <parameter name='ss.capability.execution-order[2]' value='alts-license-assign' />
+ <parameter name='ss.capability.execution-order[3]' value='vlan-tag-assign' />
+ <parameter name='ss.capability.execution-order[4]' value='eipam-ip-assign' />
+ <parameter name='ss.capability.execution-order[5]' value='eipam-create-pool"' />
+ <parameter name='ss.capability.execution-order[6]' value='mac-address-assign' />
+ <parameter name='ss.capability.execution-order[7]' value='create-vpe-pool' />
+ <parameter name='ss.capability.execution-order[8]' value='unresolved-composite-data' />
+ <parameter name='ss.capability.execution-order_length' value='9' />
+ </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=''>
+ <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.'
+ value='vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-vfmodule-ra-assignment' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to get RA assignments: ' + $error-message`" />
+ </return>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ </switch>
+ <for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >
+ <set>
+ <parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />
+ <!--
+ss.capability.execution-order
+-->
+ </set>
+ <set>
+ <parameter name='ss.capability-action' value='assign' />
+ </set>
+ <switch test='`$ss.capability-name`'>
+ <outcome value='alts-entitlement-assign'>
+ <set>
+ <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
+ </set>
+ </outcome>
+ <outcome value='alts-license-assign'>
+ <set>
+ <parameter name='ss.capability-dg' value='self-serve-alts-assignment' />
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='ss.capability-dg' value="`'self-serve-' + $ss.capability.execution-order[$cidx]`" />
+ </set>
+ </outcome>
+ </switch>
+ <for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <set>
+ <parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.capability-name`' />
+ </set>
+ <switch test='`$ss.capability-name == $tmp.param.capability-name`'>
+ <outcome value='true'>
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$pidx].resource-resolution-data.status`'>
+ <outcome value='SUCCESS'>
+ <set>
+ <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
+ </set>
+ </outcome>
+ <outcome value='PENDING'>
+ <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
+ <outcome value='success'>
+ <set>
+ <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='vf.vf-module-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />
+ <parameter name='vf.vf-module-data.sdnc-request-header.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.`' />
+ <parameter name='vf.vf-module-data.request-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.`' />
+ <parameter name='vf.vf-module-data.service-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.`' />
+ <parameter name='vf.vf-module-data.vnf-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.`' />
+ <parameter name='vf.vf-module-data.vf-module-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.`' />
+ <parameter name='vf.vf-module-data.vf-module-topology.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.`' />
+ <parameter name='vf.vf-module-data.vf-module-level-oper-status.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-input-parameters.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-input-parameters.`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.request-version'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.request-version`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-name'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-name`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.tenant'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.tenant`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.aic-cloud-region'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-cloud-region`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.aic-clli'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-clli`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-vfmodule-assignments`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{vnf-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.vnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{vf-module-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vfmodule.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vfmodule-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ss-vfmodule" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </call>
+ </outcome>
+ <outcome value='FAILED'>
+ <call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >
+ <outcome value='success'>
+ <set>
+ <parameter name='`$ss.capability-dg`' value='ASSIGNED' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='vf.vf-module-id'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`' />
+ <parameter name='vf.vf-module-data.sdnc-request-header.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.`' />
+ <parameter name='vf.vf-module-data.request-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.request-information.`' />
+ <parameter name='vf.vf-module-data.service-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.`' />
+ <parameter name='vf.vf-module-data.vnf-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.`' />
+ <parameter name='vf.vf-module-data.vf-module-information.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-information.`' />
+ <parameter name='vf.vf-module-data.vf-module-topology.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.`' />
+ <parameter name='vf.vf-module-data.vf-module-level-oper-status.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-input-parameters.'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-input-parameters.`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.request-version'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.request-version`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.vf-module-name'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.vf-module-name`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.tenant'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.tenant`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.aic-cloud-region'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-cloud-region`' />
+ <parameter name='vf.vf-module-data.vf-module-request-input.aic-clli'
+ value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.aic-clli`' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.ss-vfmodule-assignments`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.service-information.service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{vnf-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vnf-information.vnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$tmp.ss-vfmodule-url`"/>
+ <parameter name="outputPath" value="tmp.ss-vfmodule-url"/>
+ <parameter name="target" value="{vf-module-id}"/>
+ <parameter name="replacement" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vfmodule.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vfmodule-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ss-vfmodule" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic="true">
+ <set>
+ <parameter name="error-message" value="Failed to persist self-serve vf-module assignments during assign in MD-SAL" />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error from capability: '+ $ss.capability-dg + ', with error: '+ $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ </call>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ </for>
+ </for>
+ <switch test="`$self-serve-generate-name == 'ASSIGNED'`">
+ <outcome value='false'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'SS: self-serve-generate-name status: ' + $self-serve-generate-name`"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'AAI Put is being skipped because NOT all capability components have SUCCESS status; '+ $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <switch test="`$self-serve-unresolved-composite-data == 'ASSIGNED' or $self-serve-unresolved-composite-data == ''`">
+ <outcome value='false'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'SS: self-serve-unresolved-composite-data: ' + $self-serve-unresolved-composite-data`"/>
+ </record>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'AAI Put is being skipped because NOT all capability components have SUCCESS status; '+ $error-message`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='true'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.ss.nfc-naming-code' value='' />
+ <parameter name='tmp.ss.nfc-function' value='' />
+ <parameter name='tmp.ss.vnfc-name' value='' />
+ </set>
+ <for index='i' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].name`'>
+ <outcome value='vnfc-name'>
+ <!--
+<outcome value='vmxvre_name_0'>
+-->
+ <block>
+ <set>
+ <parameter name='tmp.ss.vnfc-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].value`' />
+ </set>
+ <break/>
+ </block>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.ss.vnfc-name != ''`">
+ <outcome value='true'>
+ <block atomic='true'>
+ <for index="kidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key_length`">
+ <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$kidx].name`'>
+ <outcome value='nfc-naming-code'>
+ <!--
+<outcome value='NFC_NAMING_CODE'>
+-->
+ <set>
+ <parameter name='tmp.ss.nfc-naming-code' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ <outcome value='nfc-function'>
+ <set>
+ <parameter name='tmp.ss.nfc-function' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$i].resource-resolution-data.resource-key[$kidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <switch test="`$tmp.ss.nfc-naming-code != '' and $tmp.ss.nfc-function != ''`">
+ <outcome value='true'>
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="vnfc"
+ key="vnfc.vnfc-name = $tmp.ss.vnfc-name" >
+ <parameter name="nfc-function" value="`$tmp.ss.nfc-function`" />
+ <parameter name="nfc-naming-code" value="`$tmp.ss.nfc-naming-code`" />
+ <parameter name="orchestration-status" value="pending-create" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="Failed to save vnfc object in AAI" />
+ </return>
+ </outcome>
+ </save>
+ </outcome>
+ <outcome value='false'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'vnfc object not updated because param.value of vnfc-name is null; '+ $error-message`" />
+ </return>
+ </outcome>
+ </switch>
+ <call module='GENERIC-RESOURCE-API' rpc='self-serve-aai-vfmodule-put' mode='sync' >
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'generic-vnf and vf-module not updated; '+ $error-message`" />
+ </return>
+ </outcome>
+ </call>
+ </block>
+ </outcome>
+ <outcome value='false'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="`'SS: vnfc-name: ' + $tmp.ss.vnfc-name`"/>
+ </record>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-vf-assign.log' />
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file