blob: 543b9f5cad88e564e285e2eabe202391e45e5d87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<service-logic
xmlns='http://www.onap.org/sdnc/svclogic'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
<method rpc='self-serve-vfmodule-changeassign' mode='sync'>
<block atomic="true">
<switch test='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`'>
<outcome value=''>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="no param name/value provided in vf-module-request-input" />
</return>
</outcome>
</switch>
<for index='i' start='0' end='`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`' >
<switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length == ''`">
<outcome value='false'>
<block atomic='true'>
<set>
<parameter name='ss.input.param.found.in.service.param' value='false' />
</set>
<for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$j].name == $vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param[$i].name`'>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[$j].resource-resolution-data.status`' value='PENDING'/>
<parameter name='ss.input.param.index' value='`$i`' />
<parameter name='ss.service-data.param.index' value='`$j`' />
<parameter name='ss.input.param.found.in.service.param' value='true' />
<parameter name='ss.capability-type' value='vf-module' />
<parameter name='ss.capability-action' value='changeassign' />
</set>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-generate-name-changeassign' mode='sync' >
<outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Error from self-service-generate-name-changeassign" />
</return>
</outcome>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Error from self-service-generate-name-changeassign" />
</return>
</outcome>
</call>
<return status='success'></return>
</block>
</outcome>
</switch>
</for>
<switch test='`$ss.input.param.found.in.service.param`'>
<outcome value='false'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="No vf-module-request-input.vf-module-input-parameters.param[].name found in service-data." />
</return>
</outcome>
</switch>
</block>
</outcome>
</switch>
</for>
</block>
</method>
</service-logic>
|