aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vnf-topology-operation-assign.xml
blob: 27419ac37e0e64093ecdd79b4a53fd7a68d11482 (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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<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='vnf-topology-operation-assign' mode='sync'>
<block atomic="true"><switch test='`$vnf-topology-operation-input.request-information.request-action`'>
<outcome value='CreateVnfInstance'>
<block>
</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="If svc-action is 'assign' then request-action must be 'CreateVnfInstance'" />
</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
  key='SELECT * from VF_MODEL WHERE customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'
  pfx='db.vf-model'>

<outcome value='failure'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="Error reading VF_MODEL table" />
</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="`'No model found for VNF customization UUID ' + $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`" />
</return></outcome></get-resource><switch test='`$service-data.vnfs.vnf_length`'>
<outcome value=''>
<set>
<parameter name='vnf-index' value='0' />
</set></outcome><outcome value='Other'>
<block>
<set>
<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />
</set><for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>
<outcome value='true'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id
      + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`" />
</return></outcome></switch></for></block></outcome></switch><set>
<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
</set><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id'
 value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type'
 value='`$vnf-topology-operation-input.vnf-information.vnf-type`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type'
 value='`$db.vf-model.nf-type`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role'
 value='`$db.vf-model.nf-role`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function'
 value='`$db.vf-model.nf-function`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code'
 value='`$db.vf-model.nf-code`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.tenant'
 value='`$vnf-topology-operation-input.vnf-request-input.tenant`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-cloud-region'
 value='`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`' />
 
</set><switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>
<outcome value=''><block atomic="true"><switch test='`$db.vf-model.ecomp-generated-naming`'>
<outcome value='Y'><block>
</block></outcome><outcome value='N'><return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="No vnf-name was received but ecomp-generated-naming is not Y" />
</return></outcome><outcome value='Other'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="No vnf-name was received but ecomp-generated-naming is not Y" />
</return></outcome></switch><set>
<parameter name='generate-unique-name-input.index-table-name' value='VNF_NAME_INDEX' />
<parameter name='generate-unique-name-input.index-table-prefix-column' value='vnf_name_prefix' />
<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />
<parameter name='generate-unique-name-input.prefix' value="`'z' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + $db.vf-model.nf-code`" />
<parameter name='generate-unique-name-input.index-length' value='2' />
</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' 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="`$generate-unique-name-output.error-message`" />
</return></outcome><outcome value='success'>
<set>
<parameter name='tmp.vnf-name' value='`$generate-unique-name-output.generated-name`' />
</set></outcome></call></block></outcome><outcome value='Other'>
<block atomic="true"><set>
<parameter name='generate-unique-name-input.name-table-type' value='VNF_INSTANCE' />
<parameter name='generate-unique-name-input.supplied-name' value='`$vnf-topology-operation-input.vnf-request-input.vnf-name`' />
</set><call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' 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="`$generate-unique-name-output.error-message`" />
</return></outcome><outcome value='success'>
<set>
<parameter name='tmp.vnf-name' value="`$vnf-topology-operation-input.vnf-request-input.vnf-name`" />
</set></outcome></call></block></outcome></switch><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id'
   value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />
</set><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name'
   value='`$tmp.vnf-name`' />
</set><switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`'>
<outcome value=''><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'
  value='`$db.vf-model.invariant-uuid`' />
</set></outcome><outcome value='Other'>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid'
  value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />
</set></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`'>
<outcome value=''><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'
  value='`$db.vf-model.uuid`' />
</set></outcome><outcome value='Other'>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid'
  value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />
</set></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`'>
<outcome value=''><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'
  value='`$db.vf-model.version`' />
</set></outcome><outcome value='Other'>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-version'
  value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-version`' />
</set></outcome></switch><switch test='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`'>
<outcome value=''><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'
  value='`$db.vf-model.name`' />
</set></outcome><outcome value='Other'>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-name'
  value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-name`' />
</set></outcome></switch><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid'
  value='`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
</set><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
		resource="cloud-region" 
		key="cloud-region.cloud-owner = 'CloudOwner' AND 
		     cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND
		     depth='0'"
        pfx='aai.cloud-region' local-only='false' >

<outcome value='not-found'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="Cloud region not found in AAI" />
</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="Error retrieving cloud region from AAI" />
</return></outcome></get-resource><for index='idx' start='0' end='`$aai.cloud-region.relationship-list.relationship_length`' >
<switch test='`$aai.cloud-region.relationship-list.relationship[$idx].related-to`'>
<outcome value='complex'>
<block atomic="true"><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split'>
   <parameter name='ctx_memory_result_key' value='aai-uid-split' />
   <parameter name='original_string' value='`$aai.cloud-region.relationship-list.relationship[$idx].related-link`' />
   <parameter name='regex' value='/' />
</execute><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli'
  value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
</set><break>
</break></block></outcome></switch></for><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
		resource="availability-zones" 
		key="cloud-region.cloud-owner = 'CloudOwner' AND 
		     cloud-region.cloud-region-id = $vnf-topology-operation-input.vnf-request-input.aic-cloud-region AND
		     depth='0'"
        pfx='aai.az' local-only='false' >

<outcome value='failure'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="Error retrieving availability zones from AAI" />
</return></outcome></get-resource><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.aic-clli`'>
<outcome value=''><return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="`'Unable to find aic-clli in AAI for aic-cloud-region ' + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
</return></outcome></switch><get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'
  key='SELECT * from VF_TO_NETWORK_ROLE_MAPPING WHERE vf_customization_uuid = $vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid'
  pfx='db.vf-network-role-mapping[]'>

<outcome value='failure'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="Error reading VF_TO_NETWORK_ROLE_MAPPING table" />
</return></outcome><outcome value='not-found'>
<set>
<parameter name='db.vf-network-role-mapping_length' value='0' />
</set></outcome></get-resource><set>
<parameter name='network-index' value='0' />
</set><for index='role-index' start='0' end='`$db.vf-network-role-mapping_length`'><block atomic="true"><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
		resource="l3-networks" 
		key="l3-network.network-role = $db.vf-network-role-mapping[$role-index].network-role"
        pfx='aai.l3-network' local-only='false'
>
<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 active l3-network found in AAI with cloud_region_id '
          + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region + ' and network_role '
          + $db.vf-network-role-mapping[$network-index].network-role`" />
</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="Error retrieving l3-network from AAI" />
</return></outcome></get-resource><set>
<parameter name='l3-network-id' value='-1' />
</set><block>
<for index='db-network-index' start='0' end='`$aai.l3-network.l3-network_length`' >
<switch test='`$aai.l3-network.l3-network[$db-network-index].orchestration-status`'>
<outcome value='PendingCreate'>
<block>
</block></outcome><outcome value='Pending Create'>
<block>
</block></outcome><outcome value='PendingDelete'>
<block>
</block></outcome><outcome value='Pending Delete'>
<block>
</block></outcome><outcome value='Other'>
<for silentFailure='true' index='db-rel-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship_length`' >
<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].related-to`'>
<outcome value='cloud-region'>
<for silentFailure='true' index='db-data-index' start='0' end='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data_length`' >
<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-key`'>
<outcome value='cloud-region.cloud-region-id'>
<switch test='`$aai.l3-network.l3-network[$db-network-index].relationship-list.relationship[$db-rel-index].relationship-data[$db-data-index].relationship-value == $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`'>
<outcome value='true'>
<block atomic="true"><set>
<parameter name='l3-network-id' value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
</set><return status='failure'>
</return></block></outcome></switch></outcome></switch></for></outcome></switch></for></outcome></switch></for><return status='success'>

</return></block><switch test='`$l3-network-id`'>
<outcome value='-1'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="`'Unable to find l3-network in AAI for network role ' + $db.vf-network-role-mapping[$role-index].network-role`" />
</return></outcome></switch><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-role'
    value='`$db.vf-network-role-mapping[$role-index].network-role`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-name'
    value='`$aai.l3-network.l3-network[$db-network-index].network-name`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].neutron-id'
    value='`$aai.l3-network.l3-network[$db-network-index].neutron-network-id`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].network-id'
    value='`$aai.l3-network.l3-network[$db-network-index].network-id`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].contrail-network-fqdn'
    value='`$aai.l3-network.l3-network[$db-network-index].contrail-network-fqdn`' />
</set><for index='subnet-index' start='0' end='`$aai.l3-network.l3-network[0].subnets.subnet_length`' >
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].ip-version'
   value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].ip-version`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data[$subnet-index].subnet-id'
   value='`$aai.l3-network.l3-network[$db-network-index].subnets.subnet[$subnet-index].subnet-id`' />
