From e0293cb67bb10203c7365aea409d8e383e60cf7b Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Tue, 8 Jun 2021 18:12:26 +0200 Subject: [PATCH 1/5] Added instrumentation platform hook for NSFaultManagement-AlarmNotification --- .../NSFaultManagement-API/Notifications.robot | 65 ++++++++++++++++++- .../environment/variables.txt | 12 ++++ .../jsons/AlarmNotificationUpperTester.json | 7 ++ .../jsons/fmSubscriptionRequest.json | 2 - ...tionRequestForInstrumentationPlatform.json | 12 ++++ 5 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json create mode 100644 SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequestForInstrumentationPlatform.json diff --git a/SOL005/NSFaultManagement-API/Notifications.robot b/SOL005/NSFaultManagement-API/Notifications.robot index 3e811a2a3..02536f8fa 100644 --- a/SOL005/NSFaultManagement-API/Notifications.robot +++ b/SOL005/NSFaultManagement-API/Notifications.robot @@ -6,6 +6,7 @@ Library MockServerLibrary Library Process Library OperatingSystem Library Collections +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true @@ -51,7 +52,25 @@ NS Fault Alarm List Rebuilt Notification Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification +NS Fault Alarm Notification with instrumental platform hook + [Documentation] Test ID: 5.3.3.5.4 + ... Test title: NS Fault Alarm Notification with instrumental platform hook + ... Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource within an NS instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger the fault of a virtualised resource in the NS instance + Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification + Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification + *** Keywords *** +Trigger the fault of a virtualised resource in the NS instance + Create Alarm Subscription AlarmNotification + &{keyvalues} Create Dictionary eventType=COMMUNICATIONS_ALARM delay=10s + Trigger instrumentation platform ${upperTesterUrlForAlarmNotifications} ${nsInstanceIdForNotifications} nsInstance AlarmNotification null &{keyvalues} + Trigger the fault of a virtualised resource in the NS instance (external action) #do nothing Log do nothing @@ -114,7 +133,8 @@ Configure Notification Alarm List Rebuilt Handler 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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} &{headers} = Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -125,7 +145,8 @@ Configure Notification Alarm Handler 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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} &{headers} = Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -136,7 +157,8 @@ Configure Notification Alarm Cleareance Handler 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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} &{headers} = Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -147,3 +169,40 @@ Configure Notification Forward &{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 Alarm Subscription + [Arguments] ${notificationType} + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + 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/fmSubscriptionRequestForInstrumentationPlatform.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} nsInstanceId=${nsInstanceIdForNotifications} notificationType=${notificationType} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + + +Trigger instrumentation platform + [Arguments] ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} + Run Keyword If ${event} == "AlarmNotification" or ${event} == "AlarmClearedNotification" or ${event} == "AlarmListRebuildNotification" + ... Trigger Alarm Management UpperTester ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} + + +Trigger Alarm Management UpperTester + [Arguments] ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE_UPPERTESTER} == 1 Set Headers {"${AUTHORIZATION_HEADER_UPPERTESTER}":"${AUTHORIZATION_TOKEN_UPPERTESTER}"} + ${template}= Get File jsons/AlarmNotificationUpperTester.json + ${body}= Format String ${template} resourceId=${resourceId} resourceType=${resourceType} event=${event} value=${value} keyvalues=${keyvalues} + POST ${upperTesterUrl} ${body} + ${output}= Output response + Should Be Equal As Strings ${output['status']} 202 \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index d21d1421a..07ce775bd 100644 --- a/SOL005/NSFaultManagement-API/environment/variables.txt +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -65,3 +65,15 @@ ${notification_request} [] ${notification_response} [] ${callbackResp} 127.0.0.1 + + + +### Instrumentation platform variables +${nsInstanceIdForNotifications} SOME-ID +${AUTHORIZATION_HEADER_UPPERTESTER} Authorization +${AUTHORIZATION_TOKEN_UPPERTESTER} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTH_USAGE_UPPERTESTER} 0 + + +${upperTesterUrlForAlarmNotifications} http://localhost:9999/uppertester + diff --git a/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json b/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json new file mode 100644 index 000000000..9891fae6b --- /dev/null +++ b/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json @@ -0,0 +1,7 @@ +{{ + "resourceId":"{resourceId}", + "resourceType":"{resourceType}", + "event":"{event}", + "value":"{value}", + "keyvalue": "{keyvalue}" +}} diff --git a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json index e9a8b3b01..fcbf70dae 100644 --- a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json +++ b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json @@ -1,10 +1,8 @@ {{ "filter": {{ - "nsInstanceSubscriptionFilter": {{ "notificationTypes": [ "AlarmNotification" ] - }} }}, "callbackUri": "{callback_uri}{callback_endpoint}" }} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequestForInstrumentationPlatform.json b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequestForInstrumentationPlatform.json new file mode 100644 index 000000000..41799f6e2 --- /dev/null +++ b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequestForInstrumentationPlatform.json @@ -0,0 +1,12 @@ +{{ + "filter": {{ + "nsInstanceSubscriptionFilter": {{ + "nsInstanceIds": ["{nsInstanceId}"] + }}, + "notificationTypes": [ + "{notificationType}" + ] + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} + -- GitLab From 37a10eba34a32b07f864cca8e86de42885f9e4b3 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Tue, 8 Jun 2021 18:57:30 +0200 Subject: [PATCH 2/5] Fix on instrumentation platform hooks --- .../NSFaultManagement-API/Notifications.robot | 27 ++++++++++--------- .../environment/variables.txt | 2 +- .../jsons/AlarmNotificationUpperTester.json | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/SOL005/NSFaultManagement-API/Notifications.robot b/SOL005/NSFaultManagement-API/Notifications.robot index 02536f8fa..603592672 100644 --- a/SOL005/NSFaultManagement-API/Notifications.robot +++ b/SOL005/NSFaultManagement-API/Notifications.robot @@ -134,9 +134,9 @@ Configure Notification Alarm List Rebuilt Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - Set Global Variable ${req} ${notification_request} + Set Global Variable ${notification_request} ${req} &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -146,9 +146,9 @@ Configure Notification Alarm Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - Set Global Variable ${req} ${notification_request} + Set Global Variable ${notification_request} ${req} &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -158,9 +158,9 @@ Configure Notification Alarm Cleareance Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - Set Global Variable ${req} ${notification_request} + Set Global Variable ${notification_request} ${req} &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward @@ -184,16 +184,19 @@ Create Alarm Subscription &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response status_code=204 Log Issue the subscription request - Create Mock Expectation ${notification_request} ${notification_response} + #Create Mock Expectation ${notification_request} ${notification_response} Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} - ${output}= Output response - Set Global Variable ${response} ${output} - Clear Requests ${callback_endpoint} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} Trigger instrumentation platform [Arguments] ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} - Run Keyword If ${event} == "AlarmNotification" or ${event} == "AlarmClearedNotification" or ${event} == "AlarmListRebuildNotification" + ${alarmNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmNotification + ${alarmClearedNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmClearedNotification + ${alarmListRebuiltNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmListRebuiltNotification + Run Keyword If ${alarmNotificationBoolean} == True or ${alarmClearedNotificationBoolean} == True or ${alarmListRebuiltNotificationBoolean} == True ... Trigger Alarm Management UpperTester ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} @@ -205,4 +208,4 @@ Trigger Alarm Management UpperTester ${body}= Format String ${template} resourceId=${resourceId} resourceType=${resourceType} event=${event} value=${value} keyvalues=${keyvalues} POST ${upperTesterUrl} ${body} ${output}= Output response - Should Be Equal As Strings ${output['status']} 202 \ No newline at end of file + Should Be Equal As Strings ${output['status']} 202 diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index 07ce775bd..5ea86ea8c 100644 --- a/SOL005/NSFaultManagement-API/environment/variables.txt +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -1,7 +1,7 @@ *** Variables *** ${NFVO_HOST} localhost # Hostname of the VNFM ${NFVO_PORT} 8080 # Listening port of the VNFM -${NFVO_SCHEMA} https +${NFVO_SCHEMA} http ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${ACCEPT} application/json diff --git a/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json b/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json index 9891fae6b..68ab8fe2e 100644 --- a/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json +++ b/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json @@ -3,5 +3,5 @@ "resourceType":"{resourceType}", "event":"{event}", "value":"{value}", - "keyvalue": "{keyvalue}" + "keyvalue": "{keyvalues}" }} -- GitLab From fe6bdd4e4dcf11687aa8dc21d55dcdcdc6bf170e Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Tue, 8 Jun 2021 19:37:11 +0200 Subject: [PATCH 3/5] Enhancement on Instrumentation platform hooks --- .../NSFaultManagement-API/Notifications.robot | 39 ++++++++----------- .../environment/variables.txt | 7 +--- ...InstrumentationPlatformHooksKeywords.robot | 27 +++++++++++++ .../environment/variables.txt | 6 +++ .../jsons/AlarmNotificationUpperTester.json | 0 5 files changed, 50 insertions(+), 29 deletions(-) create mode 100644 instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot create mode 100644 instrumentationPlatformHooks/environment/variables.txt rename {SOL005/NSFaultManagement-API => instrumentationPlatformHooks}/jsons/AlarmNotificationUpperTester.json (100%) diff --git a/SOL005/NSFaultManagement-API/Notifications.robot b/SOL005/NSFaultManagement-API/Notifications.robot index 603592672..e0c28d721 100644 --- a/SOL005/NSFaultManagement-API/Notifications.robot +++ b/SOL005/NSFaultManagement-API/Notifications.robot @@ -1,6 +1,7 @@ *** Settings *** Resource environment/variables.txt -Resource NSFMOperationKeywords.robot +Resource NSFMOperationKeywords.robot +Resource ../../instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot Library MockServerLibrary Library Process @@ -62,8 +63,8 @@ NS Fault Alarm Notification with instrumental platform hook ... Applicability: none ... Post-Conditions: none Trigger the fault of a virtualised resource in the NS instance - Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification - Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification + Check Instrumentation Platform Alarm Notification Http POST Request Body Json Schema Is alarmNotification + Check Instrumentation Platform Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification *** Keywords *** Trigger the fault of a virtualised resource in the NS instance @@ -100,6 +101,12 @@ Check Alarm Notification Http POST Request Body Json Schema Is ${schema}= Get File schemas/${element}.schema.json Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} +Check Instrumentation Platform Alarm Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Check Alarm Notification Http POST Request Body Json Schema Is ${element} + + Check Alarm Notification Http POST Request Body notificationType attribute Is [Arguments] ${type} Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type} @@ -107,6 +114,11 @@ Check Alarm Notification Http POST Request Body notificationType attribute Is Clear Requests ${callback_endpoint} Clear Requests ${callback_endpoint_fwd} +Check Instrumentation Platform Alarm Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Check Alarm Notification Http POST Request Body notificationType attribute Is ${type} + Check Alarm cleared Notification Http POST Request Body Json Schema Is [Arguments] ${element} ${schema}= Get File schemas/${element}.schema.json @@ -189,23 +201,4 @@ Create Alarm Subscription ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} - - -Trigger instrumentation platform - [Arguments] ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} - ${alarmNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmNotification - ${alarmClearedNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmClearedNotification - ${alarmListRebuiltNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmListRebuiltNotification - Run Keyword If ${alarmNotificationBoolean} == True or ${alarmClearedNotificationBoolean} == True or ${alarmListRebuiltNotificationBoolean} == True - ... Trigger Alarm Management UpperTester ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} - - -Trigger Alarm Management UpperTester - [Arguments] ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE_UPPERTESTER} == 1 Set Headers {"${AUTHORIZATION_HEADER_UPPERTESTER}":"${AUTHORIZATION_TOKEN_UPPERTESTER}"} - ${template}= Get File jsons/AlarmNotificationUpperTester.json - ${body}= Format String ${template} resourceId=${resourceId} resourceType=${resourceType} event=${event} value=${value} keyvalues=${keyvalues} - POST ${upperTesterUrl} ${body} - ${output}= Output response - Should Be Equal As Strings ${output['status']} 202 + \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index 5ea86ea8c..2341a7553 100644 --- a/SOL005/NSFaultManagement-API/environment/variables.txt +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -70,10 +70,5 @@ ${callbackResp} 127.0.0.1 ### Instrumentation platform variables ${nsInstanceIdForNotifications} SOME-ID -${AUTHORIZATION_HEADER_UPPERTESTER} Authorization -${AUTHORIZATION_TOKEN_UPPERTESTER} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${AUTH_USAGE_UPPERTESTER} 0 - - ${upperTesterUrlForAlarmNotifications} http://localhost:9999/uppertester - +${instrumentationPlatformSkip} True \ No newline at end of file diff --git a/instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot b/instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot new file mode 100644 index 000000000..2020335ad --- /dev/null +++ b/instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot @@ -0,0 +1,27 @@ +*** Settings *** +Resource environment/variables.txt + +Library OperatingSystem +Library Collections +Library REST http://localhost:8080 ssl_verify=false + + +*** Keywords *** +Trigger instrumentation platform + [Arguments] ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} + ${alarmNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmNotification + ${alarmClearedNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmClearedNotification + ${alarmListRebuiltNotificationBoolean} Run Keyword And Return Status Should Be Equal As Strings ${event} AlarmListRebuiltNotification + Run Keyword If ${alarmNotificationBoolean} == True or ${alarmClearedNotificationBoolean} == True or ${alarmListRebuiltNotificationBoolean} == True + ... Trigger Alarm Management UpperTester ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} + + +Trigger Alarm Management UpperTester + [Arguments] ${upperTesterUrl} ${resourceId} ${resourceType} ${event} ${value} &{keyvalues} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE_UPPERTESTER} == 1 Set Headers {"${AUTHORIZATION_HEADER_UPPERTESTER}":"${AUTHORIZATION_TOKEN_UPPERTESTER}"} + ${template}= Get File ../../instrumentationPlatformHooks/jsons/AlarmNotificationUpperTester.json + ${body}= Format String ${template} resourceId=${resourceId} resourceType=${resourceType} event=${event} value=${value} keyvalues=${keyvalues} + POST ${upperTesterUrl} ${body} + ${output}= Output response + Should Be Equal As Strings ${output['status']} 202 \ No newline at end of file diff --git a/instrumentationPlatformHooks/environment/variables.txt b/instrumentationPlatformHooks/environment/variables.txt new file mode 100644 index 000000000..de161fa56 --- /dev/null +++ b/instrumentationPlatformHooks/environment/variables.txt @@ -0,0 +1,6 @@ +*** Variables *** + +### Instrumentation platform variables +${AUTHORIZATION_HEADER_UPPERTESTER} Authorization +${AUTHORIZATION_TOKEN_UPPERTESTER} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTH_USAGE_UPPERTESTER} 0 diff --git a/SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json b/instrumentationPlatformHooks/jsons/AlarmNotificationUpperTester.json similarity index 100% rename from SOL005/NSFaultManagement-API/jsons/AlarmNotificationUpperTester.json rename to instrumentationPlatformHooks/jsons/AlarmNotificationUpperTester.json -- GitLab From 84f4854b3e78d3c51a7c197b8bcaa586c90bee03 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Thu, 10 Jun 2021 15:18:43 +0200 Subject: [PATCH 4/5] aligned notifications to v2.7.1 and v2.8.1 --- .../Notifications.robot | 15 ++++---- .../Notifications.robot | 5 +-- .../Notifications.robot | 20 ++++++----- .../Notifications.robot | 10 +++--- .../Notifications.robot | 15 ++++---- SOL003/VNFIndicator-API/Notifications.robot | 5 +-- .../Notifications.robot | 20 ++++++----- .../Notifications.robot | 15 ++++---- .../Notifications.robot | 10 +++--- .../Notifications.robot | 2 +- SOL005/NSDManagement-API/Notifications.robot | 35 +++++++++++-------- .../NSFaultManagement-API/Notifications.robot | 10 +++--- .../CreateNSInstanceWorkflow.robot | 11 ++++-- .../DeleteNSInstanceWorkflow.robot | 7 +++- .../NSLCMOperationKeywords.robot | 31 ++++++++++++++-- .../Notifications.robot | 12 ++++--- .../TerminateNSTaskWorkflow.robot | 2 -- .../Notifications.robot | 6 ++-- .../Notifications.robot | 17 ++++----- 19 files changed, 160 insertions(+), 88 deletions(-) diff --git a/SOL002/VNFFaultManagement-API/Notifications.robot b/SOL002/VNFFaultManagement-API/Notifications.robot index 3c7b41fe2..c0c2de23c 100644 --- a/SOL002/VNFFaultManagement-API/Notifications.robot +++ b/SOL002/VNFFaultManagement-API/Notifications.robot @@ -113,8 +113,9 @@ Configure Notification Alarm List Rebuilt Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -123,8 +124,9 @@ Configure Notification Alarm Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -133,8 +135,9 @@ Configure Notification Alarm Cleareance Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL002/VNFIndicatorNotification-API/Notifications.robot b/SOL002/VNFIndicatorNotification-API/Notifications.robot index 127a28638..8f0c9bc8e 100644 --- a/SOL002/VNFIndicatorNotification-API/Notifications.robot +++ b/SOL002/VNFIndicatorNotification-API/Notifications.robot @@ -61,8 +61,9 @@ Configure Notification Indicator Value Change Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL002/VNFLifecycleManagement-API/Notifications.robot b/SOL002/VNFLifecycleManagement-API/Notifications.robot index 54704f213..45251879f 100644 --- a/SOL002/VNFLifecycleManagement-API/Notifications.robot +++ b/SOL002/VNFLifecycleManagement-API/Notifications.robot @@ -97,8 +97,9 @@ Configure Notification VNF LCM Operation Occurrence Start Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is @@ -119,8 +120,9 @@ Configure Notification VNF LCM Operation Occurrence Result Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is @@ -141,8 +143,9 @@ Configure Notification VNF Identifier Creation Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is @@ -163,8 +166,9 @@ Configure Notification VNF Identifier Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is diff --git a/SOL002/VNFPerformanceManagementNotification-API/Notifications.robot b/SOL002/VNFPerformanceManagementNotification-API/Notifications.robot index 58a7d9039..195525e9a 100644 --- a/SOL002/VNFPerformanceManagementNotification-API/Notifications.robot +++ b/SOL002/VNFPerformanceManagementNotification-API/Notifications.robot @@ -86,8 +86,9 @@ Configure Notification Performance Information Available Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -96,8 +97,9 @@ Configure Notification Threshold Crossed Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFFaultManagementNotification-API/Notifications.robot b/SOL003/VNFFaultManagementNotification-API/Notifications.robot index f199cb964..314eb7487 100644 --- a/SOL003/VNFFaultManagementNotification-API/Notifications.robot +++ b/SOL003/VNFFaultManagementNotification-API/Notifications.robot @@ -113,8 +113,9 @@ Configure Notification Alarm List Rebuilt Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -123,8 +124,9 @@ Configure Notification Alarm Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -133,8 +135,9 @@ Configure Notification Alarm Cleareance Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFIndicator-API/Notifications.robot b/SOL003/VNFIndicator-API/Notifications.robot index 1e5e19e92..4338e884c 100644 --- a/SOL003/VNFIndicator-API/Notifications.robot +++ b/SOL003/VNFIndicator-API/Notifications.robot @@ -49,8 +49,9 @@ Configure Notification Indicator Value Change Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFLifecycleManagement-API/Notifications.robot b/SOL003/VNFLifecycleManagement-API/Notifications.robot index ebf4f10bc..b98745d5d 100644 --- a/SOL003/VNFLifecycleManagement-API/Notifications.robot +++ b/SOL003/VNFLifecycleManagement-API/Notifications.robot @@ -97,8 +97,9 @@ Configure Notification VNF LCM Operation Occurrence Start Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is @@ -119,8 +120,9 @@ Configure Notification VNF LCM Operation Occurrence Result Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is @@ -141,8 +143,9 @@ Configure Notification VNF Identifier Creation Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is @@ -163,8 +166,9 @@ Configure Notification VNF Identifier Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is diff --git a/SOL003/VNFPackageManagement-API/Notifications.robot b/SOL003/VNFPackageManagement-API/Notifications.robot index c25964625..e5e84f2ff 100644 --- a/SOL003/VNFPackageManagement-API/Notifications.robot +++ b/SOL003/VNFPackageManagement-API/Notifications.robot @@ -118,8 +118,9 @@ Configure Notification Onboarding Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Delete Handler @@ -128,8 +129,9 @@ Configure Notification Delete Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Change Status Handler @@ -138,8 +140,9 @@ Configure Notification Change Status Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFPerformanceManagement-API/Notifications.robot b/SOL003/VNFPerformanceManagement-API/Notifications.robot index a9b8c9a63..b8c5b3d6f 100644 --- a/SOL003/VNFPerformanceManagement-API/Notifications.robot +++ b/SOL003/VNFPerformanceManagement-API/Notifications.robot @@ -85,8 +85,9 @@ Configure Notification Performance Information Available Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -95,8 +96,9 @@ Configure Notification Threshold Crossed Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot index 60f9d33b9..9235ba1a3 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot @@ -46,7 +46,7 @@ Configure Virtual Quota Available Notification Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - Set Global Variable ${req} ${notification_request} + Set Global Variable ${notification_request} ${req} &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} diff --git a/SOL005/NSDManagement-API/Notifications.robot b/SOL005/NSDManagement-API/Notifications.robot index c3cd03770..e6d214945 100644 --- a/SOL005/NSDManagement-API/Notifications.robot +++ b/SOL005/NSDManagement-API/Notifications.robot @@ -222,8 +222,9 @@ Configure PNFD Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Deletion Handler @@ -232,8 +233,9 @@ Configure NSD Deletion Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Operational State Change Handler @@ -242,8 +244,9 @@ Configure NSD Operational State Change Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure PNFD Onboarding Handler @@ -252,8 +255,9 @@ Configure PNFD Onboarding Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification PNFD Onboarding Failure Handler @@ -262,8 +266,9 @@ Configure Notification PNFD Onboarding Failure Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Onboarding Handler @@ -272,8 +277,9 @@ Configure NSD Onboarding Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification NSD Onboarding Failure Handler @@ -282,8 +288,9 @@ Configure Notification NSD Onboarding Failure Handler 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSFaultManagement-API/Notifications.robot b/SOL005/NSFaultManagement-API/Notifications.robot index e0c28d721..fcdd6e072 100644 --- a/SOL005/NSFaultManagement-API/Notifications.robot +++ b/SOL005/NSFaultManagement-API/Notifications.robot @@ -53,14 +53,14 @@ NS Fault Alarm List Rebuilt Notification Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification -NS Fault Alarm Notification with instrumental platform hook +NS Fault Alarm Notification with Instrumental Platform Hook [Documentation] Test ID: 5.3.3.5.4 - ... Test title: NS Fault Alarm Notification with instrumental platform hook - ... Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource within an NS instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm notifications is available in the NFVO. + ... Test title: NS Fault Alarm Notification with Instrumental Platform Hook + ... Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource within an NS instance failure is automatically triggerd through an instrumenation platform, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance is instantiated ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 ... Config ID: Config_prod_NFVO - ... Applicability: none + ... Applicability: An instrumentation platform is available to trigger the NS instance failure condition ... Post-Conditions: none Trigger the fault of a virtualised resource in the NS instance Check Instrumentation Platform Alarm Notification Http POST Request Body Json Schema Is alarmNotification diff --git a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot index 8169b723f..c51eff200 100644 --- a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot @@ -5,6 +5,9 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** NS Instance Creation @@ -15,11 +18,13 @@ NS Instance Creation ... Reference: Clause 6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management operation occurrence is in NOT_ISTANTIATED state + ... Post-Conditions: The NS resource is in NOT_ISTANTIATED state POST New nsInstance Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is NsInstance + Check Notification Http POST Request Body Json Schema Is NsIdentifierCreationNotification + Check Notification Http POST Request Body notificationType attribute Is NsIdentifierCreationNotification Check resource not_instantiated NS Instance Creation with DISABLED Network Service Descriptor @@ -27,9 +32,9 @@ NS Instance Creation with DISABLED Network Service Descriptor ... Test title: NS Instance Creation with DISABLED Network Service Descriptor ... Test objective: The objective is to test the workflow for Creating a NS instance with a disabled NSD ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in disabled operational state. - ... Reference: Clauses 6.4.2.3.1 and 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clauses 6.4.2.3.1 and 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none POST New nsInstance with DISABLED nsd - Check HTTP Response Status Code Is 409 \ No newline at end of file + Check HTTP Response Status Code Is 409 diff --git a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot index 889975a91..40b7de31a 100644 --- a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot @@ -5,6 +5,9 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** NS Instance Deletion @@ -16,7 +19,9 @@ NS Instance Deletion ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS Instance resource is deleted - Check resource not_instantiated DELETE IndividualNSInstance Check HTTP Response Status Code Is 204 + Check Notification Http POST Request Body Json Schema Is NsIdentifierDeletionNotification + Check Notification Http POST Request Body notificationType attribute Is NsIdentifierDeletionNotification Check Postcondition NS instance is deleted + diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index cf5f5977d..bbde72695 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -107,7 +107,8 @@ Configure Notification Status Handler Run Keyword If '${status}' != "" set to dictionary ${json["notificationStatus"]} dp=${status} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle ${endpoint} - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} &{headers} = Create Dictionary "Content-Type"="application/json" &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -1611,4 +1612,30 @@ Check Postcondition VNF Snapshot Resource Is Deleted Check Postcondition VNF Snapshot Resource Existence Get individual VNF Snapshot Integer response status 200 - Log VNF Snapshot Resource is not deleted \ No newline at end of file + Log VNF Snapshot Resource is not deleted + +Check 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 Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS Creation Deletion Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS Creation Deletion 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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + + diff --git a/SOL005/NSLifecycleManagement-API/Notifications.robot b/SOL005/NSLifecycleManagement-API/Notifications.robot index f4b0ee615..ba6fa836a 100644 --- a/SOL005/NSLifecycleManagement-API/Notifications.robot +++ b/SOL005/NSLifecycleManagement-API/Notifications.robot @@ -97,7 +97,8 @@ Configure Notification NS LCM Operation Occurrence Start Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} &{headers}= Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -120,7 +121,8 @@ Configure Notification NS LCM Operation Occurrence Result Handler set to dictionary ${json} notificationType ${type} changeType ${status} ${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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} &{headers}= Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -143,7 +145,8 @@ Configure Notification NS Identifier Creation Handler 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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} &{headers}= Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -166,7 +169,8 @@ Configure Notification NS Identifier Deletion Handler 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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} &{headers}= Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot index 0bae43586..b6bd1278c 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot @@ -18,8 +18,6 @@ Terminate Flow of NS lifecycle management operations ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: the resource is in NOT_INSTANTIATED state - Check resource existence - Check resource instantiated POST Terminate NSInstance Check HTTP Response Status Code Is 202 Check Operation Occurrence Id diff --git a/SOL005/NSPerformanceManagement-API/Notifications.robot b/SOL005/NSPerformanceManagement-API/Notifications.robot index 3caa778fe..82e77fc74 100644 --- a/SOL005/NSPerformanceManagement-API/Notifications.robot +++ b/SOL005/NSPerformanceManagement-API/Notifications.robot @@ -85,7 +85,8 @@ Configure Notification Performance Information Available Handler 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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} &{headers} = Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} @@ -96,7 +97,8 @@ Configure Notification Threshold Crossed Handler 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} + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} &{headers} = Create Dictionary Content-Type=application/json &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} diff --git a/SOL005/VNFPackageManagement-API/Notifications.robot b/SOL005/VNFPackageManagement-API/Notifications.robot index 25e1d9790..77f29f526 100644 --- a/SOL005/VNFPackageManagement-API/Notifications.robot +++ b/SOL005/VNFPackageManagement-API/Notifications.robot @@ -118,9 +118,9 @@ Configure Notification Onboarding Handler 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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Set Suite Variable ${notification_request} ${notification_request} @@ -130,9 +130,9 @@ Configure Notification Delete Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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} - &{headers} = Create Dictionary Content-Type=application/json - &{notification_response}= Create Mock Response headers=${headers} status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Change Status Handler @@ -141,8 +141,9 @@ Configure Notification Change Status Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${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 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${notification_request} ${req} + &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward -- GitLab From 5c2db07890fbe2a3129aea0b813afd11b715f95e Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Thu, 10 Jun 2021 15:46:32 +0200 Subject: [PATCH 5/5] upd on Instrumentation platform hooks --- .../NSFaultManagement-API/Notifications.robot | 71 +++++++++++++++---- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/SOL005/NSFaultManagement-API/Notifications.robot b/SOL005/NSFaultManagement-API/Notifications.robot index fcdd6e072..c00298038 100644 --- a/SOL005/NSFaultManagement-API/Notifications.robot +++ b/SOL005/NSFaultManagement-API/Notifications.robot @@ -52,11 +52,10 @@ NS Fault Alarm List Rebuilt Notification 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 - NS Fault Alarm Notification with Instrumental Platform Hook [Documentation] Test ID: 5.3.3.5.4 ... Test title: NS Fault Alarm Notification with Instrumental Platform Hook - ... Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource within an NS instance failure is automatically triggerd through an instrumenation platform, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource failure within an NS instance is automatically triggered through an instrumenation platform, and perform a JSON schema and content validation of the delivered notification. ... Pre-conditions: A NS instance is instantiated ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 ... Config ID: Config_prod_NFVO @@ -66,12 +65,51 @@ NS Fault Alarm Notification with Instrumental Platform Hook Check Instrumentation Platform Alarm Notification Http POST Request Body Json Schema Is alarmNotification Check Instrumentation Platform Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification +NS Fault Alarm Cleared Notification with Instrumental Platform Hook + [Documentation] Test ID: 5.3.3.5.5 + ... Test title: NS Fault Alarm Cleared Notification with Instrumental Platform Hook + ... Test objective: The objective is to test the dispatch of NS Fault Clear Alarm Notification when a virtualised resource failure within an NS instance is automatically cleared through an instrumenation platform, and perform a JSON schema and content validation of the delivered notification. + ... Pre-conditions: A NS instance is instantiated and a virtualised resource is in faulty state. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: An instrumentation platform is available to trigger the NS instance failure clear condition + ... Post-Conditions: none + Trigger the fault cleared of a virtualised resource in the NS instance + Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification + Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification + +NS Fault Alarm List Rebuilt Notification with Instrumental Platform Hook + [Documentation] Test ID: 5.3.3.5.6 + ... Test title: NS Fault Alarm List Rebuilt Notification with Instrumental Platform Hook + ... Test objective: The objective is to test the dispatch of NS Fault Alarm List Rebuilt Notification when the NFVO decision to rebuild the list of its NS alarms is automatically triggered through an instrumentation platform, and perform a JSON schema and content validation of the delivered notification. + ... Pre-conditions: A NS instance is instantiated and one or more virtualised resource are in faulty state + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: An instrumentation platform is available to trigger the NS instance alarm list rebuilt condition + ... Post-Conditions: none + Trigger the NS fault alarm list rebuild in the NFVO + Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification + Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification + *** Keywords *** Trigger the fault of a virtualised resource in the NS instance + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported Create Alarm Subscription AlarmNotification &{keyvalues} Create Dictionary eventType=COMMUNICATIONS_ALARM delay=10s Trigger instrumentation platform ${upperTesterUrlForAlarmNotifications} ${nsInstanceIdForNotifications} nsInstance AlarmNotification null &{keyvalues} +Trigger the fault cleared of a virtualised resource in the NS instance + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Create Alarm Subscription AlarmClearedNotification + &{keyvalues} Create Dictionary eventType=COMMUNICATIONS_ALARM delay=10s + Trigger instrumentation platform ${upperTesterUrlForAlarmNotifications} ${nsInstanceIdForNotifications} nsInstance AlarmClearedNotification null &{keyvalues} + +Trigger the NS fault alarm list rebuild in the NFVO + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Create Alarm Subscription AlarmListRebuiltNotification + &{keyvalues} Create Dictionary eventType=COMMUNICATIONS_ALARM delay=10s + Trigger instrumentation platform ${upperTesterUrlForAlarmNotifications} ${nsInstanceIdForNotifications} nsInstance AlarmListRebuiltNotification null &{keyvalues} + Trigger the fault of a virtualised resource in the NS instance (external action) #do nothing Log do nothing @@ -95,6 +133,16 @@ Check Alarm List Rebuilt Notification Http POST Request Body notificationType at Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Clear Requests ${callback_endpoint_fwd} + +Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is ${element} + +Check Instrumentation Platform Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is ${type} Check Alarm Notification Http POST Request Body Json Schema Is [Arguments] ${element} @@ -106,7 +154,6 @@ Check Instrumentation Platform Alarm Notification Http POST Request Body Json Sc Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported Check Alarm Notification Http POST Request Body Json Schema Is ${element} - Check Alarm Notification Http POST Request Body notificationType attribute Is [Arguments] ${type} Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type} @@ -124,6 +171,15 @@ Check Alarm cleared Notification Http POST Request Body Json Schema Is ${schema}= Get File schemas/${element}.schema.json Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} +Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Check Alarm cleared Notification Http POST Request Body Json Schema Is ${element} + +Check Instrumentation Platform Alarm Cleared Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Pass Execution If ${instrumentationPlatformSkip} Skip Test step -- Instrumentation platform not supported + Check Alarm cleared Notification Http POST Request Body notificationType attribute Is ${type} Check Alarm cleared Notification Http POST Request Body notificationType attribute Is [Arguments] ${type} @@ -131,13 +187,6 @@ Check Alarm cleared Notification Http POST Request Body notificationType attribu 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} @@ -182,8 +231,6 @@ Configure Notification Forward &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} - - Create Alarm Subscription [Arguments] ${notificationType} Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions -- GitLab