From 52bf1bae24f6c398315d3842ee390ed7bce69550 Mon Sep 17 00:00:00 2001 From: zulfiqar Date: Wed, 3 Mar 2021 13:28:58 +0100 Subject: [PATCH] added new test for API Consumer Notification --- .../NotificationConsumer.robot | 23 +++++++++++++++++++ ...SupportedIndicatorsChangeNotification.json | 14 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 SOL003/VNFIndicator-API/jsons/SupportedIndicatorsChangeNotification.json diff --git a/SOL003/VNFIndicator-API/NotificationConsumer.robot b/SOL003/VNFIndicator-API/NotificationConsumer.robot index 2ef3617d..5ae66945 100644 --- a/SOL003/VNFIndicator-API/NotificationConsumer.robot +++ b/SOL003/VNFIndicator-API/NotificationConsumer.robot @@ -19,6 +19,18 @@ VNF Indicator Value Change Notification Post VNF Indicator Value Change Notification Check HTTP Response Status Code Is 204 +Supported Indicators Change Notification + [Documentation] Test ID: 7.3.6.7.2 + ... Test title: Supported Indicators Change Notification + ... Test objective: The objective is to test that the POST request triggers Supported Indicators Change Notification. + ... Pre-conditions: A VNF is instantiated, and a individual subscription resource for supported indicators change notifications is available in the VNFM. + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Supported Indicators Change Notification + Check HTTP Response Status Code Is 204 + *** Keywords *** Check resource existence and get CallbackUri Set Headers {"Accept":"${ACCEPT_JSON}"} @@ -44,3 +56,14 @@ Post VNF Indicator Value Change Notification Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +Post Supported Indicators Change Notification + log Trying to perform a POST for notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/SupportedIndicatorsChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFIndicator-API/jsons/SupportedIndicatorsChangeNotification.json b/SOL003/VNFIndicator-API/jsons/SupportedIndicatorsChangeNotification.json new file mode 100644 index 00000000..9e655920 --- /dev/null +++ b/SOL003/VNFIndicator-API/jsons/SupportedIndicatorsChangeNotification.json @@ -0,0 +1,14 @@ +{{ + "id":"", + "notificationType":"SupportedIndicatorsChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfInstanceId":"{vnfInstanceId}", + "supportedIndicators":{{ + "vnfIndicatorId":"{indicatorId}" + }} + "_links":{{ + "vnfInstance":"", + "subscription":"" + }} +}} \ No newline at end of file -- GitLab