From 0f8500d6c98a0f42432f0b8c75ff89cbaf995a36 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini <g.bernini@nextworks.it> Date: Mon, 24 Jun 2019 10:12:15 +0200 Subject: [PATCH] added doc for SOL005 NS performance mgmt --- .../IndividualPmJob.robot | 147 +++--- .../IndividualReport.robot | 123 +++-- .../IndividualSubscription.robot | 151 +++--- .../IndividualThreshold.robot | 137 +++--- .../NSPerformanceManagementKeywords.robot | 439 +++++++++++++++++- .../NSPerformanceManagement-API/PMJobs.robot | 4 +- .../Subscriptions.robot | 128 +++-- .../Thresholds.robot | 107 +++++ .../environment/IndividualPmJob.txt | 3 + .../environment/individualSubscription.txt | 3 + .../environment/individualThresholds.txt | 3 + .../environment/reports.txt | 3 + 12 files changed, 977 insertions(+), 271 deletions(-) diff --git a/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot b/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot index a0f8d655..98e47656 100644 --- a/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot @@ -3,74 +3,97 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Resource environment/IndividualPmJob.txt +Resource NSPerformanceManagementKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} *** Test Cases *** -GET Individual PM Job - Log Trying to get a Pm Job present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate response - ${result}= Output response body - Validate Json PmJob.schema.json ${result} - Log Validation OK +GET individual NS Performance Job + [Documentation] Test ID: 5.3.4.2.1 + ... Test title: Get individual NS Performance Job + ... Test objective: The objective is to test the retrieval of an individual NS Performance monitoring job and perform a JSON schema and content validation of the collected job data structure + ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. + ... Reference: section 7.4.3.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET individual NS Performance Job + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJob + Check HTTP Response Body Pm Job Identifier matches the requested Pm Job -GET Individual PM Job - Negative (Not Found) - Log Trying to perform a negative get, using erroneous PM Job identifier - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} - Integer response status 404 - Log Received 404 Not Found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET individual NS Performance Job with invalid resource identifier + [Documentation] Test ID: 5.3.4.2.2 + ... Test title: Get individual NS Performance Job with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual NS Performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. + ... Reference: section 7.4.3.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET individual NS Performance Job with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails -DELETE Individual PM Job - Log Trying to delete an existing PM Job - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 204 - Log Received 204 No Content as expected +DELETE Individual NS Performance Job with invalid resource identifier + [Documentation] Test ID: 5.3.4.2.3 + ... Test title: Delete individual NS Performance Job with invalid resource identifier + ... Test objective: The objective is to test that the deletion of an individual NS Performance monitoring job fails when using an invalid resource identifier + ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. + ... Reference: section 7.4.3.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual NS Performance Job with invalid resource identifier + Check HTTP Response Status Code Is 404 -DELETE Individual PM Job - Negative (Not Found) - Log Trying to delete an existing PM Job - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} - Integer response status 404 - Log Received 404 Not Found as expected - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +POST Individual NS Performance Job - Method not implemented + [Documentation] Test ID: 5.3.4.2.4 + ... Test title: POST Individual NS Performance Job - method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new NS Performance Monitoring Job + ... Pre-conditions: A NS instance is instantiated + ... Reference: section 7.4.3.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance Job is not created on the NFVO + Send Post request for individual NS Performance Job + Check HTTP Response Status Code Is 405 + Check Postcondition NS Performance Job is not Created -POST Individual PM Job - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Log Trying to perform a POST (method should not be implemented) - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PUT Individual NS Performance Job - Method not implemented + [Documentation] Test ID: 5.3.4.2.5 + ... Test title: PUT Individual NS Performance Job - method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS Performance Monitoring Job + ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. + ... Reference: section 7.4.3.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance Job is not modified by the operation + Send Put request for individual NS Performance Job + Check HTTP Response Status Code Is 405 + Check Postcondition NS Performance Job is Unmodified (Implicit) -PUT Individual PM Job - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PATCH Individual NS Performance Job - Method not implemented + [Documentation] Test ID: 5.3.4.2.6 + ... Test title: PATCH Individual NS Performance Job - method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new NS Performance Monitoring Job + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 6.4.3.3.4 - SOL002 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance Job is not modified by the operation + Send Patch request for individual NS Performance Job + Check HTTP Response Status Code Is 405 + Check Postcondition NS Performance Job is Unmodified (Implicit) -PATCH Individual PM Job - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 405 - Log Received 405 Method not implemented as expected +DELETE Individual NS Performance Job + [Documentation] Test ID: 5.3.4.2.7 + ... Test title: Delete Individual NS Performance Job + ... Test objective: The objective is to test the deletion of an individual NS Performance monitoring job + ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. + ... Reference: section 7.4.3.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance Job is no more available in the NFVO + Send Delete request for individual NS Performance Job + Check HTTP Response Status Code Is 204 + Check Postcondition NS Pm Job is Deleted \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/IndividualReport.robot b/SOL005/NSPerformanceManagement-API/IndividualReport.robot index de5119e0..6b0cef2b 100644 --- a/SOL005/NSPerformanceManagement-API/IndividualReport.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualReport.robot @@ -2,62 +2,85 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource environment/reports.txt +Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} *** Test Cases *** -GET Report on Single PM Job - [Documentation] The client can use this resource to read the performance report. - ... The URI of this report can be obtained from a PerformanceInformationAvailableNotification - ... (see clause 7.5.2.5) or from the representation of the "Individual PM job" resource - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate result with PerformanceReport schema - ${result}= Output response body - Validate Json PerformanceReport.schema.json ${result} +Get Individual Performance Report + [Documentation] Test ID: 5.3.4.3.1 + ... Test title: Get Individual Performance Report + ... Test objective: The objective is to test the retrieval of an individual NS performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure + ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. + ... Reference: section 7.4.4.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PerformanceReport -GET Report on Single PM Job - Negative (Not Found) - [Documentation] The client can use this resource to read the performance report. - ... The URI of this report can be obtained from a PerformanceInformationAvailableNotification - ... (see clause 7.5.2.5) or from the representation of the "Individual PM job" resource - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} - Integer response status 404 - Log Received 404 Not Found as expected - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get Individual Performance Report with invalid resource endpoint + [Documentation] Test ID: 5.3.4.3.2 + ... Test title: Get Individual Performance Report with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of an individual NS performance report associated to a monitoring job fails when using an invalid resource endpoint + ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. + ... Reference: section 7.4.4.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report with invalid resource endpoint + Check HTTP Response Status Code Is 404 -POST Reports - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} - Integer response status 405 - Log Received 405 Method not implemented as expected +POST Individual Performance Report - Method not implemented + [Documentation] Test ID: 5.3.4.3.3 + ... Test title: POST Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new NS performance report within a monitoring job + ... Pre-conditions: A NS instance is instantiated. + ... Reference: section 7.4.4.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance report is not created on the NFVO + Send Post request for Individual Performance Report + Check HTTP Response Status Code Is 405 + Check Postcondition NS Individual Performance Report is not Created -PUT Reports - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PUT Individual Performance Report - Method not implemented + [Documentation] Test ID: 5.3.4.3.4 + ... Test title: PUT Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS performance report within a monitoring job + ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. + ... Reference: section 7.4.4.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance report is not modified by the operation + Send Put request for Individual Performance Report + Check HTTP Response Status Code Is 405 + Check Postcondition NS Individual Performance Report is Unmodified (Implicit) -PATCH Reports - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PATCH Individual Performance Report - Method not implemented + [Documentation] Test ID: 5.3.4.3.5 + ... Test title: PATCH Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NS performance report within a monitoring job + ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. + ... Reference: section 7.4.4.3.4 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance report is not modified by the operation + Send Patch request for Individual Performance Report + Check HTTP Response Status Code Is 405 + Check Postcondition NS Individual Performance Report is Unmodified (Implicit) + +DELETE Individual Performance Report - Method not implemented + [Documentation] Test ID: 5.3.4.3.6 + ... Test title: DELETE Individual Performance Report - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing NS performance report within a monitoring job + ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. + ... Reference: section 7.4.4.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance report is not deleted by the operation + Send Delete request for Individual Performance Report + Check HTTP Response Status Code Is 405 + Check Postcondition NS Individual Performance Report Exists -DELETE Reports - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} - Integer response status 405 - Log Received 405 Method not implemented as expected diff --git a/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot b/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot index 26ad17d0..d07a5476 100644 --- a/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot @@ -4,80 +4,99 @@ Documentation This resource represents an individual subscription for notifi ... management. Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource NSPerformanceManagementKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem Library JSONLibrary Resource environment/individualSubscription.txt *** Test Cases *** -GET Individual Subscription - [Documentation] The client can use this method for reading an individual subscription about Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the tables 6.4.8.3.2-1 and 6.4.8.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Log Received a 200 OK as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${result}= Output response body - Validate Json PmSubscription.schema.json ${result} - Log Validated PmSubscription schema +GET Individual NS Performance Subscription + [Documentation] Test ID: 5.3.4.7.1 + ... Test title: GET Individual NS Performance Subscription + ... Test objective: The objective is to test the retrieval of individual NS Performance subscription and perform a JSON schema and content validation of the returned subscription data structure + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.8.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Individual NS Performance Subscription + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PkgmSubscription + Check HTTP Response Body Subscription Identifier matches the requested Subscription -GET Individual Subscription - Negative (Not Found) - [Documentation] The client can use this method for reading an individual subscription about Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the tables 6.4.8.3.2-1 and 6.4.8.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} - Integer response status 404 - Log Received a 404 Not found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${result}= Output response body - Validate Json ProblemDetails.schema.json ${result} - Log Validated ProblemDetails schema +GET Individual NS Performance Subscription with invalid resource identifier + [Documentation] Test ID: 5.3.4.7.2 + ... Test title: GET Individual NS Performance Subscription with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual NS Performance subscription fails when using an invalid resource identifier + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.8.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET individual NS Performance Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 -POST Individual Subscription - (Method not implemented) - [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method - ... Not Allowed" response as defined in clause 4.3.5.4. - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 405 - Log Received 405 Method not implemented as expected +DELETE Individual NS Performance Subscription with invalid resource identifier + [Documentation] Test ID: 5.3.4.7.3 + ... Test title: DELETE Individual NS Performance Subscription with invalid resource identifier + ... Test objective: The objective is to test that the deletion of an individual NS Performance subscription fails when using an invalid resource identifier + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.8.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual NS Performance Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 -PUT Individual Subscription - (Method not implemented) - [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method - ... Not Allowed" response as defined in clause 4.3.5.4. - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 405 - Log Received 405 Method not implemented as expected +POST Individual NS Performance Subscription - Method not implemented + [Documentation] Test ID: 5.3.4.7.4 + ... Test title: POST Individual NS Performance Subscription - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new NS Performance Subscription + ... Pre-conditions: none + ... Reference: section 7.4.8.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance Subscription is not created on the NFVO + Send Post request for individual NS Performance Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition NS Performance Subscription is not Created -PATCH Individual Subscription - (Method not implemented) - [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method - ... Not Allowed" response as defined in clause 4.3.5.4. - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PUT Individual NS Performance Subscription - Method not implemented + [Documentation] Test ID: 5.3.4.7.5 + ... Test title: PUT Individual NS Performance Subscription - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS Performance subscription + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.8.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance subscription is not modified by the operation + Send Put request for individual NS Performance Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition NS Performance Subscription is Unmodified (Implicit) -DELETE Individual Subscription - [Documentation] This method terminates an individual subscription. - ... This method shall follow the provisions specified in the tables 6.4.8.3.5-1 and 6.4.8.3.5-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 204 - Log Received a 204 No Content as expected - ${body}= Output response body - Should Be Empty ${body} - Log Body of the response is empty +PATCH Individual NS Performance Subscription - Method not implemented + [Documentation] Test ID: 5.3.4.7.6 + ... Test title: PATCH Individual NS Performance Subscription - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NS Performance subscription + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.8.3.4 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance subscription is not modified by the operation + Send Patch request for individual NS Performance Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition NS Performance Subscription is Unmodified (Implicit) + +DELETE Individual NS Performance Subscription + [Documentation] Test ID: 5.3.4.7.7 + ... Test title: DELETE Individual NS Performance Subscription + ... Test objective: The objective is to test the deletion of an individual NS Performance subscription + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.8.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance Subscription is not available anymore in the NFVO + Send Delete request for individual NS Performance Subscription + Check HTTP Response Status Code Is 204 + Check Postcondition NS Performance Subscription is Deleted \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot b/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot index 875101f4..b8a64ed6 100644 --- a/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot @@ -2,6 +2,7 @@ Documentation This resource represents an individual threshold. Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem @@ -9,62 +10,92 @@ Resource environment/individualThresholds.txt *** Test Cases *** GET Individual Threshold - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${result}= Output response body - Log Trying to validate result with thresholds schema - Validate Json Threshold.schema.json ${result} + [Documentation] Test ID: 5.3.4.5.1 + ... Test title: GET Individual Threshold + ... Test objective: The objective is to test the retrieval of an individual NS performance threshold and perform a JSON schema and content validation of the collected threshold data structure + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.6.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET individual NS performance Threshold + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Threshold + Check HTTP Response Body Threshold Identifier matches the requested Threshold -GET Individual Threshold - Negative (Not Found) - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} - Integer response status 404 - Log Received 404 Not Found as expected - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET Individual Threshold with invalid resource identifier + [Documentation] Test ID: 5.3.4.5.2 + ... Test title: GET Individual Threshold with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual NS performance threshold fails when using an invalid resource identifier + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.6.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET individual NS performance Threshold with invalid resource identifier + Check HTTP Response Status Code Is 404 -DELETE Individual Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} - Integer response status 204 - Log Received 204 No Content as expected - ${body}= Output response body - Should Be Empty ${body} - Log Body of the response is empty +DELETE Individual Threshold with invalid resource identifier + [Documentation] Test ID: 5.3.4.5.3 + ... Test title: DELETE Individual Threshold with invalid resource identifier + ... Test objective: The objective is to test the deletion of an individual NS performance threshold + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.6.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual NS performance Threshold with invalid resource identifier + Check HTTP Response Status Code Is 404 + +POST Individual Threshold - Method not implemented + [Documentation] Test ID: 5.3.4.5.4 + ... Test title: POST Individual Threshold - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new NS performance Threshold + ... Pre-conditions: A NS instance is instantiated + ... Reference: section 7.4.6.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance Threshold is not created on the NFVO + Send Post request for individual NS performance Threshold + Check HTTP Response Status Code Is 405 + Check Postcondition NS performance Threshold is not Created -DELETE Individual Threshold - Negative (Not Found) - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} - Integer response status 404 - Log Received 404 Not Found as expected - ${result}= Output response body - Log Trying to validate result with ProblemDetails schema - Validate Json ProblemDetails.schema.json ${result} +PUT Individual Threshold - Method not implemented + [Documentation] Test ID: 5.3.4.5.5 + ... Test title: PUT Individual Threshold - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS performance threshold + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.6.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance Threshold is not modified by the operation + Send Put request for individual NS performance Threshold + Check HTTP Response Status Code Is 405 + Check Postcondition NS performance Threshold is Unmodified (Implicit) -POST Individual Threshold - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds - Integer response status 405 - Log Received 405 Method not implemented as expected +PATCH Individual Threshold - Method not implemented + [Documentation] Test ID: 5.3.4.5.6 + ... Test title: PATCH Individual Threshold - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NS performance threshold + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.6.3.4 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance Threshold is not modified by the operation + Send Patch request for individual NS performance Threshold + Check HTTP Response Status Code Is 405 + Check Postcondition NS performance Threshold is Unmodified (Implicit) -PUT Individual Threshold - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds - Integer response status 405 - Log Received 405 Method not implemented as expected +DELETE Individual Threshold + [Documentation] Test ID: 5.3.4.5.7 + ... Test title: DELETE Individual Threshold + ... Test objective: The objective is to test the deletion of an individual NS performance threshold + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.6.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance Threshold is not available anymore in the NFVO + Send Delete request for individual NS performance Threshold + Check HTTP Response Status Code Is 204 + Check Postcondition NS performance Threshold is Deleted -PATCH Individual Threshold - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds - Integer response status 405 - Log Received 405 Method not implemented as expected diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index ff13907c..0e085440 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -2,6 +2,11 @@ Resource environment/variables.txt Resource environment/subscriptions.txt Resource environment/pmJobs.txt +Resource environment/IndividualPmJob.txt +Resource environment/reports.txt +Resource environment/thresholds.txt +Resource environment/individualThresholds.txt +Resource environment/individualSubscription.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -175,8 +180,337 @@ Check HTTP Response Body PmJobs Do Not Contain reports Should Be Empty ${reports} Log Reports element is empty as expected +GET individual NS Performance Job + Log Trying to get a Pm Job present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET individual NS Performance Job with invalid resource identifier + Log Trying to perform a negative get, using erroneous PM Job identifier + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual NS Performance Job + Log Trying to delete an existing PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual NS Performance Job with invalid resource identifier + Log Trying to perform a negative delete, using erroneous PM Job identifier + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post request for individual NS Performance Job + Log Trying to perform a POST (method should not be implemented) + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Put request for individual NS Performance Job + Log Trying to perform a POST (method should not be implemented) + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Patch request for individual NS Performance Job + Log Trying to perform a PATCH (method should not be implemented) + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition NS Performance Job is not Created + Log Trying to get a new Pm Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 404 + +Check Postcondition NS Performance Job is Unmodified (Implicit) + Log Check Postcondition VNF PM job is not modified + GET individual NS Performance Job + Log Check Response matches original VNF Pm Job + ${pmJob}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origresponse['body']['id']} ${pmJob.id} + Should Be Equal ${origresponse['body']['criteria']} ${pmJob.criteria} + Should Be Equal ${origresponse['body']['_links']} ${pmJob._links} + +Check Postcondition NS Pm Job is Deleted + Log Check Postcondition + GET individual NS Performance Job + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body Pm Job Identifier matches the requested Pm Job + Log Going to validate Pm Job info retrieved + Should Be Equal ${response['body']['id']} ${pmJobId} + Log Pm Job identifier as expected + +Get Individual Performance Report + Log Trying to get a performance report present in the NFVO + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Individual Performance Report with invalid resource endpoint + Log Trying to get a performance report with invalid resource endpoint + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} + ${output}= Output response + Set Suite Variable ${response} ${output} -Get all NSD Performance Subscriptions +Send Post request for Individual Performance Report + Log Trying to create new performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Put request for Individual Performance Report + Log Trying to update performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Patch request for Individual Performance Report + Log Trying to update performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for Individual Performance Report + Log Trying to delete performance report + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition NS Individual Performance Report Exists + Log Checking that report still exists + Get Individual Performance Report + +Check Postcondition NS Individual Performance Report is not Created + Log Trying to get a new report + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 404 + +Check Postcondition NS Individual Performance Report is Unmodified (Implicit) + Log Check Postcondition VNF PM job is not modified + Get Individual Performance Report + Log Check Response matches original VNF report + ${report}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origResponse['body']['entries'][0]['objectInstanceId']} ${report['entries'][0]['objectInstanceId']} + +GET all Performance Thresholds + Log Trying to get all thresholds present in the NFVO + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Performance Thresholds with attribute-based filter + Log Trying to get thresholds present in the NFVO with filter + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Performance Thresholds with invalid attribute-based filter + Log Trying to get thresholds present in the NFVO with invalid filter + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS performance Thresholds with invalid resource endpoint + Log Trying to get thresholds present in the NFVO with invalid resource endpoint + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/threshold + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post Request Create new Performance Threshold + Log Creating a new THreshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${request}= Get File jsons/CreateThresholdRequest.json + POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for all Performance Thresholds + Log PUT THresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for all Performance Thresholds + Log PUT THresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for all Performance Thresholds + Log DELETE THresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition Thresholds Exist + Log Checking that Thresholds still exists + GET all Performance Thresholds + +Check Postcondition Threshold Exists + Log Checking that Threshold exists + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Threshold + +Check HTTP Response Body Thresholds match the requested attribute-based filter + Log Checking that attribute-based filter is matched + #todo + +GET Individual NS performance Threshold + Log Trying to get a Threhsold present in the NFVO + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +GET individual NS performance Threshold with invalid resource identifier + Log Trying to get a Threhsold with invalid resource endpoint + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Delete request for individual NS performance Threshold + Log Trying to delete a Threhsold in the NFVO + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Delete request for individual NS performance Threshold with invalid resource identifier + Log Trying to delete a Threhsold in the NFVO with invalid id + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Post request for individual NS performance Threshold + Log Trying to create new threshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Put request for individual NS performance Threshold + Log Trying to PUT threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Patch request for individual NS performance Threshold + Log Trying to PUT threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Check Postcondition NS performance Threshold is Unmodified (Implicit) + Log Check postconidtion threshold not modified + GET individual NS performance Threshold + Log Check Response matches original VNF Threshold + ${threshold}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origresponse['body']['id']} ${threshold.id} + Should Be Equal ${origresponse['body']['criteria']} ${threshold.criteria} + +Check Postcondition NS performance Threshold is not Created + Log Trying to get a new Threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} + ${output}= Output response + Set Suite Variable @{response} ${output} + Check HTTP Response Status Code Is 404 + +Check Postcondition NS performance Threshold is Deleted + Log Check Postcondition Threshold is deleted + GET individual NS performance Threshold + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body Threshold Identifier matches the requested Threshold + Log Trying to check response ID + Should Be Equal ${response['body']['id']} ${thresholdId} + Log Pm Job identifier as expected + + + +Get all NS Performance Subscriptions [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications ... subscribed by the client. ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, @@ -188,7 +522,7 @@ Get all NSD Performance Subscriptions Set Suite Variable ${response} ${output} -Get NSD Performance Subscriptions with attribute-based filters +Get NS Performance Subscriptions with attribute-based filters [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications ... subscribed by the client. ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, @@ -200,7 +534,7 @@ Get NSD Performance Subscriptions with attribute-based filters Set Suite Variable ${response} ${output} -Get NSD Performance Subscriptions with invalid attribute-based filters +Get NS Performance Subscriptions with invalid attribute-based filters [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications ... subscribed by the client. ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, @@ -212,7 +546,7 @@ Get NSD Performance Subscriptions with invalid attribute-based filters Set Suite Variable ${response} ${output} -Get NSD Performance Subscriptions with invalid resource endpoint +Get NS Performance Subscriptions with invalid resource endpoint [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications ... subscribed by the client. ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, @@ -224,7 +558,7 @@ Get NSD Performance Subscriptions with invalid resource endpoint Set Suite Variable ${response} ${output} -Send Post Request for NSD Performance Subscription +Send Post Request for NS Performance Subscription [Documentation] The POST method creates a new subscription ... This method shall follow the provisions specified in the Tables 7.4.7.3.1-1 and 7.4.7.3.1-2 for URI query parameters, ... request and response data structures, and response codes. @@ -245,7 +579,7 @@ Send Post Request for NSD Performance Subscription ... Check Notification Endpoint -Send Post Request for Duplicated NSD Performance Subscription +Send Post Request for Duplicated NS Performance Subscription [Documentation] The POST method creates a new subscription ... This method shall follow the provisions specified in the Tables 7.4.7.3.1-1 and 7.4.7.3.1-2 for URI query parameters, ... request and response data structures, and response codes. @@ -267,7 +601,7 @@ Send Post Request for Duplicated NSD Performance Subscription -Send Put Request for NSD Performance Subscriptions +Send Put Request for NS Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. @@ -277,7 +611,7 @@ Send Put Request for NSD Performance Subscriptions Set Suite Variable ${response} ${output} -Send Patch Request for NSD Performance Subscriptions +Send Patch Request for NS Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. @@ -287,7 +621,7 @@ Send Patch Request for NSD Performance Subscriptions Set Suite Variable ${response} ${output} -Send Delete Request for NSD Performance Subscriptions +Send Delete Request for NS Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method ... Not Allowed" response as defined in clause 4.3.5.4. Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. @@ -322,14 +656,14 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte #TODO -Check HTTP Response Body Matches the Subscription +Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription ${body}= Get File jsons/subscriptions.json ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${response['body']['callbackUri']} ${subscription['callbackUri']} -Check Postcondition NSD Performance Subscription Is Set +Check Postcondition NS Performance Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -340,7 +674,7 @@ Check Postcondition NSD Performance Subscription Is Set Check HTTP Response Status Code Is 200 -Check Postcondition Subscription Resource URI Returned in Location Header Is Valid +Check Postcondition Subscription Resource URI Returned in Location Header Is Available Log Going to check postcondition Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${response.headers['Location']} @@ -352,7 +686,88 @@ Check Postcondition Subscription Resource URI Returned in Location Header Is Val Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscriptions schema +Get Individual NS Performance Subscription + Log Trying to get a single subscription identified by subscriptionId + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET individual NS Performance Subscription with invalid resource identifier + Log Trying to perform a request on a subscriptionID which doesn't exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete request for individual NS Performance Subscription + Log Trying to perform a DELETE on a subscriptionId + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition NS Performance Subscription is Deleted + Log Check Postcondition Subscription is deleted + GET individual NS Performance Subscription + Check HTTP Response Status Code Is 404 + +Send Delete request for individual NS Performance Subscription with invalid resource identifier + Log Trying to perform a DELETE on a subscriptionId which doesn't exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post request for individual NS Performance Subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Put request for individual NS Performance Subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} +Send Patch request for individual NS Performance Subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Check Postcondition NS Performance Subscription is Unmodified (Implicit) + Log Check postconidtion subscription not modified + GET individual NS Performance Subscription + Log Check Response matches original VNF Threshold + ${subscription}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origResponse['body']['id']} ${subscription.id} + Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} + +Check Postcondition NS Performance Subscription is not Created + Log Trying to get a new subscription + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body Subscription Identifier matches the requested Subscription + Log Trying to check response ID + Should Be Equal ${response['body']['id']} ${subscriptionId} + Log Subscription identifier as expected Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} diff --git a/SOL005/NSPerformanceManagement-API/PMJobs.robot b/SOL005/NSPerformanceManagement-API/PMJobs.robot index 98d60bf8..2d56b731 100644 --- a/SOL005/NSPerformanceManagement-API/PMJobs.robot +++ b/SOL005/NSPerformanceManagement-API/PMJobs.robot @@ -144,7 +144,7 @@ PUT all NS Performance Monitoring Jobs - Method not implemented Send PUT Request for all NS Performance Monitoring Jobs Check HTTP Response Status Code Is 405 -PATCH all NS Performance Monitoring Jobs - (Method not implemented) +PATCH all NS Performance Monitoring Jobs - Method not implemented [Documentation] Test ID: 5.3.4.1.11 ... Test title: PATCH all NS Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update NS Performance Monitoring Jobs @@ -164,7 +164,7 @@ DELETE all NS Performance Monitoring Jobs - Method not implemented ... Reference: section 7.4.2.3.5 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: The NS Performance Monitoring Jobs are not deleted by the failed operation Send PATCH Request for all NS Performance Monitoring Jobs Check HTTP Response Status Code Is 405 Check Postcondition NS Performance Monitoring Jobs Exist diff --git a/SOL005/NSPerformanceManagement-API/Subscriptions.robot b/SOL005/NSPerformanceManagement-API/Subscriptions.robot index f778e1a7..f8dfbf23 100644 --- a/SOL005/NSPerformanceManagement-API/Subscriptions.robot +++ b/SOL005/NSPerformanceManagement-API/Subscriptions.robot @@ -1,6 +1,4 @@ *** Settings *** -Documentation This resource represents subscriptions. The client can use this resource to subscribe to notifications related to VNF -... performance management and to query its subscriptions. Resource environment/variables.txt # Generic Parameters Resource environment/subscriptions.txt Resource NSPerformanceManagementKeywords.robot @@ -14,68 +12,146 @@ Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** -Get All NSD Performance Subscriptions - Get all NSD Performance Subscriptions +Get All NS Performance Subscriptions + [Documentation] Test ID: 5.3.4.6.1 + ... Test title: Get All NS Performance Subscriptions + ... Test objective: The objective is to test the retrieval of all NS Performance subscriptions and perform a JSON schema validation of the returned subscriptions data structure + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get all NS Performance Subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PmSubscriptions -Get NSD Performance Subscriptions with attribute-based filter - Get NSD Performance Subscriptions with attribute-based filters +Get NS Performance Subscriptions with attribute-based filter + [Documentation] Test ID: 5.3.4.6.2 + ... Test title: Get NS Performance Subscriptions with attribute-based filter + ... Test objective: The objective is to test the retrieval of NS Performance subscriptions using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filters + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NS Performance Subscriptions with attribute-based filters Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PmSubscriptions Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter -Get NSD Performance Subscriptions with invalid attribute-based filter - Get NSD Performance Subscriptions with invalid attribute-based filters +Get NS Performance Subscriptions with invalid attribute-based filter + [Documentation] Test ID: 5.3.4.6.3 + ... Test title: Get NS Performance Subscriptions with attribute-based filters + ... Test objective: The objective is to test that the retrieval of NS Performance subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NS Performance Subscriptions with invalid attribute-based filters Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails -GET NSD Performance Subscription with invalid resource endpoint - Get NSD Performance Subscriptions with invalid resource endpoint +GET NS Performance Subscription with invalid resource endpoint + [Documentation] Test ID: 5.3.4.6.4 + ... Test title: GET NS Performance Subscription with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of all NS Performance subscriptions fails when using invalid resource endpoint. + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NS Performance Subscriptions with invalid resource endpoint Check HTTP Response Status Code Is 404 -Create new NSD Performance subscription - Send Post Request for NSD Performance Subscription +Create new NS Performance subscription + [Documentation] Test ID: 5.3.4.6.5 + ... Test title: Create new NS Performance subscription + ... Test objective: The objective is to test the creation of a new NS Performance subscription and perform a JSON schema and content validation of the returned subscription data structure + ... Pre-conditions: none + ... Reference: section 7.4.7.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance subscription is successfully set and it matches the issued subscription + Send Post Request for NS Performance Subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is PmSubscription - Check HTTP Response Body Matches the Subscription - Check Postcondition NSD Performance Subscription Is Set + Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription + Check Postcondition NS Performance Subscription Is Set -Create duplicated NSD Performance subscription with NFVO not creating duplicated subscriptions +Create duplicated NS Performance subscription with NFVO not creating duplicated subscriptions [Tags] no-duplicated-subs - Send Post Request for Duplicated NSD Performance Subscription + [Documentation] Test ID: 5.3.4.6.6 + ... Test title: Create duplicated NS Performance subscription with NFVO not creating duplicated subscriptions + ... Test objective: The objective is to test the attempt of a creation of a duplicated NS Performance subscription and check that no new subscription is created by the NFVO and a link to the original subscription is returned + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO does not support the creation of duplicated subscriptions + ... Post-Conditions: The existing NS Performance subscription returned is available in the NFVO + Send Post Request for Duplicated NS Performance Subscription Check HTTP Response Status Code Is 303 Check HTTP Response Body Is Empty Check HTTP Response Header Contains Location - Check Postcondition Subscription Resource URI Returned in Location Header Is Valid + Check Postcondition Subscription Resource URI Returned in Location Header Is Available - - -Create duplicated NSD Performance subscription with NFVO creating duplicated subscriptions +Create duplicated NS Performance subscription with NFVO creating duplicated subscriptions [Tags] duplicated-subs - Send Post Request for Duplicated NSD Performance Subscription + [Documentation] Test ID: 5.3.4.6.7 + ... Test title: Create duplicated NS Performance subscription with NFVO creating duplicated subscriptions + ... Test objective: The objective is to test the creation of a duplicated NS Performance subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports the creation of duplicated subscriptions + ... Post-Conditions: The duplicated NS Performance subscription is successfully set and it matches the issued subscription + Send Post Request for Duplicated NS Performance Subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is PmSubscription - Check HTTP Response Body Matches the Subscription - Check Postcondition NSD Performance Subscription Is Set + Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription + Check Postcondition NS Performance Subscription Is Set PUT NSD Performance Subscriptions - Method not implemented - Send Put Request for NSD Performance Subscriptions + [Documentation] Test ID: 5.3.4.6.8 + ... Test title: PUT NS Performance Subscriptions - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify NS Performance subscriptions + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send Put Request for NS Performance Subscriptions Check HTTP Response Status Code Is 405 PATCH NSD Performance Subscriptions - Method not implemented - Send Patch Request for NSD Performance Subscriptions + [Documentation] Test ID: 5.3.4.6.9 + ... Test title: PATCH NS Performance Subscriptions - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update NS Performance subscriptions + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.4 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send Patch Request for NS Performance Subscriptions Check HTTP Response Status Code Is 405 DELETE NSD Performance Subscriptions - Method not implemented - Send Delete Request for NSD Performance Subscriptions + [Documentation] Test ID: 5.3.4.6.10 + ... Test title: DELETE NS Performance Subscriptions - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete NS Performance subscriptions + ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. + ... Reference: section 7.4.7.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance subscriptions are not deleted by the failed operation + Send Delete Request for NS Performance Subscriptions Check HTTP Response Status Code Is 405 diff --git a/SOL005/NSPerformanceManagement-API/Thresholds.robot b/SOL005/NSPerformanceManagement-API/Thresholds.robot index 46bd0536..dfb529df 100644 --- a/SOL005/NSPerformanceManagement-API/Thresholds.robot +++ b/SOL005/NSPerformanceManagement-API/Thresholds.robot @@ -2,12 +2,119 @@ Documentation This resource represents thresholds. The client can use this resource to create and query thresholds. Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Resource environment/thresholds.txt Library OperatingSystem *** Test Cases *** +GET All Performance Thresholds + [Documentation] Test ID: 5.3.4.4.1 + ... Test title: GET All Performance Thresholds + ... Test objective: The objective is to test the retrieval of all the available NS performance thresholds and perform a JSON schema validation of the collected thresholds data structure + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.5.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET all Performance Thresholds + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Thresholds + +GET Performance Thresholds with attribute-based filter + [Documentation] Test ID: 5.3.4.4.2 + ... Test title: GET Performance Thresholds with attribute-based filter + ... Test objective: The objective is to test the retrieval of all the available NS performance thresholds when using attribute-based filters, perform a JSON schema validation of the collected thresholds data structure, and verify that the retrieved information matches the issued attribute-based filter + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.5.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Performance Thresholds with attribute-based filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Thresholds + Check HTTP Response Body Thresholds match the requested attribute-based filter + +GET Performance Thresholds with invalid attribute-based filter + [Documentation] Test ID: 5.3.4.4.3 + ... Test title: GET Performance Thresholds with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of NS performance thresholds fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.5.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Performance Thresholds with invalid attribute-based filter + Check HTTP Response Status Code Is 404 + +GET Performance Thresholds with invalid resource endpoint + [Documentation] Test ID: 5.3.4.4.4 + ... Test title: GET Performance Thresholds with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of NS performance thresholds fails when using invalid resource endpoint, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.5.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NS performance Thresholds with invalid resource endpoint + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Create new Performance Threshold + [Documentation] Test ID: 5.3.4.4.5 + ... Test title: Create new Performance Threshold + ... Test objective: The objective is to test the creation of a new NS performance threshold and perform the JSON schema validation of the returned threshold data structure + ... Pre-conditions: A NS instance is instantiated. + ... Reference: section 7.4.5.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance Threshold is successfully created on the NFVO + Send Post Request Create new Performance Threshold + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Threshold + Check HTTP Response Header Contains Location + Check Postcondition Threshold Exists + +PUT Performance Thresholds - Method not implemented + [Documentation] Test ID: 5.3.4.4.6 + ... Test title: PUT Performance Thresholds - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify NS performance Thresholds + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.5.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for all Performance Thresholds + Check HTTP Response Status Code Is 405 + +PATCH Performance Thresholds - Method not implemented + [Documentation] Test ID: 5.3.4.4.7 + ... Test title: PATCH Performance Thresholds - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify NS performance Thresholds + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.5.3.4 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for all Performance Thresholds + Check HTTP Response Status Code Is 405 + +DELETE Performance Thresholds - Method not implemented + [Documentation] Test ID: 5.3.4.4.8 + ... Test title: DELETE Performance Thresholds - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to update NS performance Thresholds + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: section 7.4.5.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance thresholds are not deleted by the failed operation + Send DELETE Request for all Performance Thresholds + Check HTTP Response Status Code Is 405 + Check Postcondition Thresholds Exist + + + GET Thresholds [Documentation] T=This resource represents thresholds. ... The client can use this resource to create and query thresholds. diff --git a/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt index a7823e6b..99a00a74 100644 --- a/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt +++ b/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt @@ -1,3 +1,6 @@ *** Variables *** ${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e ${erroneousPmJobId} erroneousPmJobId +${response}= httpresponse +${OrigResponse}= httpresponse +${newPmJobId} newPmJobId diff --git a/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt b/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt index f5aa4ba9..db29963d 100644 --- a/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt +++ b/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt @@ -1,3 +1,6 @@ *** Variables *** ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${erroneousSubscriptionId} erroneousSubscriptionId +${newSubscriptionId} newSubsciptionId +${response} httpresponse +${origResponse} httpresponse diff --git a/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt b/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt index 59056904..92faec2b 100644 --- a/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt +++ b/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt @@ -1,3 +1,6 @@ *** Variables *** ${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${erroneousThresholdId} erroneousThresholdId +${newThresholdId} newThresholdId +${response}= httpresponse +${origResponse}= httpresponse diff --git a/SOL005/NSPerformanceManagement-API/environment/reports.txt b/SOL005/NSPerformanceManagement-API/environment/reports.txt index 7edfcc5c..6ac5f7c0 100644 --- a/SOL005/NSPerformanceManagement-API/environment/reports.txt +++ b/SOL005/NSPerformanceManagement-API/environment/reports.txt @@ -2,3 +2,6 @@ ${pmJobId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 ${erroneousReportId} erroneousReportId +${newReportId} newReportId +${response}= httpresponse +${OrigResponse}= httpresponse -- GitLab