blob: 49735fdc651bc26f16c2d089191f27d9c0180ea2 (
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
<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='validate-network-input' mode='sync'>
<block atomic="true"><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="sdnc-request-header.svc-action is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.sdnc-request-header.svc-request-id`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="sdnc-request-header.svc-request-id is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.request-information.request-action`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="request-information.request-action is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.service-instance-id`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="service-information.service-instance-id is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>
<outcome value='assign'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
<outcome value='CreateNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
<outcome value=''><return status='success'>
<parameter name='' value='' />
</return></outcome><outcome value='Other'><block>
<switch test='`$service-data.networks.network_length`'>
<outcome value=''>
<record plugin="com.att.sdnctl.sli.recording.Slf4jRecorder">
<parameter name="logger" value="message-log"/>
<parameter name="field1" value="__TIMESTAMP__"/>
<parameter name="field2" value="GENERIC-RESOURCE-API.validate-network-input"/>
<parameter name="field3" value="`$network-topology-operation-input.sdnc-request-header.svc-request-id`"/>
<parameter name="field4" value="Network id proveded but no network exists that matches"/>
<parameter name="field5" value="`$network-topology-operation-input.network-information.network-id`"/>
</record></outcome><outcome value='Other'>
<block atomic="true"><for index='nidx' start='0' end='`$service-data.networks.network_length`' >
<switch test="`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`">
<outcome value='true'>
<block atomic="true"><set>
<parameter name='tmp.nidx' value='`$nidx`' />
<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />
</set></block></outcome></switch></for><switch test="`$tmp.nidx`">
<outcome value=''>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
</return></outcome></switch></block></outcome></switch></block></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-invariant-uuid`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-information.ecomp-model-information.model-invariant-uuid is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-information.ecomp-model-information.model-customization-uuid is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-uuid`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-information.ecomp-model-information.model-uuid is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.tenant`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-request-input.tenant is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.aic-cloud-region`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>
<outcome value=''><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
pfx='service-model'><outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
and service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
pfx='network-model'>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource></block></outcome><outcome value='Other'><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
pfx='service-model'>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
and service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
pfx='network-model'>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource></block></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=assign" />
</return></outcome></switch></block></outcome><outcome value='activate'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
<outcome value='CreateNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="service-information.network-information.network-id is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-invariant-uuid`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-information.ecomp-model-information.model-invariant-uuid is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-information.ecomp-model-information.model-customization-uuid is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-information.ecomp-model-information.model-uuid`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-information.ecomp-model-information.model-uuid is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.tenant`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="network-request-input.tenant is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.network-request-input.aic-cloud-region`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="service-information.network-request-information.aic-cloud-region is a required input" />
</return></outcome></switch><switch test='`$network-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>
<outcome value=''><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
pfx='service-model'><outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
and service_uuid = $service-data.service-information.ecomp-model-information.model-uuid'
pfx='network-model'>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource></block></outcome><outcome value='Other'><block atomic="true"><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from SERVICE_MODEL WHERE service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
pfx='service-model'>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No service model found for service UUID ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource><get-resource plugin='org.onap.ccsdk.sli.adaptors.sli.resource.sql.SqlResource' resource='SQL'
key='SELECT * from NETWORK_MODEL WHERE customization_uuid = $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid
and service_uuid = $network-topology-operation-input.service-information.ecomp-model-information.model-uuid'
pfx='network-model'>
<outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome><outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="`'No network model found for customization UUID '
+ $network-topology-operation-input.network-information.ecomp-model-information.model-customization-uuid +
' and model-uuid ' + $network-topology-operation-input.service-information.ecomp-model-information.model-uuid`" />
</return></outcome></get-resource></block></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="request-information.request-action is required to be CreateNetworkInstance for svc-action=activate" />
</return></outcome></switch></block></outcome><outcome value='deactivate'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
<outcome value='DeleteNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="service-information.network-information.network-id is a required input" />
</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="request-information.request-action is required to be DeleteNetworkInstance for svc-action=deactivate" />
</return></outcome></switch></block></outcome><outcome value='unassign'><block atomic="true"><switch test='`$network-topology-operation-input.request-information.request-action`'>
<outcome value='DeleteNetworkInstance'><block atomic="true"><switch test='`$network-topology-operation-input.network-information.network-id`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="service-information.network-information.network-id is a required input" />
</return></outcome></switch></block></outcome><outcome value='Other'><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="request-information.request-action is required to be DeleteNetworkInstance for svc-action=unassign" />
</return></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></method></service-logic>
|