Newer
Older
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
*** Settings ***
Resource environment/variables.txt
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
Library DependencyLibrary
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library String
Library OperatingSystem
Library Collections
*** Keywords ***
POST API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE API Version with apiMajorVersion
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK
POST VNF Snapshot Packages
Log Trying to create a VNF Snapshot Package using the POST method.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/CreateVnfSnapshotPkgInfoRequest.json
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshot Packages
Log Query VNF The GET method queries information about multiple VNF Snapshot Packages.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshot Packages with bad attribute
Log Query VNF The GET method queries information about multiple VNF Snapshot Packages.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages?attribute_not_exist=some_value
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshot Packages with bad filter
Log Query VNF The GET method queries information about multiple VNF Snapshot Packages.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages?fields=wrong_field
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshot Packages with all_fields attribute selector
Log Query status information about multiple VNF Snapshot Packages, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshot Packages with exclude_default attribute selector
Log Query status information about multiple VNF Snapshot Packages using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshot Packages with fields attribute selector
Log Query status information about multiple VNF Snapshot Packages, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages?fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshot Packages with exclude_default and fields attribute selector
Log Query status information about multiple VNF Snapshot Packages, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages?fields=${fields}&exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshot Packages with exclude_fields attribute selector
Log Query status information about multiple VNF Snapshot Packages, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages?exclude_fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
GET VNF Snapshot Packages without Paging support
Run Keyword If ${PAGING_SUPPORTED} == 0 GET multiple VNF Snapshot Packages
GET VNF Snapshot Packages with Paging support
Run Keyword If ${PAGING_SUPPORTED} == 1 GET multiple VNF Snapshot Packages
Check HTTP Response Header Contains Link
${linkURL}= Get Value From Json ${response['headers']} $..Link
Should Not Be Empty ${linkURL}
PUT VNF Snapshot Packages
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH VNF Snapshot Packages
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE VNF Snapshot Packages
Log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST individual VNF Snapshot Package
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET individual VNF Snapshot Package
log Trying to get information about an individual VNF Snapshot Package
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET individual VNF Snapshot Package with invalid URI
log Trying to get information about an individual VNF Snapshot Package
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${invalidVnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT individual VNF Snapshot Package
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH individual VNF Snapshot Package
log Trying to modify a VNF Snapshot Package using PATCH method
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/VnfSnapshotPkgInfoModifications.json
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check state of the VNF Snapshot Package - PATCH
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
@{error_states_VnfSnapshotPackage}= Create List
Append to List ${error_states_VnfSnapshotPackage} ERROR BUILDING UPLOADING EXTRACTING
List should contain value ${error_states_VnfSnapshotPackage} ${state}
PATCH individual VNF Snapshot Package - Erroneous State
Check state of the VNF Snapshot Package - PATCH
log Trying to modify a VNF Snapshot Package which is in state other than CREATED, ERROR_EXTRACTING or AVAILABLE
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/VnfSnapshotPkgInfoModifications.json
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check state of the VNF Snapshot Package - DELETE
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
@{error_states_VnfSnapshotPackage}= Create List
Append to List ${error_states_VnfSnapshotPackage} ERROR_EXTRACTING BUILDING UPLOADING EXTRACTING
List should contain value ${error_states_VnfSnapshotPackage} ${state}
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
DELETE individual VNF Snapshot Package
log Trying to DELETE an individual VNF Snapshot package
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE individual VNF Snapshot Package - Conflict
Check state of the VNF Snapshot Package - DELETE
log Trying to DELETE an individual VNF Snapshot package which is in state other than ERROR, CREATED or AVAILABLE
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST VNF Snapshot Package Content
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET VNF Snapshot Package Content - Complete
log Trying to fetch the complete contents of VNF Snapshot Package
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET VNF Snapshot Package Content - Range Request
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
log Trying to get information about an individual VNF Snapshot Package using a range request
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Set Headers {"Range":"${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET VNF Snapshot Package Content - Invalid Range
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
log Trying to get information about an individual VNF Snapshot Package with invalid range
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Set Headers {"Range":"${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET VNF Snapshot Package Content - Not Available
Check State of VNF Package - Not AVAILABLE
Log Trying to fetch the contents of a VNF Snapshot Package which is not in AVAILABLE state
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId_notInAvailableState}/package_content
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check State of VNF Package - Not AVAILABLE
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
Should not be equal as strings ${state} AVAILABLE
Check HTTP Content-Type Header Is Set For Package Content
Log Check Content-Type HTTP Header
Should Contain ${response['headers']} Content-Type
Should Be Equal As Strings ${response['headers']['Content-Type']} ${CONTENT_TYPE_ZIP}
Log Content type validated
Check HTTP Content-Range Header Is Set
Log Check Content-Range HTTP Header
Should Contain ${response['headers']} Content-Range
Should Be Equal As Strings ${response['headers']['Content-Range']} ${range}
Log Header Content-Range is present
PUT VNF Snapshot Package Content
log Trying to upload the contents of VNF Snapshot Package using PUT
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get Binary File zip/sampleVNFSnapshotPackage.zip
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT VNF Snapshot Package Content - Conflict
Check Conflict State for PUT VNF Snapshot Package Content
log Trying to upload the contents of VNF Snapshot Package using PUT when the state of Individual VNF Snapshot Package is other than CREATED or ERROR
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get Binary File zip/sampleVNFSnapshotPackage.zip
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check Conflict State for PUT VNF Snapshot Package Content
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
@{allowedStates_VnfSnapshotPackage}= Create List
Append to List ${allowedStates_VnfSnapshotPackage} ERROR CREATED
List should not contain value ${allowedStates_VnfSnapshotPackage} ${state}
PATCH VNF Snapshot Package Content
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE VNF Snapshot Package Content
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Individual VNF Snapshot Package Artifact
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_OCTET}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Individual VNF Snapshot Package Artifact - Complete
log Trying to fetch the complete contents of an individual VNF Snapshot Package artifact
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Individual VNF Snapshot Package Artifact - Range Request
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
log Trying to get information about an individual VNF Snapshot Package artifact using a range request
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Set Headers {"Range":"${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Individual VNF Snapshot Package Artifact - Invalid Range
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
log Trying to get information about an individual VNF Snapshot Package artifact with invalid range
Set Headers {"Accept":"${CONTENT_TYPE_OCTET}"}
Set Headers {"Range":"${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Individual VNF Snapshot Package Artifact - Not Available
Check Conflict State for Extract VNF Snapshot Package Content
Log Trying to get information about an individual artifact of a VNF Snapshot Package which is not in AVAILABLE state
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId_notInAvailableState}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Individual VNF Snapshot Package Artifact - External
log Trying to fetch information about an external VNF Snapshot artifact
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${ext_artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
PUT Individual VNF Snapshot Package Artifact
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_OCTET}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Individual VNF Snapshot Package Artifact
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_OCTET}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE Individual VNF Snapshot Package Artifact
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_OCTET}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/artifacts/${artifactPath}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check HTTP Response Contains Resource URI
${ResourceURI}= Get Value From Json ${response['headers']} $..Location
Should Not Be Empty ${ResourceURI}
Check HTTP Content-Type Header Is Set For Package Artifact
Log Check Content-Type HTTP Header
Should Contain ${response['headers']} Content-Type
Should Be Equal As Strings ${response['headers']['Content-Type']} ${CONTENT_TYPE_OCTET}
Log Content type validated
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
POST Upload VNF Snapshot Package Content from URI
Log Trying to initiate Upload VNF Snapshot Content from URI task
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template}= Get File jsons/UploadVnfSnapshotPkgFromUriRequest.json
${body}= Format String ${template} addressInformation=${vnfPackageContent_URI}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/upload_from_uri ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Upload VNF Snapshot Package Content from URI - Conflict
Check Conflict State for PUT VNF Snapshot Package Content
Log Trying to initiate Upload VNF Snapshot Content from URI task when the state of the VNF Snapshot Package is other than ERROR or CREATED.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template}= Get File jsons/UploadVnfSnapshotPkgFromUriRequest.json
${body}= Format String ${template} addressInformation=${vnfPackageContent_URI}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/upload_from_uri ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Upload VNF Snapshot Package Content from URI
log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/upload_from_uri
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT Upload VNF Snapshot Package Content from URI
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/upload_from_uri
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Upload VNF Snapshot Package Content from URI
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/upload_from_uri
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE Upload VNF Snapshot Package Content from URI
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/upload_from_uri
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Build VNF Snapshot Package Content Task
Log Trying to initiate the Build of VNF Snapshot Content Task
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template}= Get File jsons/BuildVnfSnapshotPkgRequest.json
${body}= Format String ${template} vnfSnapshotInfoId=${vnfSnapshotInfoId}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/build ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Build VNF Snapshot Package Content Task - Conflict
Check Conflict State for BUILD VNF Snapshot Package Content
Log Trying to initiate the Build VNF Snapshot Content task when the state of the VNF Snapshot Package is not CREATED.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template}= Get File jsons/BuildVnfSnapshotPkgRequest.json
${body}= Format String ${template} vnfSnapshotInfoId=${vnfSnapshotInfoId}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/build ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check Conflict State for BUILD VNF Snapshot Package Content
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
Should not be equal as strings ${state} CREATED
GET Build VNF Snapshot Package Content Task
log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/build
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT Build VNF Snapshot Package Content Task
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/build
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Build VNF Snapshot Package Content Task
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/build
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE Build VNF Snapshot Package Content Task
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/build
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Extract VNF Snapshot Package Content Task
Log Trying to initiate Extract VNF Snapshot Content from URI task
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template}= Get File jsons/ExtractVnfSnapshotPkgRequest.json
${body}= Format String ${template} vnfSnapshotInfoId=${vnfSnapshotInfoId}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/extract ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Extract VNF Snapshot Package Content Task - Conflict State
Check Conflict State for Extract VNF Snapshot Package Content
Log Trying to initiate the Extract VNF Snapshot Content task when the state of the VNF Snapshot Package is not AVAILABLE.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template}= Get File jsons/ExtractVnfSnapshotPkgRequest.json
${body}= Format String ${template} vnfSnapshotInfoId=${vnfSnapshotInfoId} vnfInstanceId=${vnfInstanceId}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/extract ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check Conflict State for Extract VNF Snapshot Package Content
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
Should not be equal as strings ${state} AVAILABLE
POST Extract VNF Snapshot Package Content Task - Invalid vnfInstanceId
Log Trying to initiate the Extract VNF Snapshot Content task when the state of the VNF Snapshot Package is not AVAILABLE.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template}= Get File jsons/ExtractVnfSnapshotPkgRequest.json
${body}= Format String ${template} vnfSnapshotInfoId=${vnfSnapshotInfoId} vnfInstanceId=${invalidVnfInstanceId}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/extract ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET Extract VNF Snapshot Package Content Task
log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/extract
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT Extract VNF Snapshot Package Content Task
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/extract
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Extract VNF Snapshot Package Content Task
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/extract
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE Extract VNF Snapshot Package Content Task
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/extract
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Cancel VNF Snapshot Package Content Task
Log Trying to initiate cancelation of VNF Snapshot Content Task
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/CancelVnfSnapshotPkgOperationRequest.json
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/cancel ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Cancel VNF Snapshot Package Content Task - Conflict
Check Conflict State for Cancel VNF Snapshot Package Content
Log Trying to initiate the cancelation of VNF Snapshot Content task when the state of the VNF Snapshot Package is other than "UPLOADING", "BUILDING", "PROCESSING" or "EXTRACTING".
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/CancelVnfSnapshotPkgOperationRequest.json
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/cancel ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check Conflict State for Cancel VNF Snapshot Package Content
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
@{allowedStates}= Create List
Append to List ${allowedStates} PROCESSING BUILDING UPLOADING EXTRACTING
List should not contain value ${allowedStates} ${state}
GET Cancel VNF Snapshot Package Content Task
log Trying to perform a GET. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/cancel
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT Cancel VNF Snapshot Package Content Task
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/cancel
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Cancel VNF Snapshot Package Content Task
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/cancel
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE Cancel VNF Snapshot Package Content Task
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/package_content/cancel
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST Access Configuration for External Artifacts
Log Trying to perform a POST. This method should not be implemented.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT Access Configuration for External Artifacts
Log Trying to provide the access configuration information to the NFVO using PUT method.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/VnfSnapshotPkgExtArtifactsAccessInfo.json
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT Access Configuration for External Artifacts - Conflict
Check Conflict State for Cancel VNF Snapshot Package Content
Log Trying to provide the access configuration information to the NFVO using PUT method when the state of VNF Snapshot Package is not ERROR or CREATED.
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${body}= Get File jsons/VnfSnapshotPkgExtArtifactsAccessInfo.json
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check Conflict State for External Artifact Access Configuration
GET individual VNF Snapshot Package
${state}= Get variable value ${response['body']['state']}
@{allowedStates}= Create List
Append to List ${allowedStates} CREATED ERROR
List should not contain value ${allowedStates} ${state}
GET Access Configuration for External Artifacts
log Trying to read the access configuration information that is used by the NFVO to get the content of external VNF snapshot package artifacts
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH Access Configuration for External Artifacts
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE Access Configuration for External Artifacts
log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${vnfSnapshotPkgId}/ext_artifacts_access
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}