aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-get-vf-module-site-param.xml
blob: 3317c6c1615aa0b9f077c9f1b62dad6393d522d3 (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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<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-vf-module-site-param' mode='sync'>
        <block atomic="true">
            <for index="idx" start="0" end="`$vf-module-topology-operation-input.vf-module-request-input.vf-module-input-parameters.param_length`">
                <block>
                    <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
                        <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic2.log"/>
                        <parameter name="field1" value="__TIMESTAMP__"/>
                        <parameter name="field2" value="'vf-module-site-params'"/>
                        <parameter name="field3" value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].name`'/>
                    </record>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'name'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.name' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'description'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.description' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'name'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.name' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'location-name'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.location-name' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'address'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.location-address' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'postcode'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.location-postcode' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'latitude'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.location-latitude' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'longitude'`">
                        <outcome value='true'>
                            <set>
                                <parameter name='prop.site.location-longitude' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'emails'`">
                        <outcome value='true'>
                            <block atomic="true">
                                <set>
                                    <parameter name='prop.site.emails' value='`$vf-module-request-input.vf-module-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="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'type'`">
                        <outcome value='true'>
                            <block>
                                <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`">
                                    <outcome value=''>
                                        <block></block>
                                    </outcome>
                                    <outcome value='Other'>
                                        <set>
                                            <parameter name='prop.site.type' value='`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`' />
                                            <parameter name='prop.site.sdwan' value='true' />
                                        </set>
                                    </outcome>
                                </switch>
                            </block>
                        </outcome>
                    </switch>
                    <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'role'`">
                        <outcome value='true'>
                            <block atomic="true">
                                <set>
                                    <parameter name='prop.site.role' value='`$vf-module-request-input.vf-module-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="`$vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'controlPoint'`">
                        <outcome value='true'>
                            <block>
                                <switch test="`$vf-module-request-input.vf-module-input-parameters.param[$idx].value`">
                                    <outcome value=''>
                                        <block></block>
                                    </outcome>
                                    <outcome value='Other'>
                                        <block atomic="true">
                                            <set>
                                                <parameter name='prop.site.controlPoint' value='`$vf-module-request-input.vf-module-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>
                            </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>