blob: 5b00ed194d74081d7a0c42d871ef6391fae65473 (
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
<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='sdwan-get-site-param' mode='sync'>
<block atomic="true">
<for index='idx' start='0' end='`$vnf-request-input.vnf-input-parameters.param_length`' >
<block>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
<outcome value='true'>
<set>
<parameter name='prop.site.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'description'`">
<outcome value='true'>
<set>
<parameter name='prop.site.description' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
<outcome value='true'>
<set>
<parameter name='prop.site.name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'location-name'`">
<outcome value='true'>
<set>
<parameter name='prop.site.location-name' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'address'`">
<outcome value='true'>
<set>
<parameter name='prop.site.location-address' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'postcode'`">
<outcome value='true'>
<set>
<parameter name='prop.site.location-postcode' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'latitude'`">
<outcome value='true'>
<set>
<parameter name='prop.site.location-latitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'longitude'`">
<outcome value='true'>
<set>
<parameter name='prop.site.location-longitude' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'emails'`">
<outcome value='true'>
<block atomic="true">
<set>
<parameter name='prop.site.emails' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
<parameter name="original_string" value='`$prop.site.emails`'/>
<parameter name="regex" value=","/>
<parameter name="ctx_memory_result_key" value="prop.site.email"/>
</execute>
</block>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`">
<outcome value='true'>
<block>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].value`">
<outcome value=''>
<block></block>
</outcome>
<outcome value='Other'>
<set>
<parameter name='prop.site.type' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
<parameter name='prop.site.sdwan' value='true' />
</set>
</outcome>
</switch>
</block>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'role'`">
<outcome value='true'>
<block atomic="true">
<set>
<parameter name='prop.site.role' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
<parameter name="original_string" value='`$prop.site.role`'/>
<parameter name="regex" value=","/>
<parameter name="ctx_memory_result_key" value="prop.site.roles"/>
</execute>
</block>
</outcome>
</switch>
<switch test="`$vnf-request-input.vnf-input-parameters.param[$idx].name == 'controlPoint'`">
<outcome value='true'>
<block atomic="true">
<set>
<parameter name='prop.site.controlPoint' value='`$vnf-request-input.vnf-input-parameters.param[$idx].value`' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
<parameter name="original_string" value='`$prop.site.controlPoint`'/>
<parameter name="regex" value=","/>
<parameter name="ctx_memory_result_key" value="prop.site.controlpoints"/>
</execute>
</block>
</outcome>
</switch>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />
<parameter name="error-code" value="200" />
<parameter name="error-message" value="`$error-message`" />
</return>
</block>
</for>
</block>
</method>
</service-logic>
|