Alarms.robot 22.9 KB
Newer Older
1
2
*** Settings ***
# Suite setup     Expect spec    SOL003-VNFLifecycleManagement-API.yaml
3
Resource    environment/variables.txt 
4
5
6
7
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    OperatingSystem
8
Library     Collections
9

Elian Kraja's avatar
Elian Kraja committed
10
*** Test Cases ***
11
POST Alarms - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
12
    [Documentation]    Test ID: 6.3.4.1.1
13
14
15
    ...    Test title: POST Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
16
    ...    Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1
17
18
19
20
21
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: none
    POST Alarms Task
    Check HTTP Response Status Code Is    405
22

23
GET information about multiple alarms 
aureliano sinatra's avatar
aureliano sinatra committed
24
    [Documentation]    Test ID: 6.3.4.1.2
25
    ...    Test title: GET information about multiple alarms
26
27
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
28
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1
29
30
31
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions:  
32
33
    GET Alarms Task
    Check HTTP Response Status Code Is    200
aureliano sinatra's avatar
aureliano sinatra committed
34
    Check HTTP Response Body Json Schema Is    alarms    
35

aureliano sinatra's avatar
aureliano sinatra committed
36
GET information about multiple alarms with attribute-based filter
aureliano sinatra's avatar
aureliano sinatra committed
37
    [Documentation]    Test ID: 6.3.4.1.3
aureliano sinatra's avatar
aureliano sinatra committed
38
    ...    Test title: GET information about multiple alarms with attribute-based filter
39
40
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
41
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
42
43
44
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
45
46
47
    GET Alarms Task with filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms
aureliano sinatra's avatar
aureliano sinatra committed
48
49
    
GET information about multiple alarms with invalid attribute-based filter
aureliano sinatra's avatar
aureliano sinatra committed
50
    [Documentation]    Test ID: 6.3.4.1.4
aureliano sinatra's avatar
aureliano sinatra committed
51
    ...    Test title: GET information about multiple alarms with invalid attribute-based filter
52
53
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
54
    ...    Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
55
56
57
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
58
    GET Alarms Task with invalid filter
59
    Check HTTP Response Status Code Is    400
aureliano sinatra's avatar
aureliano sinatra committed
60
    Check HTTP Response Body Json Schema Is    ProblemDetails   
61
62
63
64
65
66

GET information about multiple alarms with "all_fields" attribute selector
    [Documentation]    Test ID: 6.3.4.1.5
    ...    Test title: GET information about multiple alarms with "all_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
67
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
68
69
70
71
72
73
74
75
76
77
78
79
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with all_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms
    
GET information about multiple alarms with exclude_default attribute selector
    [Documentation]    Test ID: 6.3.4.1.6
    ...    Test title: GET information about multiple alarms with "exclude_default" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
80
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
81
82
83
84
85
86
87
88
89
90
91
92
93
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with exclude_default attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms

    
GET information about multiple alarms with fields attribute selector
    [Documentation]    Test ID: 6.3.4.1.7
    ...    Test title: GET information about multiple alarms with fields attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
94
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
95
96
97
98
99
100
101
102
103
104
105
106
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms
     
GET information about multiple alarms with "exclude_fields" attribute selector
    [Documentation]    Test ID: 6.3.4.1.8
    ...    Test title: GET information about multiple alarms with "exclude_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
107
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
108
109
110
111
112
113
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: none
    GET Alarms Task with exclude_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms  
114
115
    
PUT Alarms - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
116
    [Documentation]    Test ID: 6.3.4.1.9
117
118
119
    ...    Test title: PUT Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
120
    ...    Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
121
122
123
124
125
126
127
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: none
    PUT Alarms Task
    Check HTTP Response Status Code Is    405

PATCH Alarms - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
128
    [Documentation]    Test ID: 6.3.4.1.10
129
130
131
    ...    Test title: PATCH Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
132
    ...    Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1
133
134
135
136
137
138
139
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: none
    PATCH Alarms Task
    Check HTTP Response Status Code Is    405

DELETE Alarms - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
140
    [Documentation]    Test ID: 6.3.4.1.11
141
142
143
    ...    Test title: DELETE Alarms - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
144
    ...    Reference: Clause 7.4.2.3.6 - ETSI GS NFV-SOL 002 [2] v2.6.1
145
146
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
147
    ...    Post-Conditions: the alarm is not deleted
148
149
    DELETE Alarms Task
    Check HTTP Response Status Code Is    405
150
151
152
153
154
155
    
