From 5b0e5e22ed48a6b3cce28c56d53bbbac0c7c8da8 Mon Sep 17 00:00:00 2001 From: zafar Date: Mon, 23 Nov 2020 18:39:40 +0500 Subject: [PATCH 1/5] Fix for 'Incorrect API version endpoints' bug --- .../ApiVersion.robot | 20 +++++++++---------- .../NFVMANOLogManagement-API/ApiVersion.robot | 20 +++++++++---------- .../ApiVersion.robot | 20 +++++++++---------- .../ApiVersion.robot | 20 +++++++++---------- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/SOL009/NFVMANOFaultManagement-API/ApiVersion.robot b/SOL009/NFVMANOFaultManagement-API/ApiVersion.robot index 0dde1341d..fc51479fd 100644 --- a/SOL009/NFVMANOFaultManagement-API/ApiVersion.robot +++ b/SOL009/NFVMANOFaultManagement-API/ApiVersion.robot @@ -132,70 +132,70 @@ DELETE API Version with apiMajorVerion - Method not implemented POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version + Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version + Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version + Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version + Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version + Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL009/NFVMANOLogManagement-API/ApiVersion.robot b/SOL009/NFVMANOLogManagement-API/ApiVersion.robot index f97546b9e..ddd681ced 100644 --- a/SOL009/NFVMANOLogManagement-API/ApiVersion.robot +++ b/SOL009/NFVMANOLogManagement-API/ApiVersion.robot @@ -132,70 +132,70 @@ DELETE API Version with apiMajorVerion - Method not implemented POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version + Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version + Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version + Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version + Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version + Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot b/SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot index 104a87b26..466df91ae 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/ApiVersion.robot @@ -132,70 +132,70 @@ DELETE API Version with apiMajorVerion - Method not implemented POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version + Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version + Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version + Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version + Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version + Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/ApiVersion.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/ApiVersion.robot index b9c86942f..35c195242 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/ApiVersion.robot +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/ApiVersion.robot @@ -132,70 +132,70 @@ DELETE API Version with apiMajorVerion - Method not implemented POST API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version + Post ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version + Get ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version + Put ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version + Patch ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version + Delete ${apiRoot}/${apiName}/api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -- GitLab From 65ce0f6ebad5f331df4c6ffaf66c6d578855a002 Mon Sep 17 00:00:00 2001 From: uihassan Date: Tue, 24 Nov 2020 16:10:14 +0500 Subject: [PATCH 2/5] New Resource NotificationConsumer added in NFV-MANO CIM --- .../NotificationConsumer.robot | 69 +++++++++++++++++++ .../environment/variables.txt | 4 +- .../jsons/ChangeStateNotification.json | 18 +++++ .../jsons/InformationChangedNotification.json | 12 ++++ 4 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot create mode 100644 SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/ChangeStateNotification.json create mode 100644 SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/InformationChangedNotification.json diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot new file mode 100644 index 000000000..57923c351 --- /dev/null +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot @@ -0,0 +1,69 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Information Changed Notification + [Documentation] Test ID: 8.3.1.14.1 + ... Test title: Information Changed Notification + ... Test objective: The objective is to test that Information Changed Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for information availability notification is available in the NFV-MANO. + ... Reference: clause 5.5.6.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + POST Information Changed Notification + Check HTTP Response Status Code Is 204 + +Change State Notification + [Documentation] Test ID: 8.3.1.14.2 + ... Test title: Change State Notification + ... Test objective: The objective is to test that Change State Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for change state notification is available in the NFV-MANO. + ... Reference: clause 5.5.6.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + POST Change State Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Integer response status 200 + Validate Json response body CimSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Information Changed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/InformationChangedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Change State Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/ChangeStateNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} changeStateOpOccId=${changeStateOpOccId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt b/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt index e94ee646d..35efe08ef 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt @@ -64,4 +64,6 @@ ${state} operational ${stateAction} START ${retry} 2 min -${polling} 10 sec \ No newline at end of file +${polling} 10 sec + +${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/ChangeStateNotification.json b/SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/ChangeStateNotification.json new file mode 100644 index 000000000..c034b3bef --- /dev/null +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/ChangeStateNotification.json @@ -0,0 +1,18 @@ +{{ + "id": "", + "notificationType": "ChangeStateNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "changeStateOpOccId": "{changeStateOpOccId}", + "stateChangedTime": "", + "changeStateOperationState": "PROCESSING", + "managedObjectRef": {{ + "type": "", + "objectId": "" + }} + "_links": {{ + "subscription": "" + "objectInstance": "", + "changeStateOpOcc": "" + }} +}} \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/InformationChangedNotification.json b/SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/InformationChangedNotification.json new file mode 100644 index 000000000..4a1bd88e9 --- /dev/null +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/jsons/InformationChangedNotification.json @@ -0,0 +1,12 @@ +{{ + "id": "", + "notificationType": "InformationChangedNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "informationChangedTime": "", + "manoEntityId": "", + "changedInfo": "", + "_links": {{ + "subscription": "" + }} +}} \ No newline at end of file -- GitLab From fdcfe12d3b7a4e06db5901e1845a41697eba422b Mon Sep 17 00:00:00 2001 From: zafar Date: Tue, 24 Nov 2020 18:09:25 +0500 Subject: [PATCH 3/5] New Resource NotificationConsumer added in NFV-MANO PM --- .../NotificationConsumer.robot | 78 +++++++++++++++++++ ...ceInformationAvailabilityNotification.json | 14 ++++ .../jsons/ThresholdCrossedNotification.json | 17 ++++ .../NotificationConsumer.robot | 2 +- 4 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot create mode 100644 SOL009/NFVMANOPerformanceManagement-API/jsons/PerformanceInformationAvailabilityNotification.json create mode 100644 SOL009/NFVMANOPerformanceManagement-API/jsons/ThresholdCrossedNotification.json diff --git a/SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot b/SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot new file mode 100644 index 000000000..5ae44b57e --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot @@ -0,0 +1,78 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource environment/individualThresholds.txt +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Suite Setup Check resource existence and get CallbackUri + + +*** Test Cases *** +Performance Information Available Notification + [Documentation] Test ID: 8.3.2.10.1 + ... Test title: Performance Information Available Notification + ... Test objective: The objective is to test that Performance Available Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for performance available notification is available in the NFV-MANO. + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + POST Performance Information Available Notification + Check HTTP Response Status Code Is 204 + +Threshold Crossed Notification + [Documentation] Test ID: 8.3.2.10.2 + ... Test title: Threshold Crossed Notification + ... Test objective: The objective is to test that Threshold Crossed Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for threshold crosssed notification is available in the NFV-MANO. + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + POST Threshold Crossed Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body PmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +POST Performance Information Available Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/PerformanceInformationAvailabilityNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} objectInstanceId=${objectInstanceIds} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Threshold Crossed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/ThresholdCrossedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} thresholdId=${thresholdId} objectInstanceId=${objectInstanceIds} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + + + + + + + diff --git a/SOL009/NFVMANOPerformanceManagement-API/jsons/PerformanceInformationAvailabilityNotification.json b/SOL009/NFVMANOPerformanceManagement-API/jsons/PerformanceInformationAvailabilityNotification.json new file mode 100644 index 000000000..5be4a1a38 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/jsons/PerformanceInformationAvailabilityNotification.json @@ -0,0 +1,14 @@ +{{ + "id": "", + "notificationType": "PerformanceInformationAvailableNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "objectType": "", + "objectInstanceId": "{objectInstanceId}", + "_links": {{ + "subscription": "" + "objectInstance": "", + "pmJob": "", + "performanceReport": "" + }} +}} \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/jsons/ThresholdCrossedNotification.json b/SOL009/NFVMANOPerformanceManagement-API/jsons/ThresholdCrossedNotification.json new file mode 100644 index 000000000..8984e0f66 --- /dev/null +++ b/SOL009/NFVMANOPerformanceManagement-API/jsons/ThresholdCrossedNotification.json @@ -0,0 +1,17 @@ +{{ + "id": "", + "notificationType": "ThresholdCrossedNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "thresholdId": "{thresholdId}", + "crossingDirection": "UP", + "objectType": "", + "objectInstanceId": "{objectInstanceId}", + "performanceMetric": "", + "performanceValue": "", + "_links": {{ + "subscription": "" + "objectInstance": "", + "threshold": "" + }} +}} \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot index 57923c351..f7a1578f7 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot @@ -36,7 +36,7 @@ Check resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Validate Json response body CimSubscription.schema.json Set Global Variable ${callbackResp} response body callbackUri -- GitLab From f738a74dffb1ca58d84adedae38e345718976c90 Mon Sep 17 00:00:00 2001 From: zafar Date: Wed, 25 Nov 2020 16:33:48 +0500 Subject: [PATCH 4/5] New 'NotificationConsumer' resources added in NFV-MANO LM & FM interfaces --- .../NotificationConsumer.robot | 93 +++++++++++++++++++ .../environment/variables.txt | 4 +- .../jsons/AlarmClearedNotification.json | 12 +++ .../jsons/AlarmListRebuiltNotification.json | 10 ++ .../jsons/AlarmNotification.json | 21 +++++ .../NotificationConsumer.robot | 46 +++++++++ .../environment/variables.txt | 4 +- .../jsons/LogReportAvailableNotification.json | 12 +++ 8 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot create mode 100644 SOL009/NFVMANOFaultManagement-API/jsons/AlarmClearedNotification.json create mode 100644 SOL009/NFVMANOFaultManagement-API/jsons/AlarmListRebuiltNotification.json create mode 100644 SOL009/NFVMANOFaultManagement-API/jsons/AlarmNotification.json create mode 100644 SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot create mode 100644 SOL009/NFVMANOLogManagement-API/jsons/LogReportAvailableNotification.json diff --git a/SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot b/SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot new file mode 100644 index 000000000..83972fbec --- /dev/null +++ b/SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot @@ -0,0 +1,93 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Alarm Notification + [Documentation] Test ID: 8.3.3.7.1 + ... Test title: Alarm Notification + ... Test objective: The objective is to test that Alarm Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for alarm notification is available in the NFV-MANO. + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Notification + Check HTTP Response Status Code Is 204 + +Alarm Cleared Notification + [Documentation] Test ID: 8.3.3.7.2 + ... Test title: Alarm Cleared Notification + ... Test objective: The objective is to test that Alarm Cleared Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for alarm cleared notification is available in the NFV-MANO. + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Cleared Notification + Check HTTP Response Status Code Is 204 + +Alarm List Rebuilt Notification + [Documentation] Test ID: 8.3.3.7.3 + ... Test title: Alarm List Rebuilt Notification + ... Test objective: The objective is to test that Alarm List Rebuilt Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for alarm list rebuilt notification is available in the NFV-MANO. + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm List Rebuilt Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body FmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Alarm Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/AlarmNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} managedObjectId=${managedObjectId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm Cleared Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/AlarmClearedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm List Rebuilt Notification + log Trying to perform a POST to get notifications + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/AlarmListRebuiltNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + diff --git a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt index fdb1ee9d3..e230f9438 100644 --- a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt @@ -48,4 +48,6 @@ ${polling_interval} 10 sec ${notification_request} [] ${notification_response} [] -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL009/NFVMANOFaultManagement-API/jsons/AlarmClearedNotification.json b/SOL009/NFVMANOFaultManagement-API/jsons/AlarmClearedNotification.json new file mode 100644 index 000000000..456d44801 --- /dev/null +++ b/SOL009/NFVMANOFaultManagement-API/jsons/AlarmClearedNotification.json @@ -0,0 +1,12 @@ +{{ + "id": "", + "notificationType": "AlarmClearedNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "alarmId": "{alarmId}", + "alarmClearedTime": "", + "_links": {{ + "subscription": "", + "alarm": "" + }} +}} \ No newline at end of file diff --git a/SOL009/NFVMANOFaultManagement-API/jsons/AlarmListRebuiltNotification.json b/SOL009/NFVMANOFaultManagement-API/jsons/AlarmListRebuiltNotification.json new file mode 100644 index 000000000..11ec0adb8 --- /dev/null +++ b/SOL009/NFVMANOFaultManagement-API/jsons/AlarmListRebuiltNotification.json @@ -0,0 +1,10 @@ +{{ + "id": "", + "notificationType": "AlarmListRebuiltNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "_links": {{ + "subscription": "", + "alarms": "" + }} +}} \ No newline at end of file diff --git a/SOL009/NFVMANOFaultManagement-API/jsons/AlarmNotification.json b/SOL009/NFVMANOFaultManagement-API/jsons/AlarmNotification.json new file mode 100644 index 000000000..65510f3f9 --- /dev/null +++ b/SOL009/NFVMANOFaultManagement-API/jsons/AlarmNotification.json @@ -0,0 +1,21 @@ +{{ + "id": "", + "notificationType": "AlarmNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "alarm": {{ + "id": "{alarmId}", + "managedObjectId": "{managedObjectId}", + "perceivedSeverity": "MAJOR", + "eventTime": "", + "eventType": "COMMUNICATIONS_ALARM", + "probableCause": "", + "isRootCause": "TRUE", + "_links": {{ + "self": "" + }} + }}, + "_links": {{ + "subscription": "" + }} +}} \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot b/SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot new file mode 100644 index 000000000..b89a0eee1 --- /dev/null +++ b/SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot @@ -0,0 +1,46 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library OperatingSystem +Library JSONLibrary +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Log Report Available Notification + [Documentation] Test ID: 8.3.4.9.1 + ... Test title: Log Report Available Notification + ... Test objective: The objective is to test that Log Report Available Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for log report available notification is available in the NFV-MANO. + ... Reference: clause 8.5.9.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Log Report Available Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body LogmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Log Report Available Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/LogReportAvailableNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} objectInstanceId=${objectInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL009/NFVMANOLogManagement-API/environment/variables.txt b/SOL009/NFVMANOLogManagement-API/environment/variables.txt index 82c8646ff..0b09b860f 100644 --- a/SOL009/NFVMANOLogManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOLogManagement-API/environment/variables.txt @@ -63,4 +63,6 @@ ${erroneousSubscriptionId} erroneousSubscriptionId ${newSubscriptionId} newSubsciptionId ${objectInstanceId} 4bd7-94b4-6bbb86-9c79aa -${notification_type} LogReportAvailableNotification \ No newline at end of file +${notification_type} LogReportAvailableNotification + +${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/jsons/LogReportAvailableNotification.json b/SOL009/NFVMANOLogManagement-API/jsons/LogReportAvailableNotification.json new file mode 100644 index 000000000..d585acf56 --- /dev/null +++ b/SOL009/NFVMANOLogManagement-API/jsons/LogReportAvailableNotification.json @@ -0,0 +1,12 @@ +{{ + "id": "", + "notificationType": "LogReportAvailableNotification", + "subscriptionId": "{subscriptionId}", + "timeStamp": "", + "objectInstanceId": "{objectInstanceId}", + "_links": {{ + "subscription": "", + "LoggingJob": "", + "logReports": [] + }} +}} \ No newline at end of file -- GitLab From 6d54ab275c8f30413eb72ba10a6978caae56a14a Mon Sep 17 00:00:00 2001 From: zafar Date: Thu, 26 Nov 2020 13:31:13 +0500 Subject: [PATCH 5/5] Minor errors resolved. All tests validated. --- .../NotificationConsumer.robot | 9 +++++---- .../NFVMANOLogManagement-API/NotificationConsumer.robot | 1 + .../NotificationConsumer.robot | 1 + .../environment/variables.txt | 4 +++- .../NotificationConsumer.robot | 1 + requirements.txt | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot b/SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot index 83972fbec..3784c1612 100644 --- a/SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot +++ b/SOL009/NFVMANOFaultManagement-API/NotificationConsumer.robot @@ -4,6 +4,7 @@ Resource environment/variables.txt Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary +Library String Suite Setup Check resource existence and get CallbackUri *** Test Cases *** @@ -46,7 +47,7 @@ Alarm List Rebuilt Notification *** Keywords *** Check resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 @@ -61,7 +62,7 @@ Check HTTP Response Status Code Is Post Alarm Notification log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/AlarmNotification.json ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} managedObjectId=${managedObjectId} @@ -72,7 +73,7 @@ Post Alarm Notification Post Alarm Cleared Notification log Trying to perform a POST to get notification Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/AlarmClearedNotification.json ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} @@ -83,7 +84,7 @@ Post Alarm Cleared Notification Post Alarm List Rebuilt Notification log Trying to perform a POST to get notifications Set Headers {"Accept":"${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/AlarmListRebuiltNotification.json ${body}= Format String ${template} subscriptionId=${subscriptionId} diff --git a/SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot b/SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot index b89a0eee1..f124cf4b9 100644 --- a/SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot +++ b/SOL009/NFVMANOLogManagement-API/NotificationConsumer.robot @@ -4,6 +4,7 @@ Resource environment/variables.txt Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary +Library String Suite Setup Check resource existence and get CallbackUri *** Test Cases *** diff --git a/SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot b/SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot index 5ae44b57e..9fcc1ca51 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/NotificationConsumer.robot @@ -5,6 +5,7 @@ Resource environment/individualThresholds.txt Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary +Library String Suite Setup Check resource existence and get CallbackUri diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt index 0d578a276..877c07bfe 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt @@ -35,4 +35,6 @@ ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${response} -${objectInstanceIds} daca910b0-00d4f1a2b675d-604257e42 \ No newline at end of file +${objectInstanceIds} daca910b0-00d4f1a2b675d-604257e42 + +${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot index f7a1578f7..27fa56033 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/NotificationConsumer.robot @@ -4,6 +4,7 @@ Resource environment/variables.txt Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary +Library String Suite Setup Check resource existence and get CallbackUri *** Test Cases *** diff --git a/requirements.txt b/requirements.txt index 7ec119049..97f58058a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,5 +8,5 @@ RESTinstance==1.0.0rc4 robotframework-dependencylibrary==1.0.0.post1 robotframework-jsonlibrary==0.3 robotframework-jsonschemalibrary==1.0 -robotframework-mockserver==0.0.4 +robotframework-mockserver==0.0.5 -- GitLab