</set></for><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$network-index].subnets-data.subnet-data_length'
   value='`$aai.l3-network.l3-network[0].subnets.subnet_length`' />
</set><set>
<parameter name='network-index' value='`$network-index + 1`' />
</set></block></for><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length'
  value='`$network-index`' />
</set><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.'
  value='vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.' />
</set><switch test='`$aai.az.availability-zone_length`'>
<outcome value=''><switch test='`$db.vf-model.avail-zone-max-count &gt; 0`'>
<outcome value='true'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="`'No availability zones found in AAI for cloud region '
       + $vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
</return></outcome><outcome value='false'>
<set>
<parameter name='aai.az.availability-zone_length' value='0' />
</set></outcome></switch></outcome></switch><for index='idx' start='0' end='`$aai.az.availability-zone_length`' >
<block atomic="true"><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[$idx]'
  value='`$aai.az.availability-zone[$idx].availability-zone-name`' />
</set><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
   resource="generic-vnf:relationship-list"
   key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
   force="true" pfx="tmp.AnAI-data">
    <parameter name="relationship-list.relationship[0].related-to" value="availability-zone" />
    <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="CloudOwner" />
    <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="`$vnf-topology-operation-input.vnf-request-input.aic-cloud-region`" />
    <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="availability-zone.availability-zone-name" />
    <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$aai.az.availability-zone[$idx].availability-zone-name`" />
<outcome value='failure'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="Error updating generic-vnf in AAI" />
</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
</return></outcome></save></block></for><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.max-count'
   value='`$db.vf-model.avail-zone-max-count`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length'
   value='`$aai.az.availability-zone_length`' />
</set><for index='vnf-nw-index' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length`' >
<block atomic="true"><save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
   resource="generic-vnf:relationship-list"
   key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
   force="true" pfx="tmp.AnAI-data">
    <parameter name="relationship-list.relationship[0].related-to" value="l3-network" />
    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="l3-network.network-id" />
    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[$vnf-nw-index].network-id`" />
<outcome value='failure'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="Error updating generic-vnf in AAI" />
</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
</return></outcome></save></block></for><set>
<parameter name='vnf-object-path'
 value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
 + $vnf-topology-operation-input.service-information.service-instance-id
 + '/service-data/vnfs/vnf/'
 + $service-data.vnfs.vnf[$vnf-index].vnf-id
 + '/vnf-data/vnf-topology'`"/>
