blob: 70fbf6a074230af51f16c388bae00743acbd9323 (
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
|
<!--
============LICENSE_START=======================================================
openECOMP : SDN-C
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights
reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END=========================================================
-->
<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='VNF-API' version='${project.version}'><method rpc="network-topology-assign" mode="sync"><block atomic="true"><switch test="`$network-topology-operation-input.service-information.service-type`"><outcome value=''><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value='service-type, aka AnAI subscription-service-type, is required.'/></return></outcome></switch><switch test="`$network-topology-operation-input.service-information.subscriber-name`"><outcome value=''><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value='subscriber-name, aka AnAI global-customer-id, is required.'/></return></outcome></switch><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-name = $network-topology-operation-input.network-request-information.network-name"
local-only="false"
pfx="tmp.AnAI.l3network.existed">
<outcome value='failure'>
<return status='failure'>
<parameter name='error-code' value='500' />
<parameter name='error-message' value="`'An error occurred while querying whether l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already exists in AnAI'`"/>
</return></outcome><outcome value='success'>
<return status='failure'>
<parameter name='error-code' value='500' />
<parameter name='error-message' value="`'A l3-network with network-name = ' + $network-topology-operation-input.network-request-information.network-name + ' already existed in AnAI with network-id = ' + $tmp.AnAI.l3network.existed.network-id`" />
</return></outcome></get-resource><set>
<parameter name="tmp.error-message" value=""/></set><call module="VNF-API" rpc="generate-l3network-network-id" mode="sync" >
<outcome value='failure'>
<return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value='Error in generating l3-network.network-id in SDNC'/></return></outcome></call><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
<!-- Create l3-network object -->
<parameter name="network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
<parameter name="network-name" value="`$network-topology-operation-input.network-request-information.network-name`" />
<parameter name="network-type" value="`$network-topology-operation-input.network-request-information.network-type`" />
<parameter name="network-role" value="`$preload-data.network-topology-information.network-topology-identifier.network-role`" />
<parameter name="network-technology" value="`$preload-data.network-topology-information.network-topology-identifier.network-technology`" />
<parameter name="service-id" value="`$network-topology-operation-input.service-information.service-id`" />
<parameter name="tenant-id" value="`$network-topology-operation-input.network-request-information.tenant`" />
<parameter name="network-role-instance" value="0" />
<parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
<return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></return></outcome><outcome value='not-found'>
<return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Failed to save l3-netework in AnAI with network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></return></outcome></save><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
<parameter name="physical-network-name" value="`$preload-data.network-topology-information.provider-network-information.physical-network-name`" />
<parameter name="is-provider-network" value="`$preload-data.network-topology-information.provider-network-information.is-provider-network`" />
<parameter name="is-shared-network" value="`$preload-data.network-topology-information.provider-network-information.is-shared-network`" />
<parameter name="is-external-network" value="`$preload-data.network-topology-information.provider-network-information.is-external-network`" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while updating l3-network with provider-network-information in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></update><for index="i" start="0" end="`$preload-data.network-topology-information.subnets_length`">
<block atomic='true'><switch test="`$preload-data.network-topology-information.subnets[$i].dhcp-enabled`"><outcome value='Y'><set>
<parameter name="tmp.dhcpEnabled.boolean" value="true" />
</set></outcome><outcome value='N'><set>
<parameter name="tmp.dhcpEnabled.boolean" value="false" />
</set></outcome></switch><set>
<parameter name="tmp.gateway-address" value="`$preload-data.network-topology-information.subnets[$i].gateway-address`" />
</set><switch test="`$preload-data.network-topology-information.subnets[$i].gateway-address`"><outcome value=''><block atomic='true'><execute plugin="org.onap.ccsdk.sli.plugins.ipaddresstools.IpAddressTool" method="getGatewayAddress">
<parameter name="ipAddress" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
<parameter name="ipVersion" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
<parameter name="subnet" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
<parameter name="ctxVariable" value="tmp.return.generate.gateway-address" /></execute><set>
<parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
</set></block></outcome></switch><set>
<parameter name="tmp.local.network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
</set><call module="VNF-API" rpc="generate-subnets-subnet-id" mode="sync" >
<outcome value='failure'>
<block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></outcome></call><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="subnet"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid
AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid" >
<!-- Create l3-network object -->
<parameter name="network-id" value="`$tmp.return.generate-l3network-network-id.uuid`" />
<parameter name="subnet-id" value="`$tmp.return.generate-subnets-subnet-id.uuid`" />
<parameter name="subnet-name" value="`$preload-data.network-topology-information.subnets[$i].subnet-name`" />
<parameter name="gateway-address" value="`$tmp.gateway-address`" />
<parameter name="network-start-address" value="`$preload-data.network-topology-information.subnets[$i].start-address`" />
<parameter name="cidr-mask" value="`$preload-data.network-topology-information.subnets[$i].cidr-mask`" />
<parameter name="ip-version" value="`$preload-data.network-topology-information.subnets[$i].ip-version`" />
<parameter name="dhcp-start" value="`$preload-data.network-topology-information.subnets[$i].dhcp-start-address`" />
<parameter name="dhcp-end" value="`$preload-data.network-topology-information.subnets[$i].dhcp-end-address`" />
<parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`" />
<parameter name="orchestration-status" value="pending-create" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving l3-newtork.subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></block></for><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network:relationship-list"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
force="true"
local-only="false">
<!-- create relationship-list -->
<parameter name="relationship-list.relationship[0].related-to" value="tenant" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="Rackspace" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-information.aic-cloud-region`" />
<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="tenant.tenant-id" />
<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$network-topology-operation-input.network-request-information.tenant`" />
<parameter name="relationship-list.relationship[1].related-to" value="cloud-region" />
<parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
<parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="Rackspace" />
<parameter name="relationship-list.relationship[1].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
<parameter name="relationship-list.relationship[1].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-information.aic-cloud-region`" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving tenant and clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving tenant and clould-region relationship for l3-network in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save><switch test="`$preload-data.network-topology-information.vpn-bindings_length`"><outcome value=''><set>
<parameter name="preload-data.network-topology-information.vpn-bindings_length" value="0" />
</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.vpn-bindings_length`">
<block atomic='true'><set>
<parameter name="tmp.vpn-binding-id" value="" />
</set><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`"><outcome value='Other'>
<set>
<parameter name="tmp.vpn-binding-id" value="`$preload-data.network-topology-information.vpn-bindings[$i].vpn-binding-id`" />
</set></outcome></switch><switch test="`$preload-data.network-topology-information.vpn-bindings[$i].global-route-target != ''`" ><outcome value='true'>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="vpn-binding"
key="vpn-binding.global-route-target = $preload-data.network-topology-information.vpn-bindings[$i].global-route-target"
local-only="false"
pfx="tmp.AnAI.vpn-binding"><outcome value='success'>
<switch test="`$tmp.AnAI.vpn-binding.vpn-id`" ><outcome value='Other'>
<set>
<parameter name="tmp.vpn-binding-id" value="`$tmp.AnAI.vpn-binding.vpn-id`" />
</set></outcome><outcome value=''>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target + '. It is likely that the same global-route-target points to more than one vpn-binding objects in AnAI.'`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></switch></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where global-route-target = ' + $preload-data.network-topology-information.vpn-bindings[$i].global-route-target`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></get-resource></outcome></switch><switch test="`$tmp.vpn-binding-id != ''`"><outcome value='true'>
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network:relationship-list"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"
force="true"
local-only="false">
<parameter name="relationship-list.relationship[0].related-to" value="vpn-binding" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="vpn-binding.vpn-id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.vpn-binding-id`" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='success'>
<set>
<parameter name="tmp.is-bound-to-vpn" value="true" />
</set></outcome></save></outcome></switch></block></for><switch test="`$preload-data.network-topology-information.network-policy_length`"><outcome value=''><set>
<parameter name='preload-data.network-topology-information.network-policy_length' value='0' />
</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.network-policy_length`">
<switch test="`$preload-data.network-topology-information.network-policy[$i].network-policy-fqdn != ''`"><outcome value='true'>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="network-policy"
key="network-policy.network-policy-fqdn = $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn"
local-only="false"
pfx="tmp.AnAI.network-policy"><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='success'>
<switch test="`$tmp.AnAI.network-policy.network-policy-id`" ><outcome value=''>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query newtork-policy from AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn + '. It is likely that the same network-policy-fqdn points to more than one network-policy objects in AnAI.'`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='Other'>
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network:relationship-list"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
<parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.network-policy.network-policy-id`" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></outcome></switch></outcome></get-resource></outcome></switch></for><switch test="`$preload-data.network-topology-information.route-table-reference_length`"><outcome value=''><set>
<parameter name='preload-data.network-topology-information.route-table-reference_length' value='0' />
</set></outcome></switch><for index="i" start="0" end="`$preload-data.network-topology-information.route-table-reference_length`">
<switch test="`$preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn != ''`"><outcome value='true'>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="route-table-reference"
key="route-table-reference.route-table-reference-fqdn = $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn"
pfx="tmp.AnAI.route-table-reference"><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set></block></outcome><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.network-topology-information.network-policy[$i].network-policy-fqdn`"/></set></block></outcome><outcome value='success'>
<switch test="`$tmp.AnAI.route-table-referencey.route-table-reference-id`" ><outcome value=''>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'Failed to query route-table-reference from AnAI where route-table-reference-fqdn = ' + $preload-data.network-topology-information.route-table-reference[$i].route-table-reference-fqdn + '. It is likely that the same route-table-reference-fqdn points to more than one route-table-reference objects in AnAI.'`"/></set></block></outcome><outcome value='Other'>
<save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network:relationship-list"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
<parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.route-table-reference.route-table-reference-id`" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save></outcome></switch></outcome></get-resource></outcome></switch></for><switch test="`$tmp.is-bound-to-vpn`"><outcome value="true"><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
<parameter name="is-bound-to-vpn" value="true" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></update></outcome></switch><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network:relationship-list"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid" >
<parameter name="relationship-list.relationship[0].related-to" value="service-instance" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="customer.global-customer-id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$network-topology-operation-input.service-information.subscriber-name`" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="service-subscription.service-type" />
<parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$network-topology-operation-input.service-information.service-type`" />
<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="service-instance.service-instance-id" />
<parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$network-topology-operation-input.service-information.service-instance-id`" /><outcome value='failure'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome><outcome value='not-found'>
<block atomic='true'><set>
<parameter name="error-code" value="500"/>
<parameter name="tmp.error-message" value="`'An error occurred while saving service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/></set><block atomic='true'><delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="l3-network"
key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete><return status='failure'>
<parameter name='error-code' value='500'/>
<parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/></return></block></block></outcome></save><set>
<parameter name="ack-final" value="Y"/></set><return status="success">
<parameter name="networkId" value="`$tmp.return.generate-l3network-network-id.uuid`" />
<parameter name="error-code" value="200" /></return></block></method></service-logic>
|