GET information about multiple alarms to get Paged Response
    [Documentation]    Test ID: 6.3.4.1.12
    ...    Test title: GET information about multiple alarms to get Paged Response
    ...    Test objective: The objective is to retrieve information about the alarms to get paged response
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
156
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1
157
158
159
160
161
162
163
164
165
166
167
168
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions:  
    GET Alarms Task
    Check HTTP Response Status Code Is    200
    Check LINK in Header 
    
GET information about multiple alarms for Bad Request Response too big
    [Documentation]    Test ID: 6.3.4.1.13
    ...    Test title: GET information about multiple alarms for Bad Request Response too big
    ...    Test objective: The objective is to test that GET method fail retrieving status information about Alarms when Response is too big, and perform the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
169
    ...    Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1
170
171
172
173
174
175
176
177
178
179
180
181
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with invalid filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails
    
GET information about alarms with attribute-based filter "id"
    [Documentation]    Test ID: 6.3.4.1.14
    ...    Test title: GET information about alarms with attribute-based filter "id"
    ...    Test objective: The objective is to retrieve information about the alarm list with alarm filter "id"
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
182
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
183
184
185
186
187
188
189
190
191
192
193
194
195
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with filter "id"
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarm
    Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "id"
    
GET information about multiple alarms with attribute-based filter "vnfcInstanceIds"
    [Documentation]    Test ID: 6.3.4.1.15
    ...    Test title: GET information about multiple alarms with attribute-based filter "vnfcInstanceIds"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "vnfcInstanceIds"
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
196
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
197
198
199
200
201
202
203
204
205
206
207
208
209
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with filter "vnfcInstanceIds"
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms 
    Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "vnfcInstanceIds"
    
GET information about multiple alarms with attribute-based filter "rootCauseFaultyResource.faultyResourceType"
    [Documentation]    Test ID: 6.3.4.1.16
    ...    Test title: GET information about multiple alarms with attribute-based filter "rootCauseFaultyResource.faultyResourceType"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "rootCauseFaultyResource.faultyResourceType"
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
210
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
211
212
213
214
215
216
217
218
219
220
221
222
223
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType"
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms 
    Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "rootCauseFaultyResource_faultyResourceType"
    
GET information about multiple alarms with attribute-based filter "eventType"
    [Documentation]    Test ID: 6.3.4.1.17
    ...    Test title: GET information about multiple alarms with attribute-based filter "eventType"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "eventType"
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
224
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
225
226
227
228
229
230
231
232
233
234
235
236
237
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with filter "eventType"
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms 
    Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "eventType"
    
GET information about multiple alarms with attribute-based filter "perceivedSeverity"
    [Documentation]    Test ID: 6.3.4.1.18
    ...    Test title: GET information about multiple alarms with attribute-based filter "perceivedSeverity"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "perceivedSeverity"
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
238
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
239
240
241
242
243
244
245
246
247
248
249
250
251
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with filter "perceivedSeverity"
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms 
    Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "perceivedSeverity"
    
GET information about multiple alarms with attribute-based filter "probableCause"
    [Documentation]    Test ID: 6.3.4.1.19
    ...    Test title: GET information about multiple alarms with attribute-based filter "probableCause"
    ...    Test objective: The objective is to retrieve information about the alarm list with attribute filter "probableCause"
    ...    Pre-conditions: 
Michele Carignani's avatar
Michele Carignani committed
252
    ...    Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1
253
254
255
256
257
258
259
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    GET Alarms Task with filter "probableCause"
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms 
    Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "probableCause"
260
261
262
263
264
265
266
267

*** Keywords ***
POST Alarms Task
    log    Trying to perform a POST. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/${apiVersion}/alarms
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
268
	Set Global Variable    ${response}    ${outputResponse}
269
PUT Alarms Task
270
271
272
273
    log    Trying to perform a PUT. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/${apiVersion}/alarms
274
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
275
	Set Global Variable    ${response}    ${outputResponse}
276
PATCH Alarms Task
277
278
279
280
    log    Trying to perform a PATCH. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/${apiVersion}/alarms
281
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
282
	Set Global Variable    ${response}    ${outputResponse}
283
DELETE Alarms Task
284
285
286
287
    log    Trying to perform a DELETE. This method should not be implemented
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/${apiVersion}/alarms
288
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
289
	Set Global Variable    ${response}    ${outputResponse}			
290
291
292
293
294
295
296
GET Alarms Task	
	Log    Query VNF The GET method queries information about multiple alarms.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
297
	Set Global Variable    ${response}    ${outputResponse}
298
299
300
301
302
303
304
GET Alarms Task with filter
	Log    Query VNF The GET method queries information about multiple alarms with filters.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${managedObjectId} 
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
305
	Set Global Variable    ${response}    ${outputResponse}	   	