<parameter name='service-object-path'
 value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
 + $vnf-topology-operation-input.service-information.service-instance-id
 + '/service-data/vnfs/vnf/'
 + $service-data.vnfs.vnf[$vnf-index].vnf-id
 + '/vnf-data/vnf-topology'`"/></set><update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
   resource="generic-vnf"
   key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id"
   force="true" pfx="tmp.AnAI-data">
<parameter name="vnf-name" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name`" />
<parameter name="prov-status" value="PREPROV" />
<parameter name="operational-status" value="out-of-service-path" />
<parameter name="equipment-role" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`" />
<parameter name="model-invariant-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-invariant-uuid`" />
<parameter name="model-version-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-uuid`" />
<parameter name="model-customization-id" value="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.onap-model-information.model-customization-uuid`" />
<parameter name="selflink" value="`$vnf-object-path`" />
<outcome value='failure'>
<return status='failure'>
	<parameter name='ack-final' value='Y'/>
	<parameter name="error-code" value="500" />
    <parameter name="error-message" value="Error updating selflink in generic-vnf in AAI" />
</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="`'No generic-vnf found in AAI for vnf ID ' + $service-data.vnfs.vnf[$vnf-index].vnf-id`" />
</return></outcome></update><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />

</set><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='PendingCreate' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />
</set><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>