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
*** Settings ***
Library String
Library OperatingSystem
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt
Library JSONLibrary
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false
Suite Setup Check resource existence and get CallbackUri
*** Test Cases ***
Performance Information Available Notification
[Documentation] Test ID: 7.3.4.10.1
... Test title: Performance Information Available Notification
... Test objective: The objective is to test that the POST request triggers Performance Information Available Notification.
... Pre-conditions: A VNF performance job is created, and a subscription for performance information available notification is available in the VNFM.
... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Post Performance Information Available Notification
Check HTTP Response Status Code Is 204
Threshold Crossed Notification
[Documentation] Test ID: 7.3.4.10.2
... Test title: Threshold Crossed Notification
... Test objective: The objective is to test that the POST request triggers Threshold Crossed Notification
... Pre-conditions: A VNF performance job is created, and a subscription for threshold crossed notification is available in the VNFM.
... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Post Threshold Crossed Notification
Check HTTP Response Status Code Is 204
*** Keywords ***
Check resource existence and get CallbackUri
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}
Integer response status 200
Validate Json response body PmJob.schema.json
Set Global Variable ${callbackResp} response body callbackUri
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
${status}= Convert To Integer ${expected_status}
Should Be Equal As Strings ${response['status']} ${status}
Log Status code validated
Post Performance Information Available Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body} = Get File jsons/PerformanceInformationAvailableNotification.json
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Post Threshold Crossed Notification
log Trying to perform a POST to get notification
Set Headers {"Accept":"${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
${body} = Get File jsons/ThresholdCrossedNotification.json
Post ${callbackResp} ${body}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}