306
307
308
309
310
311
312
GET Alarms Task with invalid filter
	Log    Query VNF The GET method queries information about multiple alarms with filters.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} 
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
313
	Set Global Variable    ${response}    ${outputResponse}	
aureliano sinatra's avatar
aureliano sinatra committed
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
GET Alarms Task with all_fields attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_default
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
GET Alarms Task with exclude_default attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_default
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
GET Alarms Task with fields attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/alarms?fields=${fields}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}	
GET Alarms Task with exclude_fields attribute selector
    Log    Query VNF The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_fields=${fields}
    ${output}=    Output    response
Giacomo Bernini's avatar
Giacomo Bernini committed
341
342
    Set Suite Variable    ${response}    ${output}
    
343
344
Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}    
Elian Kraja's avatar
Elian Kraja committed
345
    Should Be Equal As Strings    ${response['status']}    ${expected_status}
346
    Log    Status code validated 
Giacomo Bernini's avatar
Giacomo Bernini committed
347
348
349
350
351
352
353
354
355
356
357
358
359
    
Check HTTP Response Header Contains
    [Arguments]    ${CONTENT_TYPE}
    Log    ${response['headers']}
    Should Contain    ${response['headers']}    ${CONTENT_TYPE}
    Log    Header is present
    
Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    Should Contain    ${response['headers']['Content-Type']}    application/json
    ${schema} =    Catenate    SEPARATOR=    ${input}	.schema.json
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
360
361
362
363
364
365
366
367
368
369
370
371
    
Check LINK in Header
    ${linkURL}=    Get Value From Json    ${response.headers}    $..Link
    Should Not Be Empty    ${linkURL}
    
GET Alarms Task with filter "id"
	Log    Query VNF The GET method queries information about multiple alarms with filters "id".
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?id=${alarmId}
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
372
	Set Global Variable    ${response}    ${outputResponse}
373
374
375
376
377
378
379
380
381
382
383
	
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "id"
    Should Be Equal As Strings    ${response['body']['id']}    ${alarmId}

GET Alarms Task with filter "vnfcInstanceIds"
	Log    Query VNF The GET method queries information about multiple alarms with filters "vnfcInstanceIds".
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?vnfcInstanceIds=${vnfcInstanceIds}
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
384
	Set Global Variable    ${response}    ${outputResponse}
385
386
387
388
389
390
391
392
393
394
395
396
397
	
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "vnfcInstanceIds"
    :FOR   ${item}   IN  @{response['body']}
    Lists Should Be Equal     ${item['vnfcInstanceIds']}    ${vnfcInstanceIds}
    END
	
GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType"
	Log    Query VNF The GET method queries information about multiple alarms with filters "rootCauseFaultyResource.faultyResourceType".
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType}
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
398
	Set Global Variable    ${response}    ${outputResponse}
399
400
401
402
403
404
405
406
407
408
409
410
411
	
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "rootCauseFaultyResource_faultyResourceType"
    :FOR   ${item}   IN  @{response['body']}
    Should Be Equal As Strings    ${item['rootCauseFaultyResource']['faultyResourceType']}   ${faultyResourceType}
    END
	
GET Alarms Task with filter "eventType"
	Log    Query VNF The GET method queries information about multiple alarms with filters "eventType".
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?eventType=${eventType}
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
412
	Set Global Variable    ${response}    ${outputResponse}
413
414
415
416
417
418
419
420
421
422
423
424
425
	
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "eventType"
    :FOR   ${item}   IN  @{response['body']}
    Should Be Equal As Strings    ${item['eventType']}   ${eventType}
    END
	
GET Alarms Task with filter "perceivedSeverity"
	Log    Query VNF The GET method queries information about multiple alarms with filters "perceivedSeverity".
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?perceivedSeverity=${perceivedSeverity}
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
426
	Set Global Variable    ${response}    ${outputResponse}
427
428
429
430
431
432
433
434
435
436
437
438
439
	
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "perceivedSeverity"
    :FOR   ${item}   IN  @{response['body']}
    Should Be Equal As Strings    ${item['perceivedSeverity']}   ${perceivedSeverity}
    END
	
GET Alarms Task with filter "probableCause"
	Log    Query VNF The GET method queries information about multiple alarms with filters "probableCause".
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Log    Execute Query and validate response
    Get    ${apiRoot}/${apiName}/${apiVersion}/alarms?probableCause=${probableCause}
    ${outputResponse}=    Output    response
Elian Kraja's avatar
Elian Kraja committed
440
	Set Global Variable    ${response}    ${outputResponse}
441
442
443
444
445
	
Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "probableCause"
    :FOR   ${item}   IN  @{response['body']}
    Should Be Equal As Strings    ${item['probableCause']}   ${probableCause}
    END