diff --git a/SOL002/VNFFaultManagement-API/Notifications.robot b/SOL002/VNFFaultManagement-API/Notifications.robot index 3c7b41fe2e65c5685776a19a14aaf20f25fc5b42..c0c2de23c17b167a544e0e2e19a7521fab1bf435 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 127a286381b5cb342f2715d372595b8c579c08ab..8f0c9bc8e76f45fb64e14b56e387bd7f5a5a6b4c 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 54704f213d096783a445ba77a6e4df8b0d781238..45251879f3870332c46e2f96e68e7f2d9c0f314f 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 58a7d9039124a3cbf90069d244a6b298197481eb..195525e9aa2ff9dec43b2c1fc2c78b38b34d74c8 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 f199cb964018054086a6e9ddf0c9e3e022ef9e48..314eb7487b53068655c2725b935abeeda3902ddd 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 1e5e19e92c17258554bcb743ca34b6f9fcbe9b78..4338e884ccf1590883187edb8b4539263e9a19e4 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 ebf4f10bc89a3747a78627dee47143e9a9d98700..b98745d5df178a48ea6591f17bb71e2055a0b560 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 c2596462579a97b23eae7ebbc5388ac7cb642a96..e5e84f2ffb45ac7cd1aeb48904467109c40dfe04 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 a9b8c9a636936067dfb78ff195fefa88a5001d4c..b8c5b3d6f85a5f43bc55ac90cd447036dca8d7e4 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 60f9d33b93ee769dbbceb128e7a0c73f142d58c6..9235ba1a31195c30c2766d91a978b07d879aa3e5 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 c3cd03770fa779851e10d85127ce98ba6462a04b..e6d214945a80fa41e9734b6b093d43f50c35b0de 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 3e811a2a358821b72eb1a244c2cfc359951fb6a9..c00298038c7ad2f392c5a5513f8a6085ddc87237 100644 --- a/SOL005/NSFaultManagement-API/Notifications.robot +++ b/SOL005/NSFaultManagement-API/Notifications.robot @@ -1,11 +1,13 @@ *** Settings *** Resource environment/variables.txt -Resource NSFMOperationKeywords.robot +Resource NSFMOperationKeywords.robot +Resource ../../instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot 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 @@ -50,8 +52,64 @@ 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 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 + ... 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 + 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 @@ -75,12 +133,27 @@ 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} ${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} @@ -88,11 +161,25 @@ 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 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} @@ -100,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} @@ -114,9 +194,10 @@ 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 ${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 @@ -125,9 +206,10 @@ 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 ${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 @@ -136,9 +218,10 @@ 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 ${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 @@ -147,3 +230,22 @@ 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} + \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index d21d1421a890334d33e0cdcbe72d4b9f56be318e..2341a7553058ec6a8f75e028f79ff0d42acc17bb 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 @@ -65,3 +65,10 @@ ${notification_request} [] ${notification_response} [] ${callbackResp} 127.0.0.1 + + + +### Instrumentation platform variables +${nsInstanceIdForNotifications} SOME-ID +${upperTesterUrlForAlarmNotifications} http://localhost:9999/uppertester +${instrumentationPlatformSkip} True \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json index e9a8b3b0120b63ec56eaa8e2330b2f9f14f8c08d..fcbf70daeabc667ebdd8aed771ed4cb5ac7fb749 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 0000000000000000000000000000000000000000..41799f6e21aa9cfd068f8b9e021491cdd4d2571d --- /dev/null +++ b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequestForInstrumentationPlatform.json @@ -0,0 +1,12 @@ +{{ + "filter": {{ + "nsInstanceSubscriptionFilter": {{ + "nsInstanceIds": ["{nsInstanceId}"] + }}, + "notificationTypes": [ + "{notificationType}" + ] + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} + diff --git a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot index 8169b723ff55fd1f82ae4602e2e1127e1bbc1a55..c51eff2004abd67526a8e083718f4596eff5d481 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 889975a911ad11b03a4c63f416b65990e4169f71..40b7de31a71cce16e3dd9f49756ce3295b87893e 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 cf5f5977def0ba2fbacaffc71cc28a64c8beceef..bbde72695fcdc135a2dc8d6af1deaa83c536cbf8 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 f4b0ee615730bba68946aeb01e3ba6d7414741ba..ba6fa836a09217647d050bebdee07679d4697373 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 0bae43586c7f3f9d90a51697f9a62ae2cacaf165..b6bd1278ca623bb4ad423b831df8bb07d75d3ed0 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 3caa778febe79990e3cee205fc5674897475bf8b..82e77fc7497a31b4c06f1508e0883e2db07d9d9a 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 25e1d979016b80360ecb1c0ceb37b3321edab91a..77f29f526d51408a7a98298535eefda32d8b022a 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 diff --git a/instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot b/instrumentationPlatformHooks/InstrumentationPlatformHooksKeywords.robot new file mode 100644 index 0000000000000000000000000000000000000000..2020335adb8cd76c5d019730a56929baf7368d64 --- /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 0000000000000000000000000000000000000000..de161fa560d4ec7903c71fb950aec94bb6aaded8 --- /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/instrumentationPlatformHooks/jsons/AlarmNotificationUpperTester.json b/instrumentationPlatformHooks/jsons/AlarmNotificationUpperTester.json new file mode 100644 index 0000000000000000000000000000000000000000..68ab8fe2e181ef21ea085e96d5b0e4ee9b8744f0 --- /dev/null +++ b/instrumentationPlatformHooks/jsons/AlarmNotificationUpperTester.json @@ -0,0 +1,7 @@ +{{ + "resourceId":"{resourceId}", + "resourceType":"{resourceType}", + "event":"{event}", + "value":"{value}", + "keyvalue": "{keyvalues}" +}}