Commit fc34183a authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

added doc for SOL002, SOL003 and SOL005 notificaitons

parent 36db7cfb
*** Settings ***
Resource environment/variables.txt
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
Library MockServerLibrary
Library Process
Library OperatingSystem
Library Collections
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
Deliver a notification - Alarm
[Documentation] Test ID: 7.4.5.1
... Test title: Deliver a notification - Alarm
... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt.
... Pre-conditions: The VNF has subscribed to the VNFM alarm
... Reference: section 7.4.5 - SOL002 v2.4.1
VNF Fault Alarm Notification
[Documentation] Test ID: 6.3.4.6.1
... Test title: VNF Fault Alarm Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm Notification when a virtualised resource within an VNF instance fails, and perform a JSON schema and content validation of the delivered notification
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM.
... Reference: section 7.4.7.3.1 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
log The POST method delivers a notification - Information of a VNF alarm.
${json}= Get File schemas/alarmNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm Clearance
[Documentation] Test ID: 7.4.5.2
... Test title: Deliver a notification - Alarm Clearance
... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt.
... Pre-conditions: The VNF has subscribed to the VNFM alarm
... Reference: section 7.4.5 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
log The POST method delivers a notification - Information of a VNF alarm.
${json}= Get File schemas/alarmClearedNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm List Rebuilt
[Documentation] Test ID: 7.4.5.3
... Test title: Deliver a notification - Alarm List Rebuilt
... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt.
... Pre-conditions: The VNF has subscribed to the VNFM alarm
... Reference: section 7.4.5 - SOL002 v2.4.1
... Applicability: none
... Post-Conditions: none
Trigger the fault of a virtualised resource in the VNF instance (external action)
Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification
Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification
VNF Fault Alarm Cleared Notification
[Documentation] Test ID: 6.3.4.6.2
... Test title: VNF Fault Alarm Cleared Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm Cleared Notification when a faulty virtualised resource within an VNF instance is cleared, and perform a JSON schema and content validation of the delivered notification
... Pre-conditions: A VNF instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the VNFM.
... Reference: section 7.4.7.3.1 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
log The POST method delivers a notification - Information of a VNF alarm.
${json}= Get File schemas/alarmListRebuiltNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Test a notification end point
[Documentation] Test ID: 7.4.5.4
... Test title: Test a notification end point
... Test objective: The objective is to allow the server to test the notification endpoint that is provided by the client, e.g. during subscription
... Pre-conditions:
... Reference: section 7.4.5 - SOL002 v2.4.1
... Applicability: none
... Post-Conditions: none
Trigger the fault cleared of a virtualised resource in the VNF instance (external action)
Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification
Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification
VNF Fault Alarm List Rebuilt Notification
[Documentation] Test ID: 6.3.4.6.3
... Test title: VNF Fault Alarm List Rebuilt Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm List Rebuilt Notification when the VNFM decides to rebuild the list of its VNF alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification
... Pre-conditions: A VNF instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the VNFM.
... Reference: section 7.4.7.3.1 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
log The GET method allows the server to test the notification endpoint
&{req}= Create Mock Request Matcher GET ${callback_endpoint}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Verify Mock Expectation ${req}
Clear Requests ${callback_endpoint}
PUT notification - Method not implemented
Log PUT Method not implemented
&{req}= Create Mock Request Matcher PUT ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
PATCH subscriptions - Method not implemented
Log PATCH Method not implemented
&{req}= Create Mock Request Matcher PATCH ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
DELETE subscriptions - Method not implemented
Log DELETE Method not implemented
&{req}= Create Mock Request Matcher DELETE ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
... Applicability: none
... Post-Conditions: none
Trigger the VNF fault alarm list rebuild in the NFVO (external action)
Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification
Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification
*** Keywords ***
Trigger the fault of a virtualised resource in the VNF instance (external action)
#do nothing
Log do nothing
Trigger the fault cleared of a virtualised resource in the VNF instance (external action)
#do nothing
Log do nothing
Trigger the VNF fault alarm list rebuild in the NFVO (external action)
#do nothing
Log do nothing
Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm List Rebuilt Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm cleared Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Alarm cleared Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Alarm Cleareance Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Alarm Clerance Notification Http POST Request Body changeType attribute Is
[Arguments] ${type}
#do nothing
Log do nothing
Configure Notification Alarm List Rebuilt Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Alarm Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Alarm Cleareance Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Forward
[Arguments] ${schema} ${endpoint} ${endpoint_fwd}
Log Creating mock Http POST forward to handle ${schema}
&{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema}
&{notification_fwd}= Create Mock Http Forward ${endpoint_fwd}
Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd}
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-7.3.4
......@@ -30,8 +30,16 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f
${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_fwd} /endpoint/check
${callback_endpoint_error} /endpoint_404
${sleep_interval} 20s
${total_polling_time} 2 min
${polling_interval} 10 sec
${notification_request} []
${notification_response} []
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
${AlarmNotification} {}
${AlarmClearedNotification} {}
......
*** Setting ***
Resource environment/notifications.txt
Resource environment/variables.txt
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
......@@ -9,108 +10,104 @@ Library BuiltIn
Library Collections
Library String
*** Test Cases ***
Check Notification Endpoint
&{req}= Create Mock Request Matcher GET ${callback_endpoint}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Verify Mock Expectation ${req}
Clear Requests ${callback_endpoint}
Post Performance Information Available Notification
${json}= Get File schemas/PerformanceInformationAvailableNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle Performance Information Available Notification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
VNF Performance Information Availability Notification
[Documentation] Test ID: 6.3.3.8.1
... Test title: VNF Performance Information Availability Notification
... Test objective: The objective is to test the dispatch of VNF Performance Information Availability Notification when new VNF perfomance information is available in the NFVO, and perform a JSON schema and content validation of the delivered notification
... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM.
... Reference: section 6.4.9.3.1 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Trigger the availability of VNF Performance Information (external action)
Check Performance Information Available Notification Http POST Request Body Json Schema Is PerformanceInformationAvailableNotification
Check Performance Information Available Notification Http POST Request Body notificationType attribute Is PerformanceInformationAvailableNotification
Post Performance Information Available Notification Negative 404
${json}= Get File schemas/ProblemDetails.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle Performance Information Available Notification to handle 404 error
&{req}= Create Mock Request Matcher POST ${callback_endpoint_error} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=404
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
VNF Threshold Crossed Notification
[Documentation] Test ID: 6.3.3.8.2
... Test title: VNF Threshold Crossed Notification
... Test objective: The objective is to test the dispatch of VNF Threshold Crossed Notification when a previously set VNF perfomance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification
... Pre-conditions: A VNF performance job is created, and a threshold subscription is available in the VNFM.
... Reference: section 6.4.9.3.1 - SOL002 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Trigger the cross of VNF Performance Threshold (external action)
Check Threshold Crossed Notification Http POST Request Body Json Schema Is ThresholdCrossedNotification
Check Threshold Crossed Notification Http POST Request Body notificationType attribute Is ThresholdCrossedNotification
Post Threshold Crossed Notification
${json}= Get File schema/ThresholdCrossedNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle Threshold Crossed Notification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
PostThreshold Crossed Notification Negative 404
${json}= Get File schemas/ProblemDetails.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handleThreshold Crossed Notification to handle 404 error
&{req}= Create Mock Request Matcher POST ${callback_endpoint_error} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=404
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
*** Keywords ***
Trigger the availability of VNF Performance Information (external action)
#do nothing
Log do nothing
Trigger the cross of VNF Performance Threshold (external action)
#do nothing
Log do nothing
Check Performance Information Available Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
Check Performance Information Available Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Performance Information Available Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
Check Threshold Crossed Notification Http POST Request Body Json Schema Is
[Arguments] ${element}
${schema}= Get File schemas/${element}.schema.json
Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd}
PUT Performance Notification
Log PUT Method not implemented
&{req}= Create Mock Request Matcher PUT ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Check Threshold Crossed Notification Http POST Request Body notificationType attribute Is
[Arguments] ${type}
Configure Notification Threshold Crossed Handler ${callback_endpoint_fwd} ${type}
Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request}
Clear Requests ${callback_endpoint}
Clear Requests ${callback_endpoint_fwd}
PATCH Performance Notification
Log PATCH Method not implemented
&{req}= Create Mock Request Matcher PATCH ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Check Threshold Crossed Notification Http POST Request Body changeType attribute Is
[Arguments] ${type}
#do nothing
Log do nothing
DELETE Performance Notification
Log PATCH Method not implemented
&{req}= Create Mock Request Matcher DELETE ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Configure Notification Performance Information Available Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Threshold Crossed Handler
[Arguments] ${endpoint} ${type}
${json}= evaluate {}
set to dictionary ${json} notificationType ${type}
${BODY}= evaluate json.dumps(${json}) json
Log Creating mock request and response to handle status notification
&{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY}
&{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${notification_request} ${notification_response}
Configure Notification Forward
[Arguments] ${schema} ${endpoint} ${endpoint_fwd}
Log Creating mock Http POST forward to handle ${schema}
&{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema}
&{notification_fwd}= Create Mock Http Forward ${endpoint_fwd}
Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd}
*** Keywords ***
Create Sessions
Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance
Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance
Wait For Process handle=mockInstance timeout=5s on_timeout=continue
Create Mock Session ${callback_uri}:${callback_port}
\ No newline at end of file
*** Variables ***
${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_fwd} /endpoint/check
${callback_endpoint_error} /endpoint_404
${sleep_interval} 20s
${total_polling_time} 2 min
${polling_interval} 10 sec
${notification_request} []
${notification_response} []
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
Library MockServerLibrary
Library Process
Library OperatingSystem
Library Collections
Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
Deliver a notification - Alarm
[Documentation] Test ID: 7.4.5.1
... Test title: Deliver a notification - Alarm
... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt.
... Pre-conditions: The VNF has subscribed to the VNFM alarm
... Reference: section 7.4.5 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
log The POST method delivers a notification - Information of a VNF alarm.
${json}= Get File schemas/alarmNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm Clearance
[Documentation] Test ID: 7.4.5.2
... Test title: Deliver a notification - Alarm Clearance
... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt.
... Pre-conditions: The VNF has subscribed to the VNFM alarm
... Reference: section 7.4.5 - SOL003 v2.4.1
VNF Fault Alarm Notification
[Documentation] Test ID: 7.3.5.5.1
... Test title: VNF Fault Alarm Notification
... Test objective: The objective is to test the dispatch of VNF Fault Alarm Notification when a virtualised resource within an VNF instance fails, and perform a JSON schema and content validation of the delivered notification
... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM.
... Reference: section 7.4.6.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability:
... Post-Conditions:
log The POST method delivers a notification - Information of a VNF alarm.
${json}= Get File schemas/alarmClearedNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle alarmNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Log Verifying results
Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
Deliver a notification - Alarm List Rebuilt
[Documentation] Test ID: 7.4.5.3
... Test title: Deliver a notification - Alarm List Rebuilt
... Test objective: The objective is to notify a VNF alarm or that the alarm list has been rebuilt.