blob: 16da1bb7ac9fa28e4febe34744f1befedd924235 (
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-vnf-changeassign' mode='sync'>
<block atomic='true'>
<switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-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 vnf-request-input" />
</return>
</outcome>
</switch>
<for index='i' start='0' end='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`' >
<switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length == ''`">
<outcome value='false'>
<block atomic='true'>
<set>
<parameter name='ss.input.param.found.in.service.param' value='false' />
</set>
<for index='j' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$j].name == $vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$i].name`'>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='`service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$j].resource-resolution-data.status`' value='PENDING'/>
<parameter name='ss.input.param.index' value='`$i`' />
<parameter name='ss.service-data.param.index' value='`$j`' />
<parameter name='ss.input.param.found.in.service.param' value='true' />
<parameter name='ss.capability-type' value='vnf' />
<parameter name='ss.capability-action' value='changeassign' />
</set>
<call module='GENERIC-RESOURCE-API' rpc='self-serve-generate-name-changeassign' mode='sync' >
<outcome value='failure'>
<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 vnf-request-input.vnf-input-parameters.param[].name found in service-data." />
</return>
</outcome>
</switch>
</block>
</outcome>
</switch>
</for>
</block>
</method>
</service-logic>
|