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
*** Settings ***
Library String
Library OperatingSystem
Resource environment/variables.txt
Library JSONLibrary
Library JSONSchemaLibrary schemas/
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Suite Setup Check resource existence and get CallbackUri
*** Test Cases ***
VNF Fault Alarm Notification
[Documentation] Test ID: 6.3.4.8.1
... Test title: VNF Fault Alarm Notification
... Test objective: The objective is to test that VNF Fault Alarm Notification is delivered with success to the notification consumer
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
... Config ID: Config_prod_Notif_Endpoint
... Applicability: none
... Post-Conditions: none
Post Alarm Notification
Check HTTP Response Status Code Is 204
VNF Fault Alarm Cleared Notification
[Documentation] Test ID: 6.3.4.8.2
... Test title: VNF Fault Alarm Cleared Notification
... Test objective: The objective is to test that VNF Fault Alarm Cleared Notification is delivered with success to the notification consumer
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
... Config ID: Config_prod_Notif_Endpoint
... Applicability: none
... Post-Conditions: none
Post Alarm Cleared Notification
Check HTTP Response Status Code Is 204
VNF Fault Alarm List Rebuilt Notification
[Documentation] Test ID: 6.3.4.8.3
... Test title: VNF Fault List Rebuilt Alarm List Rebuilt Notification
... Test objective: The objective is to test that VNF Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM.
... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1
... Config ID: Config_prod_Notif_Endpoint
... Applicability: none
... Post-Conditions: none
Post Alarm List Rebuilt Notification
Check HTTP Response Status Code Is 204
*** Keywords ***
Check resource existence and get CallbackUri
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Integer response status 200
Validate Json response body FmSubscription.schema.json
Set Global Variable ${callbackResp} response body callbackUri
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated
Post Alarm Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template} = Get File jsons/AlarmNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId}
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Post Alarm Cleared Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template} = Get File jsons/AlarmClearedNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId}
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Post Alarm List Rebuilt Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
${template} = Get File jsons/AlarmListRebuiltNotification.json
${body}= Format String ${template} subscriptionId=${subscriptionId}